test/lp_test.cc
changeset 1909 2d806130e700
parent 1797 91b8b9cea2f7
child 1956 a055123339d5
equal deleted inserted replaced
10:96bf46af4d0c 11:bc9a759c87f4
    25   typedef LpSolverBase LP;
    25   typedef LpSolverBase LP;
    26 
    26 
    27   std::vector<LP::Col> x(10);
    27   std::vector<LP::Col> x(10);
    28   //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
    28   //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
    29   lp.addColSet(x);
    29   lp.addColSet(x);
    30 
    30   lp.colLowerBound(x,1);
       
    31   lp.colUpperBound(x,1);
       
    32   lp.colBounds(x,1,2);
    31 #ifndef GYORSITAS
    33 #ifndef GYORSITAS
    32 
    34 
    33   std::vector<LP::Col> y(10);
    35   std::vector<LP::Col> y(10);
    34   lp.addColSet(y);
    36   lp.addColSet(y);
       
    37 
       
    38   lp.colLowerBound(y,1);
       
    39   lp.colUpperBound(y,1);
       
    40   lp.colBounds(y,1,2);
    35 
    41 
    36   std::map<int,LP::Col> z;
    42   std::map<int,LP::Col> z;
    37   
    43   
    38   z.insert(std::make_pair(12,INVALID));
    44   z.insert(std::make_pair(12,INVALID));
    39   z.insert(std::make_pair(2,INVALID));
    45   z.insert(std::make_pair(2,INVALID));
    40   z.insert(std::make_pair(7,INVALID));
    46   z.insert(std::make_pair(7,INVALID));
    41   z.insert(std::make_pair(5,INVALID));
    47   z.insert(std::make_pair(5,INVALID));
    42   
    48 
    43   lp.addColSet(z);
    49   lp.addColSet(z);
       
    50 
       
    51   lp.colLowerBound(z,1);
       
    52   lp.colUpperBound(z,1);
       
    53   lp.colBounds(z,1,2);
    44 
    54 
    45   {
    55   {
    46     LP::Expr e,f,g;
    56     LP::Expr e,f,g;
    47     LP::Col p1,p2,p3,p4,p5;
    57     LP::Col p1,p2,p3,p4,p5;
    48     LP::Constr c;
    58     LP::Constr c;