help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] trivial question re MathProg


From: Duilio Foschi
Subject: [Help-glpk] trivial question re MathProg
Date: Sat, 05 Jul 2003 11:36:44 +0200

I am walking my first steps in GNU MathProg.

I have written the following code:

set CITIES;
param LST >0 integer;
set TIMES:=1..last;
set TRIPS within {c1 in cities, t1 in times, c2 in cities, t2 in times};

So TRIPS is made of :
departure city
departure time
arrival city
arrival time 

Now I want to define a new set - SHIFTS - with elements belonging to TRIPS,
and the condition that the elements will be so aligned that the departure
time of
trip[I] will follow the arrival time of trip[I-1].

I wrote the rule as follows

set shifts within {s in schedule : s[i].t1 <= s[i-1].t2 or i=1};

but this is not MathProg... :)

How should I state the rule ?

TIA

Duilio Foschi 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]