|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[AMPL 2905] invalid subscripts discardedHello, I have a model that uses a parameter y. In my data file I have the following statements: param y default 0 := [*,*,1]: 0 1 2 := 2 1 . . 3 . . 1 4 . 1 . [*,*,2]: 0 1 2 := 5 1 . . 7 . 1 . [*,*,3]: 0 1 2 := 1 1 . . 6 . 1 . ; However, when I try to solve my model I get a message that states: Error executing "solve" command: error processing param y: 2 invalid subscripts discarded: y[5,0,2] y[7,1,2] From earlier posts on this group I found this link: http://www.ampl.com/FAQ/#WhydoIgetaninvalidsubscriptdiscardedmessagewhenIdisplayanAMPLparameter, unfortunately the information there doesn't appear to be related to my problem. What am I doing incorrectly? Thanks, Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
[AMPL 2912] Re: invalid subscripts discardedThe discarded invalid subscripts [5,0,2] and [7,1,2] correspond to the two values in the parameter y data that have a third index equal to 2. So most likely the problem is that 2 is not a member of the third indexing set for y. Bob Fourer 4er@... > -----Original Message----- > From: ampl@... [mailto:ampl@...] > On Behalf Of D.T. Fokum [fokumdt@...] > Sent: Thursday, October 22, 2009 9:31 PM > To: AMPL Modeling Language > Subject: [AMPL 2905] invalid subscripts discarded > > > Hello, > > I have a model that uses a parameter y. In my data file I have the > following statements: > > param y default 0 := > [*,*,1]: > 0 1 2 := > 2 1 . . > 3 . . 1 > 4 . 1 . > [*,*,2]: > 0 1 2 := > 5 1 . . > 7 . 1 . > [*,*,3]: > 0 1 2 := > 1 1 . . > 6 . 1 . ; > > However, when I try to solve my model I get a message that states: > Error executing "solve" command: > error processing param y: > 2 invalid subscripts discarded: > y[5,0,2] > y[7,1,2] > > From earlier posts on this group I found this link: > http://www.ampl.com/FAQ/#WhydoIgetaninvalidsubscriptdiscardedmessagewhenId > isplayanAMPLparameter, > unfortunately the information there doesn't appear to be related to my > problem. What am I doing incorrectly? > > Thanks, > Daniel > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
[AMPL 2915] Re: invalid subscripts discardedBob,
Thanks for your response; my problem is resolved. The third indexing set for y was UNIT, which I had defined as: set UNIT:= 0 .. 3 by 1; I dropped " by 1" from the set declaration and the model was solved correctly without any subscripts discarded. Thanks, Daniel On Sat, Oct 24, 2009 at 2:20 PM, Robert Fourer <4er@...> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |