Coverage for docs/source/examples/primal_infeasible_ex2.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.4.0, created at 2024-01-07 22:13 -0500

1"Another simple primal infeasible example" 

2from gpkit import Variable, Model 

3 

4x = Variable("x") 

5y = Variable("y", 2) 

6 

7constraints = [ 

8 x >= 1, 

9 0.5 <= x*y, 

10 x*y <= 1.5 

11 ] 

12 

13objective = x*y 

14m = Model(objective, constraints) 

15 

16# raises UnknownInfeasible on cvxopt and PrimalInfeasible on mosek 

17# m.solve()