Linking Macro and Micro Periods (Sets)

Problems with modeling
Post Reply
emittag
User
User
Posts: 1
Joined: 4 years ago

Linking Macro and Micro Periods (Sets)

Post by emittag »

Hello together,

I am currently working on a comparison between lot sizing problems. To compare them I need to make the Small Bucket Models work on Macroperiods.
My problem is the connection between the Macroperiods (e.g years) and Microperiods (e.g. months)

Here an excerpt of my gams code:

Sets
k Products
t Macroperiods
s Microperiods;

Binary Variables
gamma(k,s) Setup state indicator

ObjFct.. OF =e= sum((k,t), hc(k) * Y(k,t)) + sum((k,s), sc(k) * gamma(k,s));

What I need is that each t has like four s in it.
Currently in the whole model there are four s where the variables, which are dependent of s stay the same over all Macroperiods t.

Thank you for your help in advance.

Best regards
Eric Mittag
Fred
Posts: 373
Joined: 7 years ago

Re: Linking Macro and Micro Periods (Sets)

Post by Fred »

Hi Eric,

You might want to read about multi-dimensional sets (https://www.gams.com/latest/docs/UG_Set ... sionalSets) to figure out how to implement a mapping between your sets t and s.

I hope this helps!

Fred
Post Reply