Originally posted by: Hihi15
I use CPLEX to solve a series of inventory routing problems (which basically is a travelling salesman problem extended with an inventory component).
Each of the problem instances are linked by the fact that that the output (inventory level) of one instance is the input for the next instance (so in fact it is a simulation) All other parameters (and settings) remain the same.
The problem I encounter is that there is a very large variation in solving time.
While some instances take a few seconds each, other instances take a few hours each.
I understand that there could be some difference in solving time present due to the difference in inventory level, but I think a factor 1000 in solving time is a too large difference.
Any tips/suggestions/thoughts on what could be the reason for this and how to solve it?
Basically, the flow control script looks like:
main {
for (var tsim=1; tsim<=tsimlength; tsim+=1){
var source = new IloOplModelSource(".mod");
var cplex = new IloCplex();
var def = new IloOplModelDefinition(source);
var opl = new IloOplModel(def,cplex);
var data = new IloOplDataSource(".dat");
opl.addDataSource(data);
opl.generate();
if (cplex.solve()) {
writeln("OBJ = " + cplex.getObjValue());
}
else {
writeln("No solution");
}
opl.end();
data.end();
def.end();
cplex.end();
source.end();
}
}
#DecisionOptimization#OPLusingCPLEXOptimizer