LSBBEvaluationPoint Class

class localsolverblackbox.LSBBEvaluationPoint

An evaluation point associated with a native 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.

This information may be used by the solver to drive the solution process. The exact behaviour is implementation-defined and the solver may perform the exact same call a second time or ignore the values altogether.

Summary

Methods
add_argument Adds an argument with the given value.
set_returned_value Sets the returned value for this point.
get_argument Returns the value of the argument at the given position.
is_argument_int Returns True if the argument at the given position is an integer, False otherwise.
is_argument_double Returns True if the argument at the given position is a double, False otherwise.
set_argument Sets the value of the argument at the given position.
get_returned_value Gets the returned value for this point.

Instance methods

LSBBEvaluationPoint.add_argument(value)

Adds an argument with the given value. Only allowed in state LSBBState.STOPPED.

Parameters:value (int` or double) – Value of the argument
LSBBEvaluationPoint.set_returned_value(value)

Sets the returned value for this point. Only allowed in state LSBBState.STOPPED.

Parameters:value (double) – Returned value at this point
LSBBEvaluationPoint.get_argument(pos)

Returns the value of the argument at the given position. Only allowed in state LSBBState.STOPPED.

Parameters:pos (int) – Position in the argument list.
Returns:Value of the argument
Return type:int, double
LSBBEvaluationPoint.is_argument_int(pos)

Returns True if the argument at the given position is an integer, False otherwise. Only allowed in state LSBBState.STOPPED.

Parameters:pos (int) – Position in the argument list.
Return type:bool
LSBBEvaluationPoint.is_argument_double(pos)

Returns True if the argument at the given position is a double, False otherwise. Only allowed in state LSBBState.STOPPED.

Parameters:pos (int) – Position in the argument list.
Return type:bool
LSBBEvaluationPoint.set_argument(pos, value)

Sets the value of the argument at the given position. Only allowed in state LSBBState.STOPPED.

Parameters:
  • pos (int) – Position in the argument list.
  • value (int or double) – Value of the argument.
LSBBEvaluationPoint.get_returned_value()

Gets the returned value for this point. If the value was not set by the user, this defaults to NaN. Only allowed in state LSBBState.STOPPED.

Returns:Returned value for this evaluation point.
Return type:double