Skip to main content
FRAMES NO FRAMES

Class IloBoolVar

Definition file: ilconcert/iloexpression.h
Map of IloBoolVarIloBoolVarIloBoolVarIloIntVarIloIntExprArgIloNumExprArgIloExtractable
An instance of this class represents a constrained Boolean variable in a Concert Technology model.

Boolean variables are also known as binary decision variables. They can assume the values 0 (zero) or 1 (one).

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

What Is Extracted

An instance of IloBoolVar is extracted by IloSolver and IloCP as an instance of the class IlcIntVar that has a domain of [0..1].

An instance of IloBoolVar is extracted by IloCplex (documented in the CPLEX C++ API Reference Manual) as a column representing a numeric variable of type Bool with bounds as specified by IloBoolVar.

See Also:

Method Summary
public IloBoolVar(IloEnv env, IloInt min=0, IloInt max=1, const char * name=0)
public IloBoolVar(IloEnv env, const char * name)
public IloBoolVar(const IloAddNumVar & column, const char * name=0)
Inherited Methods from IloIntVar
getImpl, getLB, getMax, getMin, getUB, IloIntVar, IloIntVar, IloIntVar, IloIntVar, IloIntVar, IloIntVar, IloIntVar, IloIntVar, setBounds, setLB, setMax, setMin, setPossibleValues, setUB
Inherited Methods from IloIntExprArg
getImpl, IloIntExprArg, IloIntExprArg
Inherited Methods from IloNumExprArg
getImpl, IloNumExprArg, IloNumExprArg
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, IloExtractable, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, removeFromAll, setLocation, setName, setObject
Method Detail

IloBoolVar

public IloBoolVar(IloEnv env, IloInt min=0, IloInt max=1, const char * name=0)

This constructor creates a Boolean variable and makes it part of the environment env. By default, the Boolean variable assumes a value of 0 (zero) or 1 (one). By default, its name is the empty string, but you can specify a name of your own choice.


IloBoolVar

public IloBoolVar(IloEnv env, const char * name)

This constructor creates a Boolean variable and makes it part of the environment env. By default, its name is the empty string, but you can specify a name of your own choice.


IloBoolVar

public IloBoolVar(const IloAddNumVar & column, const char * name=0)

This constructor creates an instance of IloBoolVar like this:

IloNumVar(column, 0.0, 1.0, ILOBOOL, name);