LocalSolver 11.0¶
Sort operator¶
Sort operator takes a one-dimensional array of integers or doubles as input and returns an array sorted by ascending values. This operator is particularly useful to implement models involving medians or quantiles.
Black-box optimization¶
LocalSolver 11.0 introduces blackbox constraint management to complement the analytical constraints available since LocalSolver 10.0. Constraints can now be directly implemented in simulators or costly functions.
In addition, black-box functions have been merged with external functions.
This change is the beginning of a long-term effort to provide a single interface
for all kinds of blackbox and analytical optimization problems. As a result,
all references to blackbox objects have been removed from our APIs. However,
you still need to explicitly indicate if you want to enable surrogate modeling
for a particular function by calling the new method
LSExternalContext.enableSurrogateModeling().
External functions returning multiple values¶
External - and by extension blackbox functions (see previous point) - can now return multiple-values as one-dimensional array. This new feature is particularly useful for black-box optimization when a calculator or a simulator returns several values for the same calculation or for routing and scheduling problems when you have to return pairs of values (time windows for instance).
To create such functions, implement the new interfaces
LSIntArrayExternalFunction or LSDoubleArrayExternalFunction. Then create
your external function as usual. The individual values of your array are then
easily accessible by combining the CALL operator with the AT operator.
API Changes¶
Python¶
Added
LSOperator.SORToperator.Added
LSModel.sortto create sort expressions.Added
LSExternalContext.enable_surrogate_modelingto enable blackbox optimization on an external function.Added
LSModel.create_int_array_external_functionandLSModel.create_double_array_external_functionto create external functions that return multiple values as one-dimensional array.Removed LSOperator.BLACKBOX_FUNCTION operator.
Removed LSBlackBoxArgumentValues class.
Removed LSBlackBoxContext class replaced by
LSSurrogateParametersRename LSBlackboxEvaluationPoint to
LSEvaluationPoint.
C++¶
Added
O_Sortoperator.Added
LSModel::sortto create sort expressions.Added
LSExternalContext::enableSurrogateModelingto enable blackbox optimization on an external function.Extended
LSModel::createExternalFunctionto create external functions that return multiple values as one-dimensional array.Removed
O_BlackBoxFunctionoperator.Removed
LSBlackBoxArgumentValuesclass.Removed
LSBlackBoxContextclass replaced byLSSurrogateParametersRename
LSBlackboxEvaluationPointtoLSEvaluationPoint.
C#¶
Added
LSOperator.Sortoperator.Added
LSModel.Sortto create sort expressions.Added
LSExternalContext.EnableSurrogateModelingto enable blackbox optimization on an external function.Added
LSModel.CreateIntArrayExternalFunctionandLSModel.CreateDoubleArrayExternalFunctionto create external functions that return multiple values as one-dimensional array.Removed LSOperator.BlackBoxFunction operator.
Removed LSBlackBoxArgumentValues class.
Removed LSBlackBoxContext class replaced by
LSSurrogateParametersRename LSBlackboxEvaluationPoint to
LSEvaluationPoint.
Java¶
Added
LSOperator.Sortoperator.Added
LSModel.sortto create sort expressions.Added
LSExternalContext.enableSurrogateModelingto enable blackbox optimization on an external function.Added
LSModel.createIntArrayExternalFunctionandLSModel.createDoubleArrayExternalFunctionto create external functions that return multiple values as one-dimensional array.Removed
LSOperator.BlackBoxFunctionoperator.Removed
LSBlackBoxArgumentValuesclass.Removed
LSBlackBoxContextclass replaced byLSSurrogateParametersRename
LSBlackboxEvaluationPointtoLSEvaluationPoint.