Skip to main content
FRAMES NO FRAMES

operator||

public IloGoal operator||(const IloGoal g1, const IloGoal g2)
Definition file: ilcp/cp.h
Include file: <ilcp/cp.h>
Overloaded C++ operator.

This operator creates and returns a goal. This goal represents the disjunction (that is, logical OR) between its parameters, g1 and g2.

If you would like to represent the disjunction of two constraints (rather than two goals), then you should consider an instance of the class IloOr.

The returned goal can be used with 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:


operator||

public IlcConstraint operator||(const IlcConstraint ct1, const IlcConstraint ct2)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Overloaded C++ operator.

This function creates a constraint which enforces that at least one of ct1, and ct2 be satisfied.

A constraint needs to be added to an instance of IlcCPEngine (either directly, or indirectly) for it to take effect. Normally this is done through casting a constraint to a goal and using it in a choice point (IlcOr).

See Also:


operator||

public IloOr operator||(const IloConstraint constraint1, const IloConstraint constraint2)
Definition file: ilconcert/ilomodel.h
Overloaded C++ operator for a disjunctive constraint.

This overloaded C++ operator creates a disjunctive constraint that represents the disjunction of its two arguments. The constraint can represent a disjunction of two constraints; of a constraint and another disjunction; or of two disjunctions. In order to be taken into account, this constraint must be added to a model and extracted by an algorithm, such as IloCplex or IloSolver.