Relaxing fixed variables
Relaxing fixed variables
Dear all,
I am facing a problem,
Basically I am dealing with an NLP problem in which I have to fix one of the vectors to a specific value during the first steps of the algorithm
Then I need to relax these variables in a further step on the algorithm.
Example :
Set i/i1*i3/;
.......
variables y(i)
Parameters Var(i)
.........
Var('i1')=1;
Var('i2')=0;
Var('i3')=1;
............
y.fx(i)=Var(i);
1)
option nlp=snopt;
solve test minimizing objvar using nlp;
...........................
2) I'd like to Solve the NLP with the Y vector being Free ( not fixed )
GAMS still remeber the previous values that have been fixed previously.
Best regards
Taoufiq
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---
Re: Relaxing fixed variables
Many thanks for your help Erwin,
Taoufiq
2009/5/24 Erwin Kalvelagen
y.lo(i)=-INF;
y.up(i)=INF;
----------------------------------------------------------------
Erwin Kalvelagen
Amsterdam Optimization Modeling Group
erwin.kalvelagen@gmail.com
http://amsterdamoptimization.com
----------------------------------------------------------------
On Sun, May 24, 2009 at 7:35 AM, Taoufiq GUEDDAR
wrote:
> Dear all,
>
> I am facing a problem,
> Basically I am dealing with an NLP problem in which I have to fix one of the
> vectors to a specific value during the first steps of the algorithm
> Then I need to relax these variables in a further step on the algorithm.
>
> Example :
> Set i/i1*i3/;
> .......
> variables y(i)
> Parameters Var(i)
> .........
>
> Var('i1')=1;
> Var('i2')=0;
> Var('i3')=1;
> ............
>
> y.fx(i)=Var(i);
>
> 1)
> option nlp=snopt;
> solve test minimizing objvar using nlp;
> ...........................
>
> 2) I'd like to Solve the NLP with the Y vector being Free ( not fixed )
> GAMS still remeber the previous values that have been fixed previously.
>
> Best regards
> Taoufiq
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---