Hi Renger,
You are right. I forgot that option that is much simpler, and I would say elegant.
Cheers,
Pedro
On Thu, Mar 24, 2016 at 3:23 PM, Renger van Nieuwkoop wrote:
Hi
You could also just fix the first value:
C.FX(“1â€) = C_base_year;
In this case there is no need for the constraint_ini equation.
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Pedro Javier RamÃrez Torrealba
Sent: Wednesday, March 23, 2016 5:56 PM
To: gamsworld@googlegroups.com
Subject: Re: Dependent Variable
Hi Masoud,
You need to use the conditional operator ($) for the constraints:
constraint_ini… C(‘1’) =e= C_base_year;
constraints(t)$(ord(t) > 1)… C(t+1) =e= C(t) + Y(t+1);
Cheers,
Pedro
On Wed, Mar 23, 2016 at 3:35 PM, Masoud wrote:
It is necessary to mention that C is not a parameter and there are some constraints on it.
On Wednesday, March 23, 2016 at 7:02:46 PM UTC+4:30, Masoud wrote:
Hi everyone,
I would like to define a dependent variable. How can I do it?
Here is a simple example:
C(t+1)=C(t)+Y(t+1)
C(1)=C_base_year
Where, t is a set (shows the year), Y is a binary variable and C is a dependent variable.
It is clear that C is fixed in the base year(t=1) and it depends on Y variable for t>1.
If I define it as a variable, it is constant for other years too(C(t)=C_base_year). So, how should I define C?
Thanks
Masoud
PEDRO JAVIER RAMÃREZ TORREALBA
Mobile: +44-(0)75-8069-3119
London, UNITED KINGDOM
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
PEDRO JAVIER RAMÃREZ TORREALBA
Mobile: +44-(0)75-8069-3119
London, UNITED KINGDOM
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.