Even though the model offers a solution, the model status is 3, which means Unbounded. There is therefore no optimal solution. This can be observed in various places :
in the process window (warning : it is not written in red), it is written as follows :
LP status(2): unbounded
in the results file in « Solution Report » :
**** MODEL STATUS 3 UNBOUNDED
then in the variables « SolVAR » for var MOS :
hiver . . +INF 6000 UNBND
finally, at the end of the « Report Summary » file :
**** Report Summary 0 NONOPT 0 INFEASIBLE 1 UNBOUNDED (UNBND)
Download the model solution : labour3.gms
The result parameter is written as follows :
Parameter RESULT(*,*);
RESULT(c,t) = X.L(c,t);
RESULT(‘Terre’, ‘Total’) = TERRE.L;
RESULT(‘Terre’, ‘Marginal’)=TERRE.M;
RESULT(‘Travail_Hiver’, ‘Total’) = TRAVAIL.L(‘hiver’);
RESULT(‘Travail_Hiver’, ‘Marginal’)= TRAVAIL.M(‘hiver’);
RESULT(‘Travail_Ete’, ‘Total’) = TRAVAIL.L(‘ete’);
RESULT(‘Travail_Ete’, ‘Marginal’)= TRAVAIL.M(‘ete’);
RESULT(‘MOS_Hiver’, ‘Total’)=MOS.L(‘hiver’);
RESULT(‘MOS_Ete’, ‘Total’)=MOS.L(‘ete’);
RESULT(‘Eau’, ‘Total’) = EAU.L;
RESULT(‘Eau’, ‘Marginal’)= EAU.M;
RESULT(c,’TOTAL’) = sum(t, X.L(c,t));
RESULT(‘StatutDuModele’, ‘Total’)= modelS2.ModelStat ;
Display RESULT ;
In order to export the data in Excel, the following code lines must be written :
execute_unload ‘resultat_labour3_B.gdx’ RESULT ;
execute ‘gdxxrw.exe resultat_labour3_B.gdx par=RESULT’ ;