Decision variables question

Problems with syntax of GAMS
Post Reply
afdave14
User
User
Posts: 1
Joined: 4 years ago

Decision variables question

Post by afdave14 »

Good afternoon,

I'm working on a final project for my class on a scheduling optimization problem similar to this thesis https://calhoun.nps.edu/bitstream/handl ... sAllowed=y. I'm very new to GAMS and I'm trying to understand the syntax. Right now, I'm trying to figure out how to implement the decision variables. Specifically, there are several variables that are 1 or not depending on if they pass a logic test. For instance, Xsep = 1 if student s is scheduled for event e during period p. I found some documentation on the GAMS website about decision variables, but somehow, I think these are separate things.

I'm mostly struggling to wrap my mind around what this could be implemented as.
User avatar
dirkse
Moderator
Moderator
Posts: 215
Joined: 7 years ago
Location: Fairfax, VA

Re: Decision variables question

Post by dirkse »

Dave,

From your description, you are looking at X(s,e,p) as a sort of litmus test - it tells you if a condition is true or not, e.g. if student s is scheduled for event e during period p. I typically (always??) look at things the other way around: X(s,e,p) is my decision to schedule student s is scheduled for event e during period p. OK, I get lots of help from the optimizer, but I start with these decisions. I have to include constraints so that my decisions are feasible, e.g. no other events scheduled for that student during the same period: noConflict(s,p) .. sum{e, X(s,e,p)} =L= 1;

You mention a final class project and being new to GAMS. Sounds like there might be some time pressure, so you don't have time to waste by skipping right to the class project. To save time, you should start with a more basic model like COEX in the GAMS model library: self-contained, easy to grasp, and useful to illustrate the thought process and design patterns for MIP models.

-Steve
Post Reply