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.

LocalSolver 10.0

Release notes

  • The modeler API has been added to execute LSP programs in Python, C++, C# and Java.

  • The JSON module has been added to the LSP language to interact with JSON files and strings.

  • Black-box optimization offers new features that allow to add analytical constraints and evaluation points to black-box models.

  • The behavior of log writers methods have been changed.

  • Methods for copying an array or collection in a single call have been added in C# and Java to improve the performance of external functions.

Modeler API

The modeler API contains classes for interacting with the LSP virtual machine from your favorite language. This new API allows you to:

  • Load modules from existing LSP files, or create new ones, and execute them.

  • Interact with the variables of your LSP program. You can retrieve, set or create new variables from your favorite language that will be exposed to your LSP code. Numbers and strings are converted to their LSP equivalent, and array-like structures are converted to LSP maps.

  • Expose methods developped in your favorite language as LSP functions.

For more details about the modeler API, please check out the API reference in Python, C++, C# or Java.

JSON Module

The LSP language has now a JSON module. It allows you to read JSON content from a file or a string, and to convert JSON numbers, strings, arrays and objects into their LSP equivalent. It is also possible to write LSP values in a JSON file or a string.

For more details about the JSON module, please check out the documentation on JSON module in the standard library.

Black-box optimization

Black-box models can now be constrained with analytical constraints. It means that all LocalSolver operators can be used in a black-box model as in a classical one, except the operators refering to collection variables. Note that the constraints must not involve the black-box call.

Evaluation points can be added to a black-box model via the black-box context. An evaluation point is a point for which you know the coordinates and the return value of the black-box function. They can be used 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.

The return type of the black-box function can now be integer or double, instead of only double.

For more details about how to create a black-box model, please check out the black-box examples on the example tour page.

API Changes

LSP

  • Added the JSON module.

Python

  • Added the modeler package.

  • Added LSModel.create_int_blackbox_function() and LSModel.int_blackbox_function() to create integer black-box functions.

  • Added the LSBlackBoxEvaluationPoint class.

  • Added the following methods to create and manipulate evaluation points associated to a black-box function:

    • LSBlackBoxContext.create_evaluation_point()

    • LSBlackBoxContext.get_nb_evaluation_points()

    • LSBlackBoxContext.get_evaluation_point()

  • Changed the default return value of LSParam.get_log_writer() from None (which meant standard output) to sys.stdout.

  • Changed the behavior of LSParam.set_log_writer(None): it now disables logging whereas before it restored the standard output.

C++

  • Added the modeler package.

  • Added the LSBlackBoxEvaluationPoint class.

  • Added the following methods to create and manipulate evaluation points associated to a black-box function:

    • LSBlackBoxContext::createEvaluationPoint()

    • LSBlackBoxContext::getNbEvaluationPoints()

    • LSBlackBoxContext::getEvaluationPoint()

C#

  • Added the modeler package.

  • Added the delegate LSIntBlackBoxFunction.

  • Added LSModel.CreateIntBlackBoxFunction() and LSModel.IntBlackBoxFunction() to create integer black-box functions.

  • Added the LSBlackBoxEvaluationPoint class.

  • Added the following methods to create and manipulate evaluation points associated to a black-box function:

    • LSBlackBoxContext.CreateEvaluationPoint()

    • LSBlackBoxContext.GetNbEvaluationPoints()

    • LSBlackBoxContext.GetEvaluationPoint()

  • Changed the default return value of LSParam.GetLogWriter() from null (wich meant standard output) to Console.Out.

  • Changed the behavior of LSParam.SetLogWriter(null): it now disables logging whereas before it restored the standard output.

  • Added the following methods to copy all values of the concerned element to an array:

    If you need to access all the values of the element, these methods are recommended because they are more performant than a for-loop getting the values one by one.

Java

  • Added the modeler package.

  • Added the interface LSIntBlackBoxFunction.

  • Added LSModel.createIntBlackBoxFunction() and LSModel.intBlackBoxFunction() to create integer black-box functions.

  • Added the LSBlackBoxEvaluationPoint class.

  • Added the following methods to create and manipulate evaluation points associated to a black-box function:

    • LSBlackBoxContext.createEvaluationPoint()

    • LSBlackBoxContext.getNbEvaluationPoints()

    • LSBlackBoxContext.getEvaluationPoint()

  • Changed the default return value of LSParam.getLogWriter() from null (wich meant standard output) to System.out.

  • Changed the behavior of LSParam.setLogWriter(null): it now disables logging whereas before it restored the standard output.

  • Added the following methods to copy all values of the concerned element to an array:

    • LSArray.copyTo()

    • LSCollection.copyTo()

    • LSBlackBoxArgumentValues.copyTo()

    • LSExternalArgumentValues.copyTo()

    If you need to access all the values of the element, these methods are recommended because they are more performant than a for-loop getting the values one by one.