new in ampl, help me code this please

59 views
Skip to first unread message

Nicole Martinez

unread,
Dec 11, 2021, 11:17:44 AM12/11/21
to AMPL Modeling Language

2.JPG3.JPG4.JPG
1.JPG

AMPL Google Group

unread,
Dec 13, 2021, 5:20:20 PM12/13/21
to AMPL Modeling Language
If you are completely new to AMPL, start by studying the AMPL book, which begins with an introductory tutorial, and continues with detailed explanations of all of the AMPL model and data statements.

After you are familiar with how AMPL model definitions are written, you can start to convert the your paper's mathematical formulation into AMPL statements. You should first write AMPL definitions for the data, including sets (like "set I;") and parameters (like "param E{I};" and "param C{I,P};"). Then define the decision variables (like "var X{I,P,J,K} binary;" and "var S{P,J,K} >= 0;"). Once you have those done, you can start to write the objective and constraint expressions in AMPL. (You can skip the paper's "Index corresponding to" definitions, which are not needed in AMPL.)


--
Robert Fourer
am...@googlegroups.com
{#HS:1724105218-107611#}
Reply all
Reply to author
Forward
0 new messages