Originally posted by: SystemAdmin
Hello,
I am working on an optimisation problem using MILP. in this model, the value of H should be the biggest possible(i.e., 999999) and the value of E should be the smallest possible (i.e.,0.00001). the optimal solution lack of consistency when changing the value of H or E. Note that this formulation was tested using other software packages. Do I have to change any cplex configuration? Thanks!
here is the model:
int nbJobs = ...;
int nbMchs = ...;
range Jobs = 1..nbJobs;
range Mchs = 1..nbMchs;
dvar int Y
JobsJobsMchs in 0..1;
int H=9999999;
float E=0.0001;
int Processing
JobsMchs=...;
int Route JobsMchs=...;
dvar float+ Completion
JobsMchs;
minimize sum( iK in Jobs, j in Mchs : RouteiK[j]==nbMchs) Completion iK[j]/nbJobs;
subject to {
forall (i in Jobs, j in Mchs:Route[i][j]==1 )
ct1:
Completion [i][j]>=Processing [i][j];
forall( ik in Jobs,j in Mchs, l in Mchs: Routeik[l]==Routeik[j]+1 && Routeik[j]<=nbMchs && l!=j )
ct2:
Completionik[l]-Processingik[l] >= Completionik[j];
forall( pr in Jobs, j in Mchs, qs in Jobs: qs!=pr)
{
ct3:
Completionpr[j]- Completionqs[j]+H *(1- Yprqs[j]) >= Processingpr[j];
ct4:
Completionqs[j]-Completionpr[j] +H * Yprqs[j] >= Processingqs[j];
};
forall( pr in Jobs, j in Mchs,l in Mchs, w in Mchs, qs in Jobs: Routeqs[w]+1==Routeqs[j] && Routepr[l]+1==Routepr[j] && qs!=pr )
{
ct5:
Completionpr[l]- Completionqs[j]+H *(1- Yprqs[j]) >= E;
ct6:
Completionqs[w]-Completionpr[j] +H * Yprqs[j] >= E;
};
}
here is data example:
nbJobs = 4;
nbMchs = 3;
Processing =
[ 40, 100 ,36,
65, 45 , 98,
212,73 , 32,
35,65 , 55] ;
Route =
[ 1, 2, 3,
2, 1, 3,
1, 2, 3,
3, 2, 1] ;
#CPLEXOptimizers#DecisionOptimization