ilog.concert
Interface IloSemiContVar

All Superinterfaces:
IloNumExpr, IloNumVar

public interface IloSemiContVar
extends IloNumVar

Semi-continuous variables.

Objects implementing this interface represent constrained semi-continuous modeling variables. Semi-continuous variables implement the interface IloNumVar, the superinterface of numeric variables. In an instance of IloNumVar, lb or LB denotes the lower bound of the variable, and ub or UB denotes its upper bound. The upper bound need not be finite. In an instance of the derived interface IloSemiContVar, sclb or SCLB denotes the semi-continuous lower bound. The semi-continuous lower bound must not be negative. An attempt to assign a negative value to sclb will raise an error.

In formal terms, if lb <= 0, then a semi-continuous variable is a numeric variable with the feasible set of {0, [sclb, ub]}, where 0 < sclb < ub; otherwise, for other values of lb, the feasible set of a semi-continuous variable is the intersection of the interval [lb, ub] with the set {0, [sclb, ub]}. The semi-continuous lower bound sclb may differ from the lower bound of an ordinary numeric variable in that the semi-continuous variable is restricted to the semi-continuous region. For example, the following conditions declare the bounds of a semi-continuous variable and the corresponding feasible region, where square brackets denote a closed interval (that is, an interval including its endpoint).

When numerical bounds are given to an integer variable (such as an instance of IloIntVar or IloNumVar with Type = Int) in the constructors or via a modifier (such as setUB, setLB, setBounds), they are inwardly rounded to an integer value. UB is rounded down, and LB is rounded up.

With lb as the lower bound, ub as the upper bound, and sclb as the semi-continuous lower bound of the variable, the feasible region of a semi-continuous variable is defined like this:

{lb <= x <= ub: x >= sclb || x == 0}

As IloSemiContVar is an extension of IloNumVar, semi-continuous variables can appear wherever regular variables can appear; that is, as variables in expressions, in constraints, and so forth.

Semi-continuous variables are created by the methods IloMPModeler.semiContVar and IloMPModeler.semiContVarArray.

See Also:
IloMPModeler.semiContVar(double, double, ilog.concert.IloNumVarType), IloMPModeler.semiContVarArray(int, double, double, ilog.concert.IloNumVarType, java.lang.String[])

Method Summary
 double getSemiContLB()
          Returns the semi-continuous lower bound of the invoking IloSemiContVar.
 void setSemiContLB(double sclb)
          Sets the semi-continuous lower bound of the invoking IloSemiContVar to sclb.
 
Methods inherited from interface ilog.concert.IloNumVar
getLB, getName, getType, getUB, setLB, setName, setUB
 

Method Detail

getSemiContLB

public double getSemiContLB()
                     throws IloException
Returns the semi-continuous lower bound of the invoking IloSemiContVar.

Returns:
The semi-continuous lower bound of the invoking IloSemiContVar.
Throws:
IloException

setSemiContLB

public void setSemiContLB(double sclb)
                   throws IloException
Sets the semi-continuous lower bound of the invoking IloSemiContVar to sclb.

Parameters:
sclb - The new semi-continuous lower bound.
Throws:
IloException