Hexaly Optimizer 15.0¶
Release notes
- Adds new parameter
gapLimitas a termination criterion. - Gradients can now be provided for differentiable external functions that return a double value.
- The Python API now includes type annotations.
- The minimum required version to use the Python API is now Python 3.8. Support for Python 3.6 and 3.7 has been discontinued.
- .NET Standard 2.0 is now required to use the C# API. Support for .NET Framework prior to 4.6.1 has been discontinued.
New parameter¶
HxParam.gapLimit¶
Optimality gap used as a termination criterion. When the solver detects that the current gap is below this limit, the current solution is considered optimal.
Double external functions with gradients¶
For external functions returning a double value and known to be differentiable, it is now possible to provide their gradients. See Providing gradients for more details.
Python type annotations¶
Python has historically been a dynamically typed language. However, for several years now, Python has supported annotations that enable static code verification.
The Python API in Hexaly 15.0 now includes annotations on all public functions and classes. These are compatible with mypy and pylance/pyright. In addition, and to make the API easier to use in a typed code context, shortcuts for certain methods has been introduced.
For instance the method HxSolution.get_value() has also been adapted
into new specialized methods:
HxSolution.get_int_value()HxSolution.get_double_value()HxSolution.get_interval_value()HxSolution.get_array_value()HxSolution.get_collection_value()
Similar changes have been made to all methods in the API that could return a union of value types. For those who do not wish to code in Python using types, the existing methods remain unchanged and are in no way deprecated.
API Changes¶
Hexaly Modeler¶
- Added
hxGapLimitparameter - Added
doubleExternalFunction()overload
Python¶
- Added
HxParam.set_gap_limit()andHxParam.get_gap_limit()methods - Added
HxSolution.get_int_value()method - Added
HxSolution.get_double_value()method - Added
HxSolution.get_interval_value()method - Added
HxSolution.get_array_value()method - Added
HxSolution.get_collection_value()method - Added
HxSolution.set_int_value()method - Added
HxSolution.set_double_value()method - Added
HxSolution.set_interval_value()method - Added
HxExpression.get_int_value()method - Added
HxExpression.get_double_value()method - Added
HxExpression.get_interval_value()method - Added
HxExpression.get_array_value()method - Added
HxExpression.get_collection_value()method - Added
HxExpression.set_int_value()method - Added
HxExpression.set_double_value()method - Added
HxExpression.set_interval_value()method - Added
HxExpression.int_valueattribute - Added
HxExpression.double_valueattribute - Added
HxExpression.interval_valueattribute - Added
HxExpression.array_valueattribute - Added
HxExpression.collection_valueattribute - Added
HxArray.get_int_value()method - Added
HxArray.get_double_value()method - Added
HxArray.get_interval_value()method - Added
HxArray.get_array_value()method - Added
HxArray.get_collection_value()method - Added
HxExternalArgumentValues.get_int_value()method - Added
HxExternalArgumentValues.get_double_value()method - Added
HxExternalArgumentValues.get_interval_value()method - Added
HxExternalArgumentValues.get_array_value()method - Added
HxExternalArgumentValues.get_collection_value()method - Added a new method signature to
HxModel.create_double_external_function()
C++¶
- Added
HxParam::setGapLimit()andHxParam::getGapLimit()methods - Added
HxDoubleExternalGradientclass - Added new method signatures to
HxModel::createExternalFunctionandHxModel::externalFunction
C#¶
- Added
HxParam.SetGapLimitandHxParam.GetGapLimitmethods - Added
HxDoubleExternalGradientdelegate - Added new method signatures to
HxModel.CreateDoubleExternalFunctionandHxModel.DoubleExternalFunction
Java¶
- Added
HxParam.setGapLimitandHxParam.getGapLimitmethods - Added
HxDoubleExternalGradientinterface - Added new method signatures to
HxModel.createDoubleExternalFunctionandHxModel.doubleExternalFunction