AnsweredAssumed Answered

How to generate all feasable solution within gap windows [0.1%, 0.2%]

Question asked by imane on Dec 9, 2017
Latest reply on Dec 11, 2017 by Susanne.Heip

Hi everyone!

 

I would like to generate all feasable solution which their gap is within 0.1% and 0.2%. Is-it possible?! How could I implement this algoritm. I would like to record and export every solution on .txt folder.

I tried to develop something like.

 

forall(i in Iteration) do

mipObjVal := getparam("XPRS_MIPOBJVAL")

bestBound := getparam("XPRS_BESTBOUND")

gap := abs((mipObjVal- bestBound)*100/mipObjVal )

if gap<=0.1 then

fopen("C:\\Blending-network\\Solution_Modele_1.txt",F_OUTPUT+F_APPEND)

my_output:=getfid(F_OUTPUT)

fselect(my_output)

writeln("Global Cost :\t", getsol(fonction1),"\t","$")

 

  fclose(F_OUTPUT)

end-do

end-if

 

 

However, this algorithm generate only one best solution! Could anybody help me pliiizz!

 

Many thanks !!!

Outcomes