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.

Hexaly Optimizer 12.5

Modeling operators

Intersection

Intersection operator accepts two operands. The two operands can be either an array or a collection. The operator returns an unordered set composed of the values present in both operands. This operator can be used to quickly prevent several values to be in a set or list.

Distinct

Distinct operator accepts one or two operands. With one operand, the operator takes an array or a collection and returns the unordered set of distinct values in the array. With two operands, it takes as input a collection, an interval or an array and a lambda function, and returns the unordered set of distinct values among all the values returned by the function called on each element of the given collection or interval. This operator can be used to model scheduling problems with a limited number of products types to be produced by a machine.

Sort

The sort operator now accepts two operands. When a lambda fonction is specified as second argument, it is used as a key to sort the input array.

Array

Array operator can now take a list as a first operand and a lambda function as the second operand. The lambda function will be applied on each element of the list and will return an array.

Nary operators

Nary operators (max, min, sum, prod, and, or, xor) handle new type of operands. In addition to ranges and collections, nary operators can now take an array as a first operand and a lambda function as the second operand. Finally, they are now able to take only one operand: a collection or a 1D array. The operator will be applied on each element of the single operand.

API Changes

Python

C++

C#

Java

  • Added LSOperator.Intersection operator.

  • Added LSModel.Intersection to create intersection expressions.

  • Added LSOperator.Distinct operator.

  • Added LSModel.distinct to create distinct expressions.

  • Added a new method LSArray.isCollection to test if a value at a given position is a collection, and a new method LSArray.getCollectionValue to retrieve the collection value at a given position.

API requirement changes

Python

  • Drop Python 3.4 and Python 3.5 support.

C#

  • Added compatibility with macOS arm64 and Linux arm64.

  • macOS x64 and Linux x64 now require .NET 6.0 (or superior).

Platform dependencies changes

Linux

  • Requires libc 2.28 (or superior) and libstdc++ 6.0.25 (or superior).