User Tools

Site Tools


gams:how_to_reduce_model_generation_time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
gams:how_to_reduce_model_generation_time [2015/09/18 14:43]
Jarungjit Parnjai
gams:how_to_reduce_model_generation_time [2015/10/29 14:01]
admin
Line 31: Line 31:
 ); );
  
-* Test4+* Test4 and Test5 are coupled
 Variable z,y(k,l); Variable z,y(k,l);
 Equation e1 Test5 Equation e1 Test5
Line 38: Line 38:
          e5 Test8;          e5 Test8;
  
-* Test5 
 e1(k,​l)$(ord(k)=ord(l)).. e1(k,​l)$(ord(k)=ord(l))..
   z =G= sum((kk,​ll,​ii)$p3(kk,​ii,​ll) ,​p3(kk,​ii,​ll)*(ord(kk)+ord(ii)+ord(ll)) )   z =G= sum((kk,​ll,​ii)$p3(kk,​ii,​ll) ,​p3(kk,​ii,​ll)*(ord(kk)+ord(ii)+ord(ll)) )
Line 93: Line 92:
 ); );
  
-* Test4 Use subset kl to avoid the comparison $(ord(k)=ord(l)) +* Test4 Use subset kl in e1 to avoid the comparison $(ord(k)=ord(l)) 
- to be performed several times+* to be performed several times 
 +* Test5 Avoid repeating a calculation,​ hence, e2 defines x that is used in e1.
 Variable z, y(k,l), x; Variable z, y(k,l), x;
 Equation e1 Test5 Avoid repeating a calculation (1 of 2) Equation e1 Test5 Avoid repeating a calculation (1 of 2)
Line 101: Line 101:
          e4 Logical ordering of driving indices kl (sum(kl. k l));          e4 Logical ordering of driving indices kl (sum(kl. k l));
  
-* Test5 Avoid repeating a calculation 
 e1(kl(k,​l)).. z =G= x / (ord(k)+ord(l)) ; e1(kl(k,​l)).. z =G= x / (ord(k)+ord(l)) ;
 e2..  x =E= sum((kk,​ll,​ii)$p3(kk,​ii,​ll) ,​p3(kk,​ii,​ll)*(ord(kk)+ord(ii)+ord(ll)) ); e2..  x =E= sum((kk,​ll,​ii)$p3(kk,​ii,​ll) ,​p3(kk,​ii,​ll)*(ord(kk)+ord(ii)+ord(ll)) );
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/how_to_reduce_model_generation_time.txt · Last modified: 2017/09/02 19:26 by support