Hello everyone,
I want to know how to use CPLEX automatic tuning tool, I found the parameters to use https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXtuningSHORTDOC, but I am not sure how to use them.
I have tried the following code but I cannot find the output file for the parameters that CPLEX automatic tuning tool found
Sets i products / i0*i55 /
j suppliers / j0*j55 /
t time periods / t0*t55 /
sub_j(j) dynamic subset for j
sub_t(t) dynamic subset for t
sub_i(i) dynamic subset for i ;
Alias ( k , t ) ;
Parameter D( i , t ) demand of product ;
Parameter C( i , j ) porduction capacity ;
Parameter P( i , j ) purchase price ( $ per unit );
Parameter H( i ) product-dependent holding cost ( $ per unit ) ;
Parameter O( j ) supplier-dependent ordering cost ( $ per unit ) ;
Variables x ( i , j , t )
y ( j , t )
R( i , t )
cost ;
Positive Variables x ,R;
Binary Variable y ;
Equations obj objective function
con1 ( i , t )
con2 ( i , j , t ) feasibility constraint
obj ..
cost =E= sum ( ( sub_i(i) , sub_j(j) , sub_t(t) ) ,P( i , j )* x ( i , j , t ))+sum ( ( sub_j(j) , sub_t(t) ) ,O( j )* y ( j , t ) )
+ sum ( ( sub_i(i) , sub_t(t) ) ,H( i ) * ( sum ( k$ ( ord ( t ) GE ord ( k ) ) , sum ( sub_j(j) , x ( i , j , k))-D( i , k ) ) ) ) ;
con1 ( sub_i(i) , sub_t(t) ) .. R( i , t ) =E= sum ( k$ ( ord ( t ) GE ord ( k ) ) , sum ( sub_j(j) , x ( i , j , k))-D( i , k ) ) ;
con2 ( sub_i(i) , sub_j(j) , sub_t(t) ) .. C( i , j )* y ( j , t ) - x ( i , j , t ) =G= 0 ;
display "---------------------formulation ----------------------";
File fopt / cplex.opt /;
$onEcho > cplex.op3
tuning 'cplex.op2'
tuningdettilim 1000000
$offEcho
putClose fopt;
option optcr =0;
option limrow =0;
option limcol =0;
option reslim =1800;
option solveLink = %solveLink.loadLibrary%;
Model mymodel /all/;
option savepoint = 6;
Scalar cpxOptFile;
put_utility 'gdxin' / 'path\data.gdx';
execute_load D, P, C, H, O, Pr, sub_i, sub_j,sub_t;
Execute_unload;
mymodel .optFile = 3;
Solve mymodel minimizing cost using mip ;
Any help would be appreciated,
Thanks