Skip to main content
FRAMES NO FRAMES

IlcBestGenerate

public IlcGoal IlcBestGenerate(const IlcIntVarArray, IlcChooseIntIndex chooseVariable=IlcChooseFirstNonFixedInt)
public IlcGoal IlcBestGenerate(const IlcIntVarArray, IlcChooseIntIndex chooseVariable, IlcIntSelect select)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
A goal to assign values to the variables in an array.

CP Optimizer provides an enumeration algorithm with parameters that can be set for choosing the order in which variables are tried during the search for a solution. That enumeration algorithm is implemented by the functions IlcBestGenerate and IlcGenerate.

This goal binds each constrained variable in its argument array; it does so by calling the function IlcBestInstantiate for each of them. The order in which the variables are fixed is controlled by the function chooseIndex. The argument select is passed to each call to IlcBestInstantiate, if that argument is provided.

This goal differs from IlcGenerate since it calls IlcBestInstantiate which tries only one value.

See Also: