[Flopcpp] Antw: [Coin-discuss] GAMS to FlopC++-Translation

Tim Hultberg Tim.Hultberg at eumetsat.int
Wed Feb 22 15:20:30 EST 2006


Hi Christian,

1) your idea does not seem right to me. You want to limit the number of
constrainst NOT the left hand side terms. So you
should use

AP_AlleEinplan(c,d,g).such_that(DC(d,c)).such_that(DG(d,g))  =  ...

actually  
AP_AlleEinplan(c,d,g).such_that(DC(d,c)*DG(d,g))  =  ...
should really work as well, but doesnt seem to at the moment, I ll look
into this


2) your idea seems fine to me. But you will run into trouble because
FLOPC++ only allows for a maximum of 5 indices (see the homepage). I ll
take an action to increase the max number of indices to 8, but dont
expect this change to happen soon since I am very busy with other
things. In the meanwhile you can create a workaround using cartesean
MP_subsets

Cheers, Tim 


Tim Hultberg

>>> WoelliUSM at aol.com 22.02.06 19.13 >>>
Dear all,
 
I got two questions about how to "translate" Gams-equations to
FlopC++-constraints.
 
1)
 
The problem is, that I don't know how to translate "$(DC(d,c) and
DG(d,g))" to "such_that" in this special case:
 
GAMS:
..
Equations
AP_AlleEinplan(c,d,g)
..
AP_AlleEinplan(c,d,g)$(DC(d,c) and DG(d,g)).. sum(r,sum(t,
x(r,t,d,g)))=e=1;
 
My idea about this:
 
FlopC++:
..
MP_constraint
 AP_AlleEinplan(c,d,g)
..
AP_AlleEinplan(c,d,g) = sum(d.such_that(DC(c,d)>-2),
sum(g.such_that(DG(d,g)>-2), sum(r,sum(t, x(r,t,d,g)))))==1;

2)
 
The second problem is about "Alias" in a similar case as (1):
 
GAMS:
..
Alias(d, dtilde)
Alias(g, gtilde)
..
Equations
AP_GruppenLink(c,l,g,gtilde,d,dtilde,r,t) 
..
AP_GruppenLink(c,l,g,gtilde,d,dtilde,r,t)..
x(r,t,d,g)=e=x(r,t+1,dtilde,gtilde);
 
FlopC++:
..
MP_index dtilde, gtilde;
..
MP_constraint
AP_GruppenLink(c,l,g,g(gtilde),d,d(dtilde),r,t) 
..
AP_GruppenLink(c,l,g,g(gtilde),d,d(dtilde),r,t)..
x(r,t,d,g)==x(r,t+1,d(dtilde),g(gtilde));
 
 
Thank you in advance,
 
Greetings from Cologne,
 
Christian
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss




More information about the Flopcpp mailing list