[AMPL 15262] AMPL set Option using MATLAB API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 15262] AMPL set Option using MATLAB API

Roberto Germanà
Hi,
I need to set the time limit computation using MATLAB API. This is my code:
ampl.setOption('solver', 'locsol');
ampl
.setOption('timelimit', '30');
ampl
.read('Tracking.mod')
ampl
.readData('Tracking.dat');
ampl
.solve();

With this code, I'm able to change the solver, but the time limit remains the default one, as you can see from the output message, part of this is the following one:
Stopped at time limit of 10 second(s)
Can anyone help me?
 
Best Regards.
Roberto Germanà

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[AMPL 15263] Re: AMPL set Option using MATLAB API

Roberto Germanà
Solved! the right way is:
ampl.setOption('locsol_options, 'version timelimit=30');



On Friday, 1 December 2017 12:02:18 UTC+1, Roberto Germanà wrote:
Hi,
I need to set the time limit computation using MATLAB API. This is my code:
ampl.setOption('solver', 'locsol');
ampl
.setOption('timelimit', '30');
ampl
.read('Tracking.mod')
ampl
.readData('Tracking.dat');
ampl
.solve();

With this code, I'm able to change the solver, but the time limit remains the default one, as you can see from the output message, part of this is the following one:
Stopped at time limit of 10 second(s)
Can anyone help me?
 
Best Regards.
Roberto Germanà

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.