1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
59
60 proc optmodel;
61
62 set CLIENT={'BO','BR','CO','HA','MN','NA','NH','NL','PO','PR','SP','WO'};
63 SET DISTCENTER={'BO','NA','PR','SP','WO'};
64
65 NUMBER DEMAND{CLIENT}=[425 12 43 125 110 86 129 28 66 320 220 182];
66 NUMBER COST{CLIENT,DISTCENTER}=[
67 0 37 42 82 34
68 93 65 106 59 68
69 69 33 105 101 72
70 98 103 73 27 66
71 55 20 92 93 60
72 37 0 72 79 41
73 128 137 94 63 98
74 95 113 57 57 71
75 62 48 104 127 85
76 42 72 0 68 38
77 82 79 68 0 47
78 34 41 38 47 0];
79 NUMBER FCOST{DISTCENTER}=[10000 10000 10000 10000 10000];
80
81 VAR X{CLIENT,DISTCENTER} INTEGER>=0;
82 VAR Y{DISTCENTER}BINARY;
83
84 MINIMIZE TOTALCOST=SUM{I IN CLIENT}SUM{J IN DISTCENTER}X[I,J]*COST[I,J]+SUM{J IN CLIENT}Y[J]*FCOST[J];
85
86 CON DEMANDCONST {I IN CLIENT}:SUM{J IN DISTCENTER}X[I,J]>=DEMAND[I];
87 CON LINKING {J IN DISTCENTER}:SUM{I IN CLIENT}X[I,J]-20000*Y[J]<=0;
88 CON MIN: SUM{J IN DISTCENTER}Y[J]>=1;
89 CON MAX: SUM{J IN DISTCENTER}Y[J]<=1;
90
91 SOLVE;
NOTE: Problem generation will use 2 threads.
ERROR: The array subscript 'Y[BR]' is invalid at line 84 column 89.
NOTE: Unable to create problem instance due to previous errors.
92
93 PRINT Y X TOTALCOST;
ERROR: The array subscript 'Y[BR]' is invalid at line 84 column 89.
94
95 QUIT;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE OPTMODEL used (Total process time):
real time 0.04 seconds
user cpu time 0.05 seconds
system cpu time 0.00 seconds
memory 2081.15k
OS Memory 27040.00k
Timestamp 05/19/2017 09:32:35 PM
Step Count 64 Switch Count 163
Page Faults 0
Page Reclaims 181
Page Swaps 0
Voluntary Context Switches 641
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 344
96
97
98 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;