Hi I have this code below. trying to pick "p" number of facilities from a list of facilities. this works perfectly fine when I have p as 70 but when I change it to 60 it returns infeasibility. I want to identify which constraint/customer is causing it so that I can make necessary changes. I tried IIS=TRUE but it did not help. Earlier SAS used to give me which customer was causing infeasibility and i added fixes to it. Now I am not sure what causes infeasibility. Any help? proc optmodel;
set DIMS=1..2;
set CUSTOMERS;
set FACILITIES;
num a {CUSTOMERS,DIMS};
num demand {CUSTOMERS};
num f {FACILITIES,DIMS};
num SiteCapacity {FACILITIES};
str FacilitySiteName {FACILITIES};
num p=70; /*Set how many Facilities you want to be OPENED*/
read data ISURGCUS.COGcustomers into CUSTOMERS=
[_N_] {d in DIMS} <a[_N_,d]=col('a'||d)> demand;
read data ISURGCUS.cogExistingFacilities into FACILITIES=
[_N_] {d in DIMS} <f[_N_,d]=col('f'||d)>FacilitySiteName;
str SiteState{CUSTOMERS};
read data ISURGCUS.COGcustomers into CUSTOMERS=
[_N_] {d in DIMS} <a[_N_,d]=col('a'||d)> SiteState ;
**print a;
**print SiteState;
**print FacilitySiteName;
**print demand;
/*str SiteRegion{CUSTOMERS};
read data STDOPT.COGMODELINGDATA intP CUSTOMERS=
[_N_] {d in DIMS} <a[_N_,d]=col('a'||d)> SiteRegion ;
str SiteComment1{CUSTOMERS};
read data STDOPT.COGMODELINGDATA into CUSTOMERS=
[_N_] {d in DIMS} <a[_N_,d]=col('a'||d)> SiteComment1;*/
/* distance from customer i to facility j */
num dist {i in CUSTOMERS, j in FACILITIES}
= GEODIST(a[i,1],a[i,2],f[j,1],f[j,2],'M');
set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] <= 120};
var Assign {CUSTOMERS_FACILITIES} binary;
var Build {FACILITIES} binary;
min Cost
= sum {<i,j> in CUSTOMERS_FACILITIES} dist[i,j] * Assign[i,j]*demand[i];
/* each customer assigned to exactly one site */
con assign_def {i in CUSTOMERS}:
sum {<(i),j> in CUSTOMERS_FACILITIES} Assign[i,j] = 1;
/* if customer i assigned to site j, then facility must be built at j */
con link {<i,j> in CUSTOMERS_FACILITIES}:
Assign[i,j] <= Build[j];
/* each site can handle at most &SiteCapacity demand */
/*con capacity {j in FACILITIES}:
sum {<i,(j)> in CUSTOMERS_FACILITIES} demand[i] * Assign[i,j] <=
SiteCapacity[j] * Build[j];*/
con Have_This_Many_FAC_OPEN: Sum{j in FACILITIES} Build[j] <=p;
/* solve the MILP */
solve with milp /timetype=real; This is the error message as well solve with milp /timetype=real;
NOTE: Problem generation will use 4 threads.
NOTE: The problem has 7341 variables (0 free, 0 fixed).
NOTE: The problem has 7341 binary and 0 integer variables.
NOTE: The problem has 7582 linear constraints (6937 LE, 645 EQ, 0 GE, 0 range).
NOTE: The problem has 21213 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The initial MILP heuristics are applied.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 90 variables and 91 constraints.
NOTE: The MILP presolver removed 199 constraint coefficients.
NOTE: The MILP presolver modified 0 constraint coefficients.
NOTE: The presolved problem has 7251 variables, 7491 constraints, and 21014 constraint coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
Node Active Sols BestInteger BestBound Gap Time
0 1 0 . 207564 . 0
0 1 0 . 207564 . 0
NOTE: Infeasible.
... View more