The INTPOINT Procedure |
In some models, you may want a node to be either a supply or demand node but you want the node to supply or demand the optimal number of flow units. To indicate that a node is such a supply node, use a missing S value in the SUPPLY list variable in the ARCDATA= data set or the SUPDEM list variable in the NODEDATA= data set. To indicate that a node is such a demand node, use a missing D value in the DEMAND list variable in the ARCDATA= data set or the SUPDEM list variable in the NODEDATA= data set.
Suppose the oil example in the section "Introductory NPSC Example" is changed so that crude oil can be obtained from either the Middle East or U.S.A. in any amounts. You should specify that the node middle east is a supply node, but you do not want to stipulate that it supplies 100 units, as before. The node u.s.a. should also remain a supply node, but you do not want to stipulate that it supplies 80 units. You must specify that these nodes have missing S supply capabilities:
title 'Oil Industry Example'; title3 'Crude Oil can come from anywhere'; data miss_s; missing S; input _node_&$15. _sd_; datalines; middle east S u.s.a. S servstn1 gas -95 servstn1 diesel -30 servstn2 gas -40 servstn2 diesel -15 ;
The following PROC INTPOINT run uses the same ARCDATA= and CONDATA= data sets used in the section "Introductory NPSC Example":
proc intpoint bytes=100000 nodedata=miss_s /* the supply (missing S) and */ /* demand data */ arcdata=arcd1 /* the arc descriptions */ condata=cond1 /* the side constraints */ conout=solution; /* the solution data set */ run; proc print; var _from_ _to_ _cost_ _capac_ _lo_ _flow_ _fcost_; sum _fcost_; run;
The following messages appear on the SAS log:
NOTE: Number of nodes= 14 . NOTE: Number of supply nodes= 2 . NOTE: Of these, 2 have unspecified (.S) supply capability. NOTE: Number of demand nodes= 4 . NOTE: Total supply= 0 , total demand= 180 . NOTE: Number of arcs= 18 . NOTE: Number of <= side constraints= 0 . NOTE: Number of == side constraints= 2 . NOTE: Number of >= side constraints= 2 . NOTE: Number of side constraint coefficients= 8 . NOTE: The following messages relate to the equivalent Linear Programming problem solved by the Interior Point algorithm. NOTE: Number of <= constraints= 0 . NOTE: Number of == constraints= 17 . NOTE: Number of >= constraints= 2 . NOTE: Number of constraint coefficients= 48 . NOTE: Number of variables= 20 . NOTE: After preprocessing, number of <= constraints= 0. NOTE: After preprocessing, number of == constraints= 7. NOTE: After preprocessing, number of >= constraints= 2. NOTE: The preprocessor eliminated 10 constraints from the problem. NOTE: The preprocessor eliminated 23 constraint coefficients from the problem. NOTE: After preprocessing, number of variables= 11.
NOTE: The preprocessor eliminated 9 variables from the problem. 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 16 nonzero elements in A * A transpose. NOTE: Of the 9 rows and columns, 4 are sparse. NOTE: There are 11 nonzero superdiagonal elements in the sparse rows of the factored A * A transpose. This includes fill-in. NOTE: There are 5 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. NOTE: Bound feasibility attained by iteration 1. NOTE: Dual feasibility attained by iteration 1. NOTE: Constraint feasibility attained by iteration 2. NOTE: The Primal-Dual Predictor-Corrector Interior Point algorithm performed 7 iterations. NOTE: Objective = 50075. NOTE: The data set WORK.SOLUTION has 18 observations and 10 variables. NOTE: There were 18 observations read from the data set WORK.ARCD1. NOTE: There were 6 observations read from the data set WORK.MISS_S. NOTE: There were 4 observations read from the data set WORK.COND1.
The CONOUT= data set is shown in Figure 2.11.
The optimal supplies of nodes middle east and u.s.a. are 30 and 150 units, respectively. For this example, the same optimal solution is obtained if these nodes had supplies less than these values (each supplies 1 unit, for example) and the THRUNET option was specified in the PROC INTPOINT statement. With the THRUNET option active, when total supply exceeds total demand, the specified nonmissing demand values are the lowest number of flow units that must be absorbed by the corresponding node. This is demonstrated in the following PROC INTPOINT run. The missing S is most useful when nodes are to supply optimal numbers of flow units and it turns out that for some nodes, the optimal supply is 0.
data miss_s_x; missing S; input _node_&$15. _sd_; datalines; middle east 1 u.s.a. 1 servstn1 gas -95 servstn1 diesel -30 servstn2 gas -40 servstn2 diesel -15 ; proc intpoint bytes=100000 thrunet nodedata=miss_s_x /* No supply (missing S) */ arcdata=arcd1 /* the arc descriptions */ condata=cond1 /* the side constraints */ conout=solution; /* the solution data set */ run; proc print; var _from_ _to_ _cost_ _capac_ _lo_ _flow_ _fcost_; sum _fcost_; run;
The following messages appear on the SAS log. Note that the Total supply= 2, not 0 as in the last run:
NOTE: Number of nodes= 14 . NOTE: Number of supply nodes= 2 . NOTE: Number of demand nodes= 4 . NOTE: Total supply= 2 , total demand= 180 . NOTE: Number of arcs= 18 . NOTE: Number of <= side constraints= 0 . NOTE: Number of == side constraints= 2 . NOTE: Number of >= side constraints= 2 . NOTE: Number of side constraint coefficients= 8 . NOTE: The following messages relate to the equivalent Linear Programming problem solved by the Interior Point algorithm. NOTE: Number of <= constraints= 0 . NOTE: Number of == constraints= 17 . NOTE: Number of >= constraints= 2 . NOTE: Number of constraint coefficients= 48 . NOTE: Number of variables= 20 . NOTE: After preprocessing, number of <= constraints= 0. NOTE: After preprocessing, number of == constraints= 7. NOTE: After preprocessing, number of >= constraints= 2. NOTE: The preprocessor eliminated 10 constraints from the problem. NOTE: The preprocessor eliminated 23 constraint coefficients from the problem. NOTE: After preprocessing, number of variables= 11. NOTE: The preprocessor eliminated 9 variables from the problem. 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 16 nonzero elements in A * A transpose. NOTE: Of the 9 rows and columns, 4 are sparse. NOTE: There are 11 nonzero superdiagonal elements in the sparse rows of the factored A * A transpose. This includes fill-in. NOTE: There are 5 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. NOTE: Bound feasibility attained by iteration 1. NOTE: Dual feasibility attained by iteration 1. NOTE: Constraint feasibility attained by iteration 2. NOTE: The Primal-Dual Predictor-Corrector Interior Point algorithm performed 7 iterations. NOTE: Objective = 50075. NOTE: The data set WORK.SOLUTION has 18 observations and 10 variables. NOTE: There were 18 observations read from the data set WORK.ARCD1. NOTE: There were 6 observations read from the data set WORK.MISS_S_X. NOTE: There were 4 observations read from the data set WORK.COND1.
If total supply exceeds total demand, any missing S values are ignored. If total demand exceeds total supply, any missing D values are ignored.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.