.sensobjlo and .sensobjhi are solver-defined suffixed, so they aren't created until after the first "solve" of your script. But when AMPL encounters a "for" loop it immediately parses everything in the loop; thus it encounters these suffixes and complains that they aren't defined yet. Thus you'll need to define these suffixes yourself,
suffix sensobjlo OUT;
suffix sensobjhi OUT;
before the beginning of the loop.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of Tim S
Sent: Wednesday, June 12, 2013 2:28 PM
To: am...@googlegroups.com
Subject: [AMPL 7149] Bad suffix .sensobjlo & .sensobjhi
Hello,
I have the following problem:
. . .
RUN FILE "run.run":
model model.mod;
data data.dat;
for {i in D}
{
solve Prob1[i];
let x[i]:= DMweights[i];
display i> results;
display u.sensobjlo > results;
display u.sensobjhi > results;
}
When I run the following problem in AMPL, I get the errors "Bad suffix .sensobjlo for u" and "Bad suffix .sensobjhi for u". I was wondering why this might be.
Thanks,
Tim