help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] glpk/l parametric lead lag


From: Benoit DAVID
Subject: [Help-glpk] glpk/l parametric lead lag
Date: Mon, 27 Jan 2003 14:19:12 +0100

Does anybody know how to perform a lag or lead with a paramtric jump in
glpk/l :

set S = (t1,t2,t3,t4,t5,t6);

C[s] := X[s]<=X[s-1]; /* OK
C[s] := X[s]<=X[s-2]; /* OK

lag:=2;
C[s] := X[s]<=X[s-lag]; /* KO


My workaround is to define an index on S and use it like this :

set S = (t1,t2,t3,t4,t5,t6);
    parameter _iS[S];
    _iS[s] := data (s in S: t1 1,t2 2,t3 3,t4 4,t5 5,t6 6);

lag:=2;

C[s] := X[s] <= sum(t, X[t] where _iS[t]-_iS[s]+lag=0 );


Is there anything simpler ?




Dr. Ir. Benoit DAVID
Consultant
n-Side S.A.
Rue de la Longue Haie, 17/001
1348 Louvain-la-Neuve
+32 (0) 10 45 87 55





reply via email to

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