lunes, 20 de enero de 2014

Easy Epsilon-constriant implementation (gams version)

Template in gams of epsilon-constraint method: 

Set
iteration number of iteration /001*010/
ob        objectives in your model /1*20/
ecit      number e-constraints intervals /1*3/;


Parameters
comb(ob)  current combination
cf        carry
indexObj  sum index;
;

*===============================================================================
*YOUR MODEL
*===============================================================================


FILE BIO / comb.xls /;
PUT BIO;
BIO.nd = 4;
BIO.nw = 0;
BIO.nr = 3;
BIO.pc = 6;

comb(ob)=1;

loop(iteration,

*===============================================================================
* Solve .....
*===============================================================================


  loop(ob,
    put sqrt(2);
  );
  put /;


  cf = 1;
  loop(ob$(cf eq 1),
    comb(ob)=comb(ob)+1;
    if(comb(ob)>card(ecit),
      comb(ob)=1;
    else
      cf=0;
    );
  );

);