specifying the elements of a set

6 views
Skip to first unread message

Ellen

unread,
Dec 16, 2010, 8:10:47 PM12/16/10
to AMPL Modeling Language
I read in data from external tables all the time for my various
models, with the indices then the parameters listed in successive
columns in my named Excel ranges. But now ...

Is there a way to read in the elements of a set, for use as an index,
from an external table? ...or a way to specify the elements of the set
without hard-keying them into the AMPL code?

Ellen

Paul

unread,
Dec 22, 2010, 11:14:20 AM12/22/10
to AMPL Modeling Language
On Dec 16, 8:10 pm, Ellen <eff.googlegro...@telus.net> wrote:
> Is there a way to read in the elements of a set, for use as an index,
> from an external table?

Yes. Take a look at http://www.ampl.com/NEW/tables.html; the
paragraph that starts "After the colon" gives an example.

/Paul
Reply all
Reply to author
Forward
0 new messages