[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Using suffixes with subscripted parameters?
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Using suffixes with subscripted parameters? |
Date: |
Sun, 16 Oct 2011 07:59:47 +0400 |
> Here is my (potentially noob) issue. I am trying to work through examples in
> the AMPL book (steel.mod and steel.dat), but when I try to use suffixes on
> parameters I get problems.
>
> The following line of code works (and generates the following output):
>
> display rate['bands'];
>
> Display statement at line 20
> rate[bands] = 200
>
> However if I try the following, I get the following error:
>
> display rate['bands'].val
>
> steel.mod:20: rate cannot have a suffix
>
> If anyone knows how to work around this, that would be great....
>
Most likely 'rate' is a parameter while in GNU MathProg only variables
and constraints can have suffixes.
For more details about the syntax please see the language reference
included in the distribution (doc/gmpl.pdf).