Changeset 1445:4635352e5524 in lemon0.x for test/lp_test.cc
 Timestamp:
 06/04/05 14:50:15 (19 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1925
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/lp_test.cc
r1437 r1445 35 35 lp.addColSet(z); 36 36 37 { 38 LP::Expr e,f,g; 39 LP::Col p1,p2,p3,p4,p5; 40 LP::Constr c; 41 42 e[p1]=2; 43 e.constComp()=12; 44 e[p1]+=2; 45 e.constComp()+=12; 46 e[p1]=2; 47 e.constComp()=12; 48 49 e=2; 50 e=2.2; 51 e=p1; 52 e=f; 53 54 e+=2; 55 e+=2.2; 56 e+=p1; 57 e+=f; 58 59 e=2; 60 e=2.2; 61 e=p1; 62 e=f; 63 64 e*=2; 65 e*=2.2; 66 e/=2; 67 e/=2.2; 68 69 e=((p1+p2)+(p1p2)+(p1+12)+(12+p1)+(p112)+(12p1)+ 70 (f+12)+(12+f)+(p1+f)+(f+p1)+(f+g)+ 71 (f12)+(12f)+(p1f)+(fp1)+(fg)+ 72 2.2*f+f*2.2+f/2.2+ 73 2*f+f*2+f/2+ 74 2.2*p1+p1*2.2+p1/2.2+ 75 2*p1+p1*2+p1/2 76 ); 37 77 38 LP::Expr e,f,g; 39 LP::Col p1,p2,p3,p4,p5; 40 LP::Constr c; 78 79 c = (e <= f ); 80 c = (e <= 2.2); 81 c = (e <= 2 ); 82 c = (e <= p1 ); 83 c = (2.2<= f ); 84 c = (2 <= f ); 85 c = (p1 <= f ); 86 c = (p1 <= p2 ); 87 c = (p1 <= 2.2); 88 c = (p1 <= 2 ); 89 c = (2.2<= p2 ); 90 c = (2 <= p2 ); 91 92 c = (e >= f ); 93 c = (e >= 2.2); 94 c = (e >= 2 ); 95 c = (e >= p1 ); 96 c = (2.2>= f ); 97 c = (2 >= f ); 98 c = (p1 >= f ); 99 c = (p1 >= p2 ); 100 c = (p1 >= 2.2); 101 c = (p1 >= 2 ); 102 c = (2.2>= p2 ); 103 c = (2 >= p2 ); 104 105 c = (e == f ); 106 c = (e == 2.2); 107 c = (e == 2 ); 108 c = (e == p1 ); 109 c = (2.2== f ); 110 c = (2 == f ); 111 c = (p1 == f ); 112 //c = (p1 == p2 ); 113 c = (p1 == 2.2); 114 c = (p1 == 2 ); 115 c = (2.2== p2 ); 116 c = (2 == p2 ); 117 118 c = (2 <= e <= 3); 119 c = (2 <= p1<= 3); 120 121 c = (2 >= e >= 3); 122 c = (2 >= p1>= 3); 123 124 e[x[3]]=2; 125 e[x[3]]=4; 126 e[x[3]]=1; 127 e.constComp()=12; 128 129 lp.addRow(LP::INF,e,23); 130 lp.addRow(LP::INF,3.0*(x[1]+x[2]/2)x[3],23); 131 lp.addRow(LP::INF,3.0*(x[1]+x[2]*25*x[3]+12x[4]/3)+2*x[4]4,23); 132 133 lp.addRow(x[1]+x[3]<=x[5]3); 134 lp.addRow(7<=x[1]+x[3]12<=3); 135 lp.addRow(x[1]<=x[5]); 136 } 41 137 42 e[p1]=2; 43 e.constComp()=12; 44 e[p1]+=2; 45 e.constComp()+=12; 46 e[p1]=2; 47 e.constComp()=12; 48 49 e=2; 50 e=2.2; 51 e=p1; 52 e=f; 53 54 e+=2; 55 e+=2.2; 56 e+=p1; 57 e+=f; 58 59 e=2; 60 e=2.2; 61 e=p1; 62 e=f; 63 64 e*=2; 65 e*=2.2; 66 e/=2; 67 e/=2.2; 68 69 e=((p1+p2)+(p1p2)+(p1+12)+(12+p1)+(p112)+(12p1)+ 70 (f+12)+(12+f)+(p1+f)+(f+p1)+(f+g)+ 71 (f12)+(12f)+(p1f)+(fp1)+(fg)+ 72 2.2*f+f*2.2+f/2.2+ 73 2*f+f*2+f/2+ 74 2.2*p1+p1*2.2+p1/2.2+ 75 2*p1+p1*2+p1/2 76 ); 138 { 139 LP::DualExpr e,f,g; 140 LP::Row p1,p2,p3,p4,p5; 141 142 e[p1]=2; 143 e[p1]+=2; 144 e[p1]=2; 145 146 e=p1; 147 e=f; 148 149 e+=p1; 150 e+=f; 151 152 e=p1; 153 e=f; 154 155 e*=2; 156 e*=2.2; 157 e/=2; 158 e/=2.2; 159 160 e=((p1+p2)+(p1p2)+(p1+12)+(12+p1)+(p112)+(12p1)+ 161 (p1+f)+(f+p1)+(f+g)+ 162 (p1f)+(fp1)+(fg)+ 163 2.2*f+f*2.2+f/2.2+ 164 2*f+f*2+f/2+ 165 2.2*p1+p1*2.2+p1/2.2+ 166 2*p1+p1*2+p1/2 167 ); 168 } 77 169 78 170 79 c = (e <= f );80 c = (e <= 2.2);81 c = (e <= 2 );82 c = (e <= p1 );83 c = (2.2<= f );84 c = (2 <= f );85 c = (p1 <= f );86 c = (p1 <= p2 );87 c = (p1 <= 2.2);88 c = (p1 <= 2 );89 c = (2.2<= p2 );90 c = (2 <= p2 );91 92 c = (e >= f );93 c = (e >= 2.2);94 c = (e >= 2 );95 c = (e >= p1 );96 c = (2.2>= f );97 c = (2 >= f );98 c = (p1 >= f );99 c = (p1 >= p2 );100 c = (p1 >= 2.2);101 c = (p1 >= 2 );102 c = (2.2>= p2 );103 c = (2 >= p2 );104 105 c = (e == f );106 c = (e == 2.2);107 c = (e == 2 );108 c = (e == p1 );109 c = (2.2== f );110 c = (2 == f );111 c = (p1 == f );112 //c = (p1 == p2 );113 c = (p1 == 2.2);114 c = (p1 == 2 );115 c = (2.2== p2 );116 c = (2 == p2 );117 118 c = (2 <= e <= 3);119 c = (2 <= p1<= 3);120 121 c = (2 >= e >= 3);122 c = (2 >= p1>= 3);123 124 e[x[3]]=2;125 e[x[3]]=4;126 e[x[3]]=1;127 e.constComp()=12;128 129 lp.addRow(LP::INF,e,23);130 lp.addRow(LP::INF,3.0*(x[1]+x[2]/2)x[3],23);131 lp.addRow(LP::INF,3.0*(x[1]+x[2]*25*x[3]+12x[4]/3)+2*x[4]4,23);132 133 lp.addRow(x[1]+x[3]<=x[5]3);134 lp.addRow(7<=x[1]+x[3]12<=3);135 lp.addRow(x[1]<=x[5]);136 137 138 139 171 } 140 172
Note: See TracChangeset
for help on using the changeset viewer.