ForAllSets Class

Forall sets expression of a constraint defining its expansion.

Consider for instance the following big-m constraint.

C#
Constraint xyRelation =
    key("x-y relation")
    | "capacity of a location can be used only if it is opened"
    | forall(p)
    | x[p] <= M * y[p];
where "p" is a set defining the potential locations. This constraint will be generated for each element of the set "p"; i.e., for each potential location.

Definition

Namespace: Orx.MathProg
Assembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
C#
public class ForAllSets
Inheritance
Object    ForAllSets

Methods

Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

Operators

BitwiseOr(ForAllSets, ConstraintExpr) Creates a constraint with forall sets expression on the left-hand-side of the pipe operator; and the constraint expression on the right hand side.

Three examples with different levels of documentation details are provided below.

C#
// no details:
Constraint xyRelation = 
    forall(p)
    | x[p] <= M * y[p];

// with key
Constraint xyRelation =
    key("x-y relation")
    | forall(p)
    | x[p] <= M * y[p];

// with key and definition
Constraint xyRelation =
    key("x-y relation")
    | "capacity of a location can be used only if it is opened"
    | forall(p)
    | x[p] <= M * y[p];

See Also