| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168693Image: ubuntu2004
Simple linear programming example using cvxopt
Minimize -4*x1-5*x2
Subject to: 2*x1+x2≤ 3
x1+2*x2≤ 3
x1 ≥ 0, x2 ≥ 0
pcost dcost gap pres dres k/t
0: -8.1000e+00 -1.8300e+01 4e+00 0e+00 8e-01 1e+00
1: -8.8055e+00 -9.4357e+00 2e-01 1e-16 4e-02 3e-02
2: -8.9981e+00 -9.0049e+00 2e-03 1e-16 5e-04 4e-04
3: -9.0000e+00 -9.0000e+00 2e-05 3e-16 5e-06 4e-06
4: -9.0000e+00 -9.0000e+00 2e-07 1e-16 5e-08 4e-08
{'status': 'optimal', 'x': <2x1 matrix, tc='d'>, 's': <4x1 matrix, tc='d'>, 'z': <4x1 matrix, tc='d'>, 'y': <0x1 matrix, tc='d'>}