[AMPL 18416] Running Ampl .run file in python

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

[AMPL 18416] Running Ampl .run file in python

p.jamarkattel
How Can I run the ampl .run file in amplpy after I am able to read the model and data file.RN I am getting error on running the .run file

--
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
|

Re: [AMPL 18420] Running Ampl .run file in python

AMPL mailing list
With amplpy you can run a .run file as follows:

from amply import AMPL
ampl = AMPL()
ampl.read('file.run')

The behavior and any eventual errors should be the same as if you were running the following in the ampl prompt:
$ ampl
ampl: model file.run;

Best regards,
Filipe

--
Filipe Brandão
[hidden email]
{#HS:806620194-38901#}
On Wed, Mar 20, 2019 at 3:34 PM UTC, Ampl Modeling Language <[hidden email]> wrote:
How Can I run the ampl .run file in amplpy after I am able to read the model and data file.RN I am getting error on running the .run file



--
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.