|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[AMPL 2957] expanding defined variablesI would like to transform my benchmarks into a form that can be used
by other researchers not using AMPL. (In my highly biased opinion they should be using AMPL :) ) I would like to expand the model sent to the solver after presolve and i would like to achieve that in an automated manner. I am almost happy with "solexpand _scon;" and "option auxfiles cfr;" with one notable exception. The expressions are not shown for those variables in the .fix file that are not fixed to a constant value. How can i "expand" those defined variables in an automated manner? Any help is appreciated. Ali -- 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@.... For more options, visit this group at http://groups.google.com/group/ampl?hl=en. |
|
|
RE: [AMPL 2961] expanding defined variablesThis is true, the definitions of defined variables are not expanded. To export the problem using "expand" or "solexpand" you would have to replace these definitions by explicit constraints of the form <var> = <defining expression>. Bob Fourer 4er@... > -----Original Message----- > From: Ali Baharev [mailto:ali.baharev@...] > Sent: Thursday, November 05, 2009 10:53 AM > To: ampl@... > Subject: [AMPL 2957] expanding defined variables > > I would like to transform my benchmarks into a form that can be used > by other researchers not using AMPL. (In my highly biased opinion they > should be using AMPL :) ) > > I would like to expand the model sent to the solver after presolve and > i would like to achieve that in an automated manner. > > I am almost happy with "solexpand _scon;" and "option auxfiles cfr;" > with one notable exception. The expressions are not shown for those > variables in the .fix file that are not fixed to a constant value. How > can i "expand" those defined variables in an automated manner? > > Any help is appreciated. > > Ali > -- 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@.... For more options, visit this group at http://groups.google.com/group/ampl?hl=en. |
|
|
Re: [AMPL 2963] expanding defined variablesThank you for the response.
Unfortunately it is still not what I have been looking for. They still do not appear in the .fix file. Are you suggesting that I should also expand the "defined variable" explicit constraints and then copy the corresponding part of the constraint to the .fix file with an appropriate script? Is there another way to avoid writing a script for that? Any help is appreciated. Ali -- 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@.... For more options, visit this group at http://groups.google.com/group/ampl?hl=en. |
|
|
Re: [AMPL 3021] expanding defined variablesDavid M. Gay suggested this (with the <var> = <defining expression>
explicit constraint approach): expand{i in 1.._nvars: _var[i].status == 'sub'} _con[_var[i].defeqn]; It works but Lambda[1,1,1] appears in def_sum_xLambda[1,1] however Lambda[1,1,1] is 1 and should be eliminated. In other words: the output still needs considerable editing. It seems to me that the easiest would be to write a custom parser for the nl file. Many thanks for the help, Ali -- 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=. |
| Free embeddable forum powered by Nabble | Forum Help |