FRAMES NO FRAMES

IloBestGenerate

public IloGoal IloBestGenerate(const IloEnv env, const IloNumVarArray vars, const IloChooseIntIndex=IloChooseFirstUnboundInt)
public IloGoal IloBestGenerate(const IloEnv env, const IloAnyVarArray vars, const IloChooseAnyIndex=IloChooseFirstUnboundAny)
public IloGoal IloBestGenerate(const IloEnv env, const IloAnyVarArray vars, const IloChooseAnyIndex choose, const IloAnyValueSelector select)
public IloGoal IloBestGenerate(const IloEnv env, const IloNumVarArray vars, const IloChooseIntIndex choose, const IloIntValueSelector select)
public IloGoal IloBestGenerate(const IloEnv env, const IloNumSetVarArray vars, const IloChooseIntSetIndex=IloChooseFirstUnboundIntSet)
public IloGoal IloBestGenerate(const IloEnv env, const IloAnySetVarArray vars, const IloChooseAnySetIndex=IloChooseFirstUnboundAnySet)
public IloGoal IloBestGenerate(const IloEnv env, const IloNumSetVarArray v, const IloChooseIntSetIndex i, const IloIntSetValueSelector s)
public IloGoal IloBestGenerate(const IloEnv env, const IloAnySetVarArray v, const IloChooseAnySetIndex i, const IloAnySetValueSelector s)
Definition file: ilsolver/ilosolverint.h
Include file: <ilsolver/ilosolver.h>

This function creates and returns a goal, using the criterion indicated by choose and the search selector indicated by select. This goal is part of the enumeration algorithm available in an instance of IloSolver. It enables you to set parameters for choosing the order in which variables are tried during the search for a solution.

This goal binds each constrained variable in its argument vars. It does so by calling the function IloBestInstantiate for each of them. You control the order in which the variables are bound by means of the criterion choose. The argument select is passed to each call to IloBestInstantiate, if that argument is provided.

The goal returned by this function differs from the goal returned by IloGenerate: this one calls IloBestInstantiate, which tries only one value for each variable, whereas IloGenerate calls IloInstantiate, which may try all values in the domain of each variable.

When this function takes an instance of the class IloEnv as a parameter, it returns an instance of IloGoal for use with the member functions IloSolver::startNewSearch and IloSolver::solve. An instance of IloSolver extracts the goal that it returns as an instance of IlcGoal for use during a Solver search.

This function works on numerical variables of type Float and type Int.

See Also: