To avoid these "invalid subscript discarded" messages, you need to be sure that members are not removed from any set that is used to index a parameter (or another set). In your example, you write
set dropSet within allSet default {};
set mySet := allSet diff dropSet;
param myData {mySet};
When members are added to dropSet, that has the effect of taking members away from mySet, which is the index set for myData -- hence the error messages for myData.
Instead you should index param myData over allSet, which does not change. Then use mySet in defining your variables, objective, and constraints.
Bob Fourer
am...@googlegroups.com
=======
From:
am...@googlegroups.com [mailto:
am...@googlegroups.com] On Behalf Of
yiz...@lehigh.edu
Sent: Monday, November 17, 2014 8:01 PM
To:
am...@googlegroups.com
Subject: [AMPL 9550] The “invalid subscript discarded” message when change the set
I get an “invalid subscript discarded” message when I display an AMPL parameter.
According to file dietflex.mod, I use the following method, but the error still exists. How can I fix it?