Hi,
I am using ampl with gurobi solver. I would like to retrieve the N best solutions. Could you please kindly suggest how to set the gurobi options.
As shown below, I have set the ams_mode and ams_limit to 2 and 10 respectively. However, only one solution is stored in the .txt file.
May I know how to retrieve the multiple solutions given by gurobi from AMPL?
---
reset;
model model1.mod;
data input1.dat;
param resultFile_Summary symbolic := "resmsg.txt";
option solver gurobi;
option gurobi_options 'ams_mode 2';
option gurobi_options 'ams_limit 10';
solve;
display x > (resultFile_Summary); # x is my decision variable in model1.mod. I expect to see 10 sets of x’s in the result file.
close (resultFile_Summary);
---
Thank you very much.
Best regards,
Peng
Hi,
I am using ampl with gurobi solver. I would like to retrieve the N best solutions. Could you please kindly suggest how to set the gurobi options.
As shown below, I have set the ams_mode and ams_limit to 2 and 10 respectively. However, only one solution is stored in the .txt file.
May I know how to retrieve the multiple solutions given by gurobi from AMPL?
---reset;
modelmodel1.mod;
datainput1.dat;
paramresultFile_Summary symbolic := "resmsg.txt";
optionsolver gurobi;
optiongurobi_options 'ams_mode 2';
optiongurobi_options 'ams_limit 10';
solve;
displayx > (resultFile_Summary); # x is my decision variable in model1.mod. I expect to see 10 sets of x's in the result file.
close(resultFile_Summary);
---
Thank you very much.
Best regards,
Peng
This e-mail and any attachments are only for the use of the intended recipient and may contain material that is confidential, privileged and/or protected by the Official Secrets Act. If you are not the intended recipient, please delete it or notify the sender immediately. Please do not copy or use it for any purpose or disclose the contents to any other person.--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.