|
Chapter Contents |
Previous |
Next |
| The INTPOINT Procedure |
You can verify that the FACT2 MAR GIZMO constraint has a left-hand-side activity of 3,470, which is not equal to the _RHS_ of this constraint. Not all of the 3,750 chips that can be supplied to factory 2 for March production are used. It is suggested that all the possible chips be obtained in March and those not used be saved for April production. Because chips must be kept in an air-controlled environment, it costs one dollar to store each chip purchased in March until April. The maximum number of chips that can be stored in this environment at each factory is 150. In addition, a search of the parts inventory at factory 1 turned up 15 chips available for their March production.
Nonarc variables are used in the side constraints that handle the limitations of supply of Gizmo chips. A nonarc variable called f1 unused mar has as a value the number of chips that are not used at factory 1 in March. Another nonarc variable, f2 unused mar, has as a value the number of chips that are not used at factory 2 in March. f1 chips from mar has as a value the number of chips left over from March used for production at factory 1 in April. Similarly, f2 chips from mar has as a value the number of chips left over from March used for April production at factory 2 in April. The last two nonarc variables have objective function coefficients of 1 and upper bounds of 150. The Gizmo side constraints are
3*prod f1 19 mar + 4*prod f1 25 mar + f1 unused chips = 2615 3*prod f2 19 apl + 4*prod f2 25 apl + f2 unused chips = 3750 3*prod f1 19 apl + 4*prod f1 25 apl - f1 chips from mar = 2600 3*prod f2 19 apl + 4*prod f2 25 apl - f2 chips from mar = 3750 f1 unused chips + f2 unused chips - f1 chips from mar - f2 chips from mar >= 0
The last side constraint states that the number of chips not used in March is not less than the number of chips left over from March and used in April. Here, this constraint is called CHIP LEFTOVER.
The following SAS code creates a new data set containing constraint data. It seems that most of the constraints are now equalities, so you specify DEFCONTYPE=EQ in the PROC INTPOINT statements from now on and provide constraint type data for constraints that are not "equal to" type, using the default TYPEOBS value _TYPE_ as the _COLUMN_ variable value to indicate observations that contain constraint type data. Also, from now on, the default RHSOBS value is used:
title2 'Nonarc Variables in the Side Constraints';
data con6;
input _column_ &$17. _row_ &$15. _coef_ ;
datalines;
prod f1 19 mar FACT1 MAR GIZMO 3
prod f1 25 mar FACT1 MAR GIZMO 4
f1 unused chips FACT1 MAR GIZMO 1
_RHS_ FACT1 MAR GIZMO 2615
prod f2 19 mar FACT2 MAR GIZMO 3
prod f2 25 mar FACT2 MAR GIZMO 4
f2 unused chips FACT2 MAR GIZMO 1
_RHS_ FACT2 MAR GIZMO 3750
prod f1 19 apl FACT1 APL GIZMO 3
prod f1 25 apl FACT1 APL GIZMO 4
f1 chips from mar FACT1 APL GIZMO -1
_RHS_ FACT1 APL GIZMO 2600
prod f2 19 apl FACT2 APL GIZMO 3
prod f2 25 apl FACT2 APL GIZMO 4
f2 chips from mar FACT2 APL GIZMO -1
_RHS_ FACT2 APL GIZMO 3750
f1 unused chips CHIP LEFTOVER 1
f2 unused chips CHIP LEFTOVER 1
f1 chips from mar CHIP LEFTOVER -1
f2 chips from mar CHIP LEFTOVER -1
_TYPE_ CHIP LEFTOVER 1
back f1 19 apl TOTAL BACKORDER 1
back f1 25 apl TOTAL BACKORDER 1
back f2 19 apl TOTAL BACKORDER 1
back f2 25 apl TOTAL BACKORDER 1
back f1 19 may TOTAL BACKORDER 1
back f1 25 may TOTAL BACKORDER 1
back f2 19 may TOTAL BACKORDER 1
back f2 25 may TOTAL BACKORDER 1
_TYPE_ TOTAL BACKORDER -1
_RHS_ TOTAL BACKORDER 50
;
The nonarc variables f1 chips from mar and f2 chips from mar have objective function coefficients of 1 and upper bounds of 150. There are various ways in which this information can be furnished to PROC INTPOINT. If there were a TYPE list variable in the CONDATA= data set, observations could be in the form:
_COLUMN_ _TYPE_ _ROW_ _COEF_ f1 chips from mar objfn . 1 f1 chips from mar upperbd . 150 f2 chips from mar objfn . 1 f2 chips from mar upperbd . 150
It is desirable to assign ID list variable values to all the nonarc variables:
data arc6;
set arc5;
drop oldcost oldfc oldflow _flow_ _fcost_ _status_ _rcost_;
data arc6_b;
input _name_ &$17. _cost_ _capac_ factory key_id $ ;
datalines;
f1 unused chips . . 1 chips
f2 unused chips . . 2 chips
f1 chips from mar 1 150 1 chips
f2 chips from mar 1 150 2 chips
;
proc append force
base=arc6 data=arc6_b;
proc intpoint
bytes=1000000
printlevel2=2
nodedata=node0 arcdata=arc6
condata=con6 defcontype=eq sparsecondata
conout=arc7;
run;
The following messages appear on the SAS log:
NOTE: Number of nodes= 20 .
NOTE: Number of supply nodes= 4 .
NOTE: Number of demand nodes= 4 .
NOTE: Total supply= 4350 , total demand= 4150 .
NOTE: Number of arcs= 64 .
NOTE: Number of nonarc variables= 4 .
NOTE: Number of <= side constraints= 1 .
NOTE: Number of == side constraints= 4 .
NOTE: Number of >= side constraints= 1 .
NOTE: Number of side constraint coefficients= 24 .
NOTE: The following messages relate to the equivalent
Linear Program solved by the Interior Point algorithm.
NOTE: Number of <= constraints= 1 .
NOTE: Number of == constraints= 25 .
NOTE: Number of >= constraints= 1 .
NOTE: Number of constraint coefficients= 160 .
NOTE: Number of variables= 72 .
NOTE: 2 columns, 0 rows and 2 coefficients were added to the problem
to handle unrestricted variables, variables that are
split, and constraint slack or surplus variables.
NOTE: There are 86 nonzero elements in A * A transpose.
NOTE: Of the 27 rows and columns, 16 are sparse.
NOTE: There are 102 nonzero superdiagonal elements in the sparse rows
of the factored A * A transpose. This includes fill-in.
NOTE: There are 160 operations of the form u[i,j]=u[i,j]-u[q,j]*u[q,i]/u[q,q]
to factorize the sparse rows of A * A transpose.
Iter Complem_aff Complem-ity Duality_gap Tot_infeasb Tot_infeasc Tot_infeasd
0 -1.000000 180211988 0.837584 55030 38331 44219
1 54358286 27998179 0.909216 4949.974964 3447.853782 6457.752523
2 9372834 2493303 0.657738 0 8.594938E-10 196.155157
3 360076 311567 0.192309 0 0 24.426434
4 133734 91250 0.064112 0 0 5.827344
5 66155 36320 0.026230 0 0 0
6 18053 8903.419999 0.006517 0 0 0
7 3897.577387 1910.615008 0.001402 0 0 0
8 847.313077 362.303033 0.000266 0 0 0
9 146.082127 45.122412 0.000033136 0 0 0
10 6.217057 0.574649 0.000000422 0 0 0
11 0.002810 0.000029061 2.152507E-11 0 0 0
NOTE: Primal-Dual Predictor-Corrector Interior point algorithm performed 11 iterations.
NOTE: Objective = -1295542.742.
NOTE: The data set WORK.ARC7 has 68 observations and 14 variables.
NOTE: There were 68 observations read from the data set WORK.ARC6.
NOTE: There were 8 observations read from the data set WORK.NODE0.
NOTE: There were 31 observations read from the data set WORK.CON6.
NOTE: The data set WORK.ARC7 has 68 observations and 14 variables.
The optimal solution data set, CONOUT=ARC7 in
Output 4.5.1 follow:
proc print data=arc7;
var _tail_ _head_ _name_ _cost_ _capac_ _lo_ _flow_ _fcost_;
sum _fcost_;
run;
Output 4.5.1: CONOUT=ARC7
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.