HxEvaluationPoint Class

class HxEvaluationPoint

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 optimizer 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 optimizer to drive the solution process. You must be careful about the data you provide: if an incorrect value is given, the optimizer may have an unexpected behavior.

See:

HxSurrogateParameters::createEvaluationPoint()

See:

HxSurrogateParameters::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 HxEvaluationPoint::addArgument(hxint 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 HxEvaluationPoint::addArgument(hxdouble 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 HxEvaluationPoint::setArgument(int pos, hxint 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 HxEvaluationPoint::setArgument(int pos, hxdouble 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 HxEvaluationPoint::setReturnValue(hxint 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 HxEvaluationPoint::setReturnValue(hxdouble 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 HxEvaluationPoint::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 HxEvaluationPoint::isIntReturnValue()

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

Returns:

True if the return value is an integer.

bool HxEvaluationPoint::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 HxEvaluationPoint::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 HxEvaluationPoint::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 HxEvaluationPoint::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.

hxint HxEvaluationPoint::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.

hxdouble HxEvaluationPoint::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.

hxint HxEvaluationPoint::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.

hxdouble HxEvaluationPoint::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.

HxArray HxEvaluationPoint::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.