Skip to main content
FRAMES NO FRAMES

IloGoalFail

public IloGoal IloGoalFail(const IloEnv)
Definition file: ilcp/cp.h
Include file: <ilcp/cp.h>
Returns a goal that always fails.

This function creates and returns a goal that always fails. It may be useful when you are searching for all possible ways to execute another goal. The idea is to try all possible subgoals of all choice points by calling this function after each successful execution of the other goal, thus causing backtracking in an instance of IloCP and launching the search for another execution.

When it takes an instance of the IBM® ILOG® Concert Technology class IloEnv as a parameter, it returns an instance of IloGoal for use with the member functions IloCP::startNewSearch and IloCP::solve. An instance of IloCP extracts the goal that it returns as an instance of IlcGoal for use during a custom search.

See Also: