In this lesson, you will learn more about how to:
-
model with set variables
-
use the function
IloFunction
to define accessors
-
use the constraints
IloEqSum
, IloEqMin
, IloEqMax
, IloEqUnion
, and IloEqPartition
This chapter uses constraints on set variables to solve a configuration problem of how to fill tanks and configure them on trucks to meet customer orders for various products. One of the main advantages of set variables is that they facilitate object-oriented modeling of problem knowledge. A set variable is capable of representing one-to-many (that is, 1-N) relations between objects with a single variable. In that way, it is possible to encapsulate in a class all the attributes, relations, and constraints corresponding to a family of objects. You take advantage of that capability in the object model you design for this configuration problem.