test/lp_test.cc
changeset 460 76ec7bd57026
parent 459 ed54c0d13df0
child 461 08d495d48089
equal deleted inserted replaced
1:170744daf33d 2:c84dafb17eb9
   160     c = (p1 == 2.2);
   160     c = (p1 == 2.2);
   161     c = (p1 == 2  );
   161     c = (p1 == 2  );
   162     c = (2.2== p2 );
   162     c = (2.2== p2 );
   163     c = (2  == p2 );
   163     c = (2  == p2 );
   164 
   164 
   165     c = (2 <= e <= 3);
   165     c = ((2 <= e) <= 3);
   166     c = (2 <= p1<= 3);
   166     c = ((2 <= p1) <= 3);
   167 
   167 
   168     c = (2 >= e >= 3);
   168     c = ((2 >= e) >= 3);
   169     c = (2 >= p1>= 3);
   169     c = ((2 >= p1) >= 3);
   170 
   170 
   171     e[x[3]]=2;
   171     e[x[3]]=2;
   172     e[x[3]]=4;
   172     e[x[3]]=4;
   173     e[x[3]]=1;
   173     e[x[3]]=1;
   174     *e=12;
   174     *e=12;
   176     lp.addRow(-LP::INF,e,23);
   176     lp.addRow(-LP::INF,e,23);
   177     lp.addRow(-LP::INF,3.0*(x[1]+x[2]/2)-x[3],23);
   177     lp.addRow(-LP::INF,3.0*(x[1]+x[2]/2)-x[3],23);
   178     lp.addRow(-LP::INF,3.0*(x[1]+x[2]*2-5*x[3]+12-x[4]/3)+2*x[4]-4,23);
   178     lp.addRow(-LP::INF,3.0*(x[1]+x[2]*2-5*x[3]+12-x[4]/3)+2*x[4]-4,23);
   179 
   179 
   180     lp.addRow(x[1]+x[3]<=x[5]-3);
   180     lp.addRow(x[1]+x[3]<=x[5]-3);
   181     lp.addRow(-7<=x[1]+x[3]-12<=3);
   181     lp.addRow((-7<=x[1]+x[3]-12)<=3);
   182     lp.addRow(x[1]<=x[5]);
   182     lp.addRow(x[1]<=x[5]);
   183 
   183 
   184     std::ostringstream buf;
   184     std::ostringstream buf;
   185 
   185 
   186 
   186