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 12.5

Release notes

  • A new operator DISTINCT has been added.

New modeling operators

Distinct

Distinct operator accepts one or two operands. With one operand, the operator takes an array and returns the unordered set of distinct values in the array. With two operands, it takes as input a collection or interval 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.

API Changes

Python

C++

C#

Java

  • 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.