solving a model with deferent solvers
Posted: Mon Jun 04, 2018 5:13 pm
Hello
I try to solve a model with deferent solver simultaneously. for example, with cplex, xpress, lindo.
My code is:
Scalar iter;
Parameter solution;
for(iter=1 to 1,
******************************************************
OPTION MIP=cplex;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "cplex solution is", solution;
******************************************************
OPTION MIP=xpress;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "xpress solution is", solution;
******************************************************
OPTION MIP=lindo;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "lindo solution is", solution;
);
Do you know the better way to code it?
Best regards
I try to solve a model with deferent solver simultaneously. for example, with cplex, xpress, lindo.
My code is:
Scalar iter;
Parameter solution;
for(iter=1 to 1,
******************************************************
OPTION MIP=cplex;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "cplex solution is", solution;
******************************************************
OPTION MIP=xpress;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "xpress solution is", solution;
******************************************************
OPTION MIP=lindo;
SOLVE FCTP USING MIP MIN obj;
if (FCTP.modelstat<>%modelstat.Optimal%,
abort 'no feasible solution for FCTP');
solution=obj.l;
DISPLAY "lindo solution is", solution;
);
Do you know the better way to code it?
Best regards