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.

LSEvaluationPoint Class

class LSEvaluationPoint

An evaluation point associated with an external function with surrogate modeling.

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:

LSSurrogateParameters::createEvaluationPoint()

See:

LSSurrogateParameters::getEvaluationPoint()

Since:

10.0

Summary

Functions

addArgument

Adds an integer argument with the given value.

addArgument

Adds a double argument with the given value.

setArgument

Sets the value of the argument at the given position.

setArgument

Sets the value of the argument at the given position.

setReturnValue

Sets the return value of this evaluation point.

setReturnValue

Sets the return value of this evaluation point.

setReturnValue

Sets the return value of this evaluation point.

isIntReturnValue

Returns true if the external function associated with this evaluation point is an integer function, false otherwise.

isDoubleReturnValue

Returns true if the external function associated with this evaluation point is a double function, false otherwise.

isArrayReturnValue

Returns true if the external 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 LSEvaluationPoint::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 states S_Modeling or S_Stopped.

Parameters:

value – Value of the argument.

void LSEvaluationPoint::addArgument(lsdouble value)

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

Parameters:

value – Value of the argument.

void LSEvaluationPoint::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 states S_Modeling or S_Stopped.

Parameters:
  • pos – Position in the argument list.

  • value – Value of the argument.

void LSEvaluationPoint::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 states S_Modeling or S_Stopped.

Parameters:
  • pos – Position in the argument list.

  • value – Value of the argument.

void LSEvaluationPoint::setReturnValue(lsint value)

Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an integer function. Only allowed in states S_Modeling or S_Stopped.

Parameters:

value – Return value of this point.

void LSEvaluationPoint::setReturnValue(lsdouble value)

Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is a double function. Only allowed in states S_Modeling or S_Stopped.

Parameters:

value – Return value of this point.

template<typename IT>
void LSEvaluationPoint::setReturnValue(IT begin, IT end)

Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an array function. Only allowed in states S_Modeling or 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 LSEvaluationPoint::isIntReturnValue()

Returns true if the external function associated with this evaluation point is an integer function, false otherwise. You can retrieve the value with LSEvaluationPoint::getIntReturnValue().

Returns:

True if the return value is an integer.

bool LSEvaluationPoint::isDoubleReturnValue()

Returns true if the external function associated with this evaluation point is a double function, false otherwise. You can retrieve the value with getDoubleReturnValue().

Returns:

True if the return value is a double.

bool LSEvaluationPoint::isArrayReturnValue()

Returns true if the external function associated with this evaluation point is an array function, false otherwise. You can retrieve the value with getArrayReturnValue().

Returns:

True if the return value is an array.

bool LSEvaluationPoint::isIntArgument(int pos)

Returns true if the argument at this given position is an integer, false otherwise. You can retrieve the value with getIntArgument().

Parameters:

pos – Position in the argument list.

Returns:

True if the argument at this given position is an integer.

bool LSEvaluationPoint::isDoubleArgument(int pos)

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

Parameters:

pos – Position in the argument list.

Returns:

True if the argument at this given position is a double.

lsint LSEvaluationPoint::getIntArgument(int pos)

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

Parameters:

pos – Position in the argument list.

Returns:

Value of the argument.

lsdouble LSEvaluationPoint::getDoubleArgument(int pos)

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

Parameters:

pos – Position in the argument list.

Returns:

Value of the argument.

lsint LSEvaluationPoint::getIntReturnValue()

Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an integer function.

Returns:

Return value of this point.

lsdouble LSEvaluationPoint::getDoubleReturnValue()

Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is a double function.

Returns:

Return value of this point.

LSArray LSEvaluationPoint::getArrayReturnValue()

Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an array function.

Returns:

Return value of this point.