Originally posted by: HeiMue
Hi,
I try to put the mathematical formulation (see attached file) of the p-hub median problem into an opl model (see below). Unfortunately I always get the following error message:
CPLEX Error 1016: Restricted version. Problem size limits exceeded.
My data set (see attached file) is very small so I think there's an infinite loop.
.mod:
int NumberOfHubs = ...;
float Alpha = ...; //reduces the costs between hubs
int NumberOfLocations = ...;
range Locations = 0..NumberOfLocations - 1;
range PotentialHubs = 0..NumberOfLocations - 1;
float Flow
Locations, Locations = ...;
float CostPerUnit
Locations, Locations = ...;
dvar boolean Realized
PotentialHubs;
dvar boolean Transported
Locations, Locations, PotentialHubs, PotentialHubs;
minimize sum (i, j in Locations, k, m in PotentialHubs)
Flow[i][j] * Transported[i][j][k][m] *
(CostPerUnit[i][k] + (CostPerUnit[k][m] * Alpha) + CostPerUnit[m][j]);
subject to {
sum (k in PotentialHubs) Realized[k] == NumberOfHubs;
forall (i, j in Locations) sum (k, m in PotentialHubs) Transported[i][j][k][m] == 1;
forall (i, j in Locations, k, m in PotentialHubs) Transported[i][j][k][m] <= Realized[k];
forall (i, j in Locations, k, m in PotentialHubs) Transported[i][j][k][m] <= Realized[m];
}
.dat:
NumberOfHubs = 1;
Alpha = 0.5;
NumberOfStandorte = 4;
Flow = [
0, 1, 4, 1 1, 0, 1, 1 4, 1, 0, 1 1, 1, 1, 0] ;
CostPerUnit = [
0, 1, 1, 1 1, 0, 1, 1 1, 1, 0, 1 1, 1, 1, 0] ;
source of scanned papers: James F. Campbell: Integer programming formulations of discrete hub location problems; European Journal of Operational Research 72 (1994) 387-405#DecisionOptimization#OPLusingCPLEXOptimizer