[Flopcpp] New FlopC++-Translation-Questions

WoelliUSM at aol.com WoelliUSM at aol.com
Sat Feb 25 07:51:22 EST 2006


Dear all,
 
thanks for all your help! I can't express how much I appreciate this!
 
Unfortunatly, I have more problematic statements:
 
1) This one is very problematic 
 
Problem (A):
 
 
How do I solve the problem that occurs when I got more than 5  dimensions?
 
My idea is:
 
...
MP_subset<2> rt(r,t);
forall(r*t, rt.insert(r,t));
...
AP_LinkGleicherTag(c,l,g,d,rt).such_that(LC(l,c)).such_that(GAL(g,l)).such_tha
t(DG(d,g)).such_that((mod(t,Periodizitaet(0))=0))=  x(rt,d,g)==0;


I don't have a problem compiling it, but is this correct? The set "t" ist  
used in that "mod(t,Periodizitaet(0))=0"-Statement. Are there any problems with  
that "t" because I use subset "rt" in that case?

 
Problem (B):
 
GAMS:
 
 
AP_LinkGleicherTag(c,l,g,d,r,t)$(LC(l,c) and GAL(g,l) and  DG(d,g)
and (mod(ord(t),Periodizitaet)=0))..
x(r,t,d,g)=e=0;
 
I put the focus on the first underline
 
My idea about this is:
 
AP_LinkGleicherTag(c,l,g,d,r,t).such_that(LC(l,c)).such_that(GAL(g,l)).such_th
at(DG(d,g)).such_that((mod(t,Periodizitaet)=0))=  x(r,t,d,g)==0;
 
I get an error message: "error C2664: 'flopc::mod': Parameter 1 can't be  
converted from 'flopc::MP_set' to 'int'"
 

What do I have to do?
 
Problem (C):
 
AP_LinkGleicherTag(c,l,g,d,rt).such_that(LC(l,c)).such_that(GAL(g,l)).such_tha
t(DG(d,g)).such_that((mod(t,Periodizitaet(0))=0))=  x(rt,d,g)==0;

Compiling this, I get the message: "C2593 Operator "==" is ambiguous". If I  
change 0 to 1 for example the error message doesn't appear.
 
I helped myself also with 
 
...
MP_data null(p);
 
null(0) = 0;
 
AP_LinkGleicherTag(c,l,g,d,rt).such_that(LC(l,c)).such_that(GAL(g,l)).such_tha
t(DG(d,g)).such_that((mod(t,Periodizitaet(0))=0))=  x(rt,d,g)==null(0);
 
Can I do this?
 
2)
 
Is the use of "dtilde" correct?
 
GAMS:
...
alias(d,dtilde);  
...
AP_Parallel(p,t)..
sum(r,sum(g$GP(g,p),sum(d$DG(d,g),  1/sum(dtilde$DG(dtilde,g), 1) * 
x(r,t,d,g) ))) +  q(p,t)
=e=sum(g$GP(g,p),1)*z(p,t);
 
MP_index dtilde;
...
AP_Parallel(p,t)= sum(r,sum(g.such_that(GP(g,p)),sum(d.such_that(DG(d,g)),  
1/sum(d(dtilde).such_that(DG(dtilde,g)), 1) * x(r,t,d,g) ))) +  
q(p,t)==sum(g.such_that(GP(g,p)),1)*z(p,t);
 
3)
GAMS:
 
AP_AlleEinplan(d,g)$DG(d,g)..
sum(r,sum(t,sum(h$(not(NDTH(d,t,h))),  x(r,t,h,d,g))))=e=1;
 
How do I translate "not"?
 
4)
 
My problem is how to translate the "sum"
 
AP_TeamTeach(c,g,r,t)$(GC(g,c)  and (sum(d$DG(d,g), 1) >1) )..
sum(d$DG(d,g), x(r,t,d,g))=e=sum(d$DG(d,g), 1) *m(g,r,t);
 
My idea is:
 
AP_TeamTeach(c,g,r,t).such_that(GC(g,c)).such_that(sum(d.such_that(DG(d,g)),1)
>1)  = sum(d.such_that(DG(d,g)), x(r,t,d,g))== sum(d.such_that(DG(d,g)), 1)  
*m(g,r,t);
 
Thanks in advance,
 
Christian 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20060225/1eda868d/attachment.html


More information about the Flopcpp mailing list