test/lp_test.cc
changeset 1508 389a94a1d9eb
parent 1493 94535d1833b5
child 1542 0219ee65ffcc
equal deleted inserted replaced
6:b0a6534f7752 7:52931b66f9ba
    15 
    15 
    16 using namespace lemon;
    16 using namespace lemon;
    17 
    17 
    18 void lpTest(LpSolverBase & lp)
    18 void lpTest(LpSolverBase & lp)
    19 {
    19 {
       
    20 
       
    21 
       
    22 
    20   typedef LpSolverBase LP;
    23   typedef LpSolverBase LP;
    21 
    24 
    22   std::vector<LP::Col> x(10);
    25   std::vector<LP::Col> x(10);
    23   //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
    26   //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
    24   lp.addColSet(x);
    27   lp.addColSet(x);
       
    28 
       
    29 #ifndef GYORSITAS
    25 
    30 
    26   std::vector<LP::Col> y(10);
    31   std::vector<LP::Col> y(10);
    27   lp.addColSet(y);
    32   lp.addColSet(y);
    28 
    33 
    29   std::map<int,LP::Col> z;
    34   std::map<int,LP::Col> z;
   172        2.2*p1+p1*2.2+p1/2.2+
   177        2.2*p1+p1*2.2+p1/2.2+
   173        2*p1+p1*2+p1/2
   178        2*p1+p1*2+p1/2
   174        );
   179        );
   175   }
   180   }
   176   
   181   
   177 
   182 #endif
   178 }
   183 }
   179 
   184 
   180 void aTest(LpSolverBase & lp)
   185 void aTest(LpSolverBase & lp)
   181 {
   186 {
   182   typedef LpSolverBase LP;
   187   typedef LpSolverBase LP;
   238   lpTest(lp_glpk1);
   243   lpTest(lp_glpk1);
   239   aTest(lp_glpk2);
   244   aTest(lp_glpk2);
   240 #endif
   245 #endif
   241 
   246 
   242 #ifdef HAVE_CPLEX
   247 #ifdef HAVE_CPLEX
   243 //  LpCplex lp_cplex;
   248   LpCplex lp_cplex;
   244 //  lpTest(lp_cplex);
   249   lpTest(lp_cplex);
       
   250   aTest(lp_cplex);
   245 #endif
   251 #endif
   246 
   252 
   247   return 0;
   253   return 0;
   248 }
   254 }