[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [Fwd: Sets of arbitrary length sets in MathProg]
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] [Fwd: Sets of arbitrary length sets in MathProg] |
Date: |
Tue, 21 Feb 2012 20:50:04 +0300 |
-------- Forwarded Message --------
From: Ben Mabey <address@hidden>
To: address@hidden
Subject: Sets of arbitrary length sets in MathProg
Date: Tue, 21 Feb 2012 09:29:23 -0700
Hi,
In my MathProg model I need to be able to specify sets of groups of
workers that need to work with each other on a particular shift. It
doesn't matter what shift they work on, just that they work together. I
know how to model this but I don't know how to represent it with
MathProg since it requires having a set of sets in which the children
sets can be of 1..n length (but may not be all the same length). For
additional context, I have the following declared:
set WORKERS;
set TASKS;
param number_of_shifts integer > 0;
param num_tasks_in_each_shift := (card(TASKS) / number_of_shifts)
integer > 0;
In my case I want to be able to, in my data section, declare sets of
workers that must work with each other which I call WORKER_CLIQUES.
Ideally it would look something like this in my data section:
set WORKERS := Jack Kate Sawyer Sun Juliet Richard Desmond Hugo;
param number_of_shifts := 2;
set WORKER_CLIQUES := (Sawyer, Juliet) (Jack,Kate,Hugo); # I want this!
Is it possible to have a set like WORKER_CLIQUES? I don't know how I
would declare the set, but it would be something like:
set WORKER_CLIQUES within {i in WORKERS} dimen
num_tasks_in_each_shift; # I know this is wrong..
I need to be able to limit the cardinality of each WORKER_CLIQUE to be
equal to or less than num_tasks_in_each_shift.
This this possible to do in MathProg?
Thanks!
-Ben
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] [Fwd: Sets of arbitrary length sets in MathProg],
Andrew Makhorin <=