[AMPL 2597] variables as indixes

View: New views
2 Messages — Rating Filter:   Alert me  

[AMPL 2597] variables as indixes

by mufasa-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I want to maximize a non linear objective function, where i hace the
following problem:

I have a parameter p[i,j] that is included in the objective fuction
and i want i and j to be variables and that ampl chooses them so as to
maximize teh value of my parameter p.  Ampl doesnt allows me to have
variables as indixes, can anyone hel me with this.
Thanks very much in advance
Mufasa

--~--~---------~--~----~------------~-------~--~----~
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 2600] Re: variables as indixes

by x-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As far as I know, no, you can't use variables as indices. See the post at the link below for a suggestion to handle a similar scenario.

http://www.nabble.com/-AMPL-2150--variable-number-of-variables-td21366715.html

Shobana



On Tue, Jun 16, 2009 at 6:47 AM, mufasa <i.guiloff.s@...> wrote:

Hi,
I want to maximize a non linear objective function, where i hace the
following problem:

I have a parameter p[i,j] that is included in the objective fuction
and i want i and j to be variables and that ampl chooses them so as to
maximize teh value of my parameter p.  Ampl doesnt allows me to have
variables as indixes, can anyone hel me with this.
Thanks very much in advance
Mufasa




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---