LSStatistics Class

class LSStatistics

Statistics of the search.

Summary

Functions

getRunningTime

Gets the running time in seconds.

getNbIterations

Gets the number of iterations.

getNbMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getNbAcceptedMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getNbImprovingMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getNbRejectedMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getNbInfeasibleMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getPercentAcceptedMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getPercentImprovingMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getPercentRejectedMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

getPercentInfeasibleMoves

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

toString

Returns a string representation of the statistics.

Functions

int LSStatistics::getRunningTime() const

Gets the running time in seconds. Note that is the “real” time spent (and not only the CPU or system time). Only allowed in states S_Paused or S_Stopped.

Returns:

Running time in seconds.

long long LSStatistics::getNbIterations() const

Gets the number of iterations. Only allowed in states S_Paused or S_Stopped.

Returns:

Number of iterations.

long long LSStatistics::getNbMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Number of (attempted) moves.

long long LSStatistics::getNbAcceptedMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Number of accepted moves.

long long LSStatistics::getNbImprovingMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Number of improving moves.

long long LSStatistics::getNbRejectedMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Number of rejected moves.

long long LSStatistics::getNbInfeasibleMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Number of infeasible moves.

double LSStatistics::getPercentAcceptedMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Percentage of accepted moves.

double LSStatistics::getPercentImprovingMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Percentage of improving moves.

double LSStatistics::getPercentRejectedMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Percentage of rejected moves.

double LSStatistics::getPercentInfeasibleMoves() const

Deprecated since version 9.0: This parameter gives an inaccurate view of LocalSolver search.

Only allowed in states S_Paused or S_Stopped.

Returns:

Percentage of infeasible moves.

std::string LSStatistics::toString() const

Returns a string representation of the statistics. Only allowed in states S_Paused or S_Stopped. Useful for debugging or logging purposes.

Returns:

String representation.