LocalSolver logo
is now
Hexaly logo

We're excited to share that we are moving forward. We're leaving behind the LocalSolver brand and transitioning to our new identity: Hexaly. This represents a leap forward in our mission to enable every organization to make better decisions faster when faced with operational and strategic challenges.

This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSBlackBoxEvaluationPoint Class

class LSBlackBoxEvaluationPoint

An evaluation point associated with a black-box function. Evaluation points are used to specify known points for a function in advance. It can be useful to warm-start the solver when the function is particularly expensive to evaluate, or if you already have a good estimate of the optimal point.

Note: This information is used by the solver to drive the solution process. You must be careful about the data you provide: if an incorrect value is given, the solver may have an unexpected behavior.

See:LSBlackBoxContext::createEvaluationPoint()
See:LSBlackBoxContext::getEvaluationPoint()
Since:10.0

Summary

Functions
addArgument Adds an integer argument with the given value.
setArgument Sets the value of the argument at the given position.
setReturnValue Sets the return value of this evaluation point.
isIntReturnValue Returns true if the black-box function associated with this evaluation point is an integer function, false otherwise.
isDoubleReturnValue Returns true if the black-box function associated with this evaluation point is a double function, false otherwise.
isArrayReturnValue Returns true if the black-box function associated with this evaluation point is an array function, false otherwise.
isIntArgument Returns true if the argument at this given position is an integer, false otherwise.
isDoubleArgument Returns true if the argument at this given position is a double, false otherwise.
getIntArgument Returns the value of the argument at the given position.
getDoubleArgument Returns the value of the argument at the given position.
getIntReturnValue Returns the return value of this evaluation point.
getDoubleReturnValue Returns the return value of this evaluation point.
getArrayReturnValue Returns the return value of this evaluation point.

Functions

void LSBlackBoxEvaluationPoint::addArgument(lsint value)

Adds an integer argument with the given value. Only allowed if the associated decision variable is an integer or a boolean. Only allowed in state S_Stopped.

Parameters:value – Value of the argument.
void LSBlackBoxEvaluationPoint::addArgument(lsdouble value)

Adds a double argument with the given value. Only allowed if the associated decision variable is a double. Only allowed in state S_Stopped.

Parameters:value – Value of the argument.
void LSBlackBoxEvaluationPoint::setArgument(int pos, lsint value)

Sets the value of the argument at the given position. Only allowed if this argument is an integer or a boolean. Only allowed in state S_Stopped.

Parameters:
  • pos – Position in the argument list.
  • value – Value of the argument.
void LSBlackBoxEvaluationPoint::setArgument(int pos, lsdouble value)

Sets the value of the argument at the given position. Only allowed if this argument is a double. Only allowed in state S_Stopped.

Parameters:
  • pos – Position in the argument list.
  • value – Value of the argument.
void LSBlackBoxEvaluationPoint::setReturnValue(lsint value)

Sets the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is an integer function. Only allowed in state S_Stopped.

Parameters:value – Return value of this point.
void LSBlackBoxEvaluationPoint::setReturnValue(lsdouble value)

Sets the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is a double function. Only allowed in state S_Stopped.

Parameters:value – Return value of this point.
template<typename IT>
void LSBlackBoxEvaluationPoint::setReturnValue(IT begin, IT end)

Sets the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is an array function. Only allowed in state S_Stopped.

Parameters:
  • IT – Type of an iterator referencing array values.
  • begin – Iterator to the beginning of the return values of this point.
  • end – Iterator to the end of the return values of this point.
bool LSBlackBoxEvaluationPoint::isIntReturnValue()

Returns true if the black-box function associated with this evaluation point is an integer function, false otherwise. You can retrieve the value with LSBlackBoxEvaluationPoint::getIntReturnValue(). Only allowed in state S_Stopped.

Returns:True if the return value is an integer.
bool LSBlackBoxEvaluationPoint::isDoubleReturnValue()

Returns true if the black-box function associated with this evaluation point is a double function, false otherwise. You can retrieve the value with getDoubleReturnValue(). Only allowed in state S_Stopped.

Returns:True if the return value is a double.
bool LSBlackBoxEvaluationPoint::isArrayReturnValue()

Returns true if the black-box function associated with this evaluation point is an array function, false otherwise. You can retrieve the value with getArrayReturnValue(). Only allowed in state S_Stopped.

Returns:True if the return value is an array.
bool LSBlackBoxEvaluationPoint::isIntArgument(int pos)

Returns true if the argument at this given position is an integer, false otherwise. You can retrieve the value with getIntArgument(). Only allowed in state enumerator:S_Stopped.

Parameters:pos – Position in the argument list.
Returns:True if the argument at this given position is an integer.
bool LSBlackBoxEvaluationPoint::isDoubleArgument(int pos)

Returns true if the argument at this given position is a double, false otherwise. You can retrieve the value with getDoubleArgument(). Only allowed in state S_Stopped.

Parameters:pos – Position in the argument list.
Returns:True if the argument at this given position is a double.
lsint LSBlackBoxEvaluationPoint::getIntArgument(int pos)

Returns the value of the argument at the given position. Only allowed if this argument is an integer or a boolean. Only allowed in state S_Stopped.

Parameters:pos – Position in the argument list.
Returns:Value of the argument.
lsdouble LSBlackBoxEvaluationPoint::getDoubleArgument(int pos)

Returns the value of the argument at the given position. Only allowed if this argument is a double. Only allowed in state S_Stopped.

Parameters:pos – Position in the argument list.
Returns:Value of the argument.
lsint LSBlackBoxEvaluationPoint::getIntReturnValue()

Returns the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is an integer function. Only allowed in state S_Stopped.

Returns:Return value of this point.
lsdouble LSBlackBoxEvaluationPoint::getDoubleReturnValue()

Returns the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is a double function. Only allowed in state S_Stopped.

Returns:Return value of this point.
LSArray LSBlackBoxEvaluationPoint::getArrayReturnValue()

Returns the return value of this evaluation point. Only allowed if the black-box function associated with this evaluation point is an array function. Only allowed in state S_Stopped.

Returns:Return value of this point.