If condition in GAMS

Hi guy,

I try to use the dollar condtion, but with variables this does not
work very well.

In my case, I want to limit a variable depending the state of otehr
variable. For example, I qwant to simulate different discharge steps
in a battery. When a battery has is state of charge between 100% and
70% of its capacity, the price will be 0.1. And if the SoC is in 70%
and 40% the price will be other.

So in my case I need to limit in gams the discharge variable will be
limited by the battery SoC. I’m thinking to use 3 varaible to
discharge power for three discharge steps, the first discharge power
will be activated when the battery SoC is between 100% and 70%, the
second discharge power will be activated when the battery is between
70% and 40%.

the three discharge powers could be used in the same period, because
the battery SoC can pass from 100% until 50%, and this means that it
will be activated 2 discharge steps with two discharge powers. The
battery SoC is another variable, because is determined in each period
adding the charge power and discharge power in each period.

I try to use the dollar condtion but gams give me error

Best regards,

Tiago Sousa

\

Tiago
The problem is not GAMS, is your modelling approach.
Take a look at:
http://home.ubalt.edu/ntsbarsh/opre640a/partIII.htm

under the topic: “Conditional Relations Among Constraints”

Regards

2011/10/17 Tiago Sousa

Hi guy,

I try to use the dollar condtion, but with variables this does not
work very well.

In my case, I want to limit a variable depending the state of otehr
variable. For example, I qwant to simulate different discharge steps
in a battery. When a battery has is state of charge between 100% and
70% of its capacity, the price will be 0.1. And if the SoC is in 70%
and 40% the price will be other.

So in my case I need to limit in gams the discharge variable will be
limited by the battery SoC. I’m thinking to use 3 varaible to
discharge power for three discharge steps, the first discharge power
will be activated when the battery SoC is between 100% and 70%, the
second discharge power will be activated when the battery is between
70% and 40%.

the three discharge powers could be used in the same period, because
the battery SoC can pass from 100% until 50%, and this means that it
will be activated 2 discharge steps with two discharge powers. The
battery SoC is another variable, because is determined in each period
adding the charge power and discharge power in each period.

I try to use the dollar condtion but gams give me error

Best regards,

Tiago Sousa


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.



\

Edson Valle
edsoncv@gmail.com


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.

Thank you very much, I will read the page and see if I can adapt to my
code.

Regards,

Tiago Sousa

On 18 out, 13:44, Edson Cordeiro do Valle wrote:

Tiago
The problem is not GAMS, is your modelling approach.
Take a look at:http://home.ubalt.edu/ntsbarsh/opre640a/partIII.htm

under the topic: “Conditional Relations Among Constraints”

Regards

2011/10/17 Tiago Sousa

Hi guy,

I try to use the dollar condtion, but with variables this does not
work very well.

In my case, I want to limit a variable depending the state of otehr
variable. For example, I qwant to simulate different discharge steps
in a battery. When a battery has is state of charge between 100% and
70% of its capacity, the price will be 0.1. And if the SoC is in 70%
and 40% the price will be other.

So in my case I need to limit in gams the discharge variable will be
limited by the battery SoC. I’m thinking to use 3 varaible to
discharge power for three discharge steps, the first discharge power
will be activated when the battery SoC is between 100% and 70%, the
second discharge power will be activated when the battery is between
70% and 40%.

the three discharge powers could be used in the same period, because
the battery SoC can pass from 100% until 50%, and this means that it
will be activated 2 discharge steps with two discharge powers. The
battery SoC is another variable, because is determined in each period
adding the charge power and discharge power in each period.

I try to use the dollar condtion but gams give me error

Best regards,

Tiago Sousa


“gamsworld” group.
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.


Edson Valle
edso...@gmail.com

\