[gecode-users] domain constraint

frank lemoine benouna84 at live.fr
Thu Nov 11 19:30:37 CET 2010


i sent you a portion of my code. you tell me that there is an opposite way that constraint the domains directly. i think this is what i'm wondering for. can you help me on that.
 
vector <int> ITS;
IntVar array m(200, 0 , 199)
 int kp=0;
  
 for(unsigned it = 0 ; it < p ; ++it)
 {
 
  for(unsigned ig = 0 ; ig < t ; ++ig)
   {
    if (t3[0].e[it] <= t2[0].e[ig])
     {
      ITS.push_back(ig);
      kp=kp+1;
     }
     
   }
   
  
   int kq=0;
   IntArgs a(ITS.size());
   
   for(unsigned ft = 0 ; ft < ITS.size() ; ++ft)
 {
 
 
 a[kq]=ITS[kq];
 
 kq=kq+1;
 
 }
    
    
    IntSet d(a);
    
    
    dom(*this, m[it],d, ICL_VAL);
    
     ITS.clear();
      kq=0;
 }
 
hope this was clear 
 


Frank

  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20101111/528b456d/attachment.htm>


More information about the users mailing list