Originally posted by: far123
I have a axle relocation problem, which tries to find the most proper location for each axle to minimize the cost.
96 axles and 96 locations, respectively.
The constraints are very simple.
The only complicating part is the objective, which uses min() function.
Cplex cannot find a solution even with very long running time. Does anyone have experience on handling this kind fo objective function? You can find the OPL model below.
tuple axle{
key int axleId;
float relativeSmallDiam;
float diamError;
}
tuple bogie{
key string bogieId;
{int} locs;
}
{axle} axles = ...;
float rsDiams
j in axles = j.relativeSmallDiam;
float dError
j in axles = j.diamError;
{int} locations = ...;
{bogie} bogies = ...;
float unitWearCost = 30000/60;
dvar int AxleAlloc
locationsaxles in 0..1;
dexpr float TotalTruingAmount = sum(k in bogies)
sum(i in k.locs)
( (sum(j in axles) rsDiams[j]*AxleAlloc
item(locations,ord(locations,i))[j] -
min(p in k.locs) sum(q in axles) rsDiams[q]*AxleAlloc
item(locations,ord(locations,p))[q])*2
+ sum(j in axles) dError[j]*AxleAlloc
item(locations,ord(locations,i))[j]);
minimize unitWearCost * TotalTruingAmount+10;
subject to{
forall(i in locations)
sum(j in axles) AxleAlloc[i][j] == 1;
forall(j in axles)
sum(i in locations) AxleAlloc[i][j] == 1;
}
Thanks...
#DecisionOptimization#OPLusingCPLEXOptimizer