The set partitioning problem (SPP) is the problem of exactly covering, at a minimal cost, the rows of an m×n binary matrix by subsetting its columns. Applications include airline crew scheduling, switching theory, and line balancing. For example, consider a crew scheduling problem in which a given airline must assign one and only one flight crew to each flight. A column is created for each feasible schedule for a single crew, and there is an associated cost with having the crew fly that schedule. An optimal schedule is chosen, minimizing cost.
The set partitioning problem can be formulated as:
Minimize the cost, Σj cj xj , such that Σj Aij xj = 1 , for i=1, 2, ... , m and j=1, 2, ... , n
where cj are non-negative cost values, xj = {0,1}, and A is an m×n matrix with elements aij = {0,1}.
The following DATA step uses data taken from Chu and Beasley (1998). A complete listing of the data lines can be found here. The input data contains the cost for each column of the problem.
data sppaa01t; input cost rowIndex columnIndex; datalines; 971 1 1 971 2 1 971 3 1 971 4 1 971 5 1 971 6 1 203 7 2 203 8 2 ... more datalines ... ;
The following statements solve the set partitioning problem. The indexed set, cost, is defined for each binary decision variable, x. The objective function, z, minimizes the cost. The constraint, partition, declares the constraint that Ax = 1. The mixed integer linear programming solver (MILP) in PROC OPTMODEL is able to solve this large problem with 8,904 binary variables and 823 linear constraints.
proc optmodel; set <num,num> pair; num cost {pair}; set RSET = setof {<i,j> in pair} i; set CSET = setof {<i,j> in pair} j; read data sppaa01t into pair=[rowIndex columnIndex] cost; var x {CSET} binary; min z = sum{<i,j> in pair} cost[i,j] * x[j]; constraint partition{i in RSET}: sum{<(i),j> in pair} x[j] = 1; solve with milp; quit;
The above statements produce the following "Problem Summary" and "Solution Summary" tables. In the "Solution Summary" table, the Objective Value, 445341, is the minimum cost of covering the rows by subsetting the columns.
Problem Summary | |
---|---|
Objective Sense | Minimization |
Objective Function | z |
Objective Type | Linear |
Number of Variables | 8904 |
Bounded Above | 0 |
Bounded Below | 0 |
Bounded Below and Above | 8904 |
Free | 0 |
Fixed | 0 |
Binary | 8904 |
Integer | 0 |
Number of Constraints | 823 |
Linear LE (<=) | 0 |
Linear EQ (=) | 823 |
Linear GE (>=) | 0 |
Linear Range | 0 |
Solution Summary | |
---|---|
Solver | MILP |
Objective Function | z |
Solution Status | Optimal |
Objective Value | 445341 |
Iterations | 158680 |
Nodes | 1452 |
Relative Gap | 0.0000920728 |
Absolute Gap | 41 |
Primal Infeasibility | 8.149037E-14 |
Bound Infeasibility | 2.098322E-13 |
Integer Infeasibility | 3.153033E-13 |
__________
P.C. Chu and J.E. Beasley (1998), "Constraint handling in genetic algorithms: the set partitioning problem," Journal of Heuristics, 4, 323-357.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/OR | z/OS | ||
OpenVMS VAX | ||||
Microsoft® Windows® for 64-Bit Itanium-based Systems | ||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | ||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | ||||
Microsoft Windows XP 64-bit Edition | ||||
Microsoft® Windows® for x64 | ||||
OS/2 | ||||
Microsoft Windows 7 | ||||
Microsoft Windows 95/98 | ||||
Microsoft Windows 2000 Advanced Server | ||||
Microsoft Windows 2000 Datacenter Server | ||||
Microsoft Windows 2000 Server | ||||
Microsoft Windows 2000 Professional | ||||
Microsoft Windows NT Workstation | ||||
Microsoft Windows Server 2003 Datacenter Edition | ||||
Microsoft Windows Server 2003 Enterprise Edition | ||||
Microsoft Windows Server 2003 Standard Edition | ||||
Microsoft Windows Server 2008 | ||||
Microsoft Windows XP Professional | ||||
Windows Millennium Edition (Me) | ||||
Windows Vista | ||||
64-bit Enabled AIX | ||||
64-bit Enabled HP-UX | ||||
64-bit Enabled Solaris | ||||
ABI+ for Intel Architecture | ||||
AIX | ||||
HP-UX | ||||
HP-UX IPF | ||||
IRIX | ||||
Linux | ||||
Linux for x64 | ||||
Linux on Itanium | ||||
OpenVMS Alpha | ||||
OpenVMS on HP Integrity | ||||
Solaris | ||||
Solaris for x64 | ||||
Tru64 UNIX |
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> Procedures ==> OPTMODEL Analytics ==> Mathematical Optimization |
Date Modified: | 2009-11-30 17:01:43 |
Date Created: | 2009-10-16 15:36:33 |