-1

I try to solve the following linear program using the cvxopt package in python and wonder how to fix the stated ValueError. I guess it's a modeling mistake taking into consideration that I am a complete rookie using cvxopt.

The following displays the optimization problem in standard notation:

Optimization Problem

The following displays the equivalent model in python/cvxopt:

import cvxopt
A = cvxopt.matrix([[1.0, 10.0, 12.0],
                   [1.0, 6.0, 1.0],
                   [1.0, 8.0, 15.0],
                   [1.0, 4.0, 6.0],
                   [1.0, 5.0, 3.0]])
b = cvxopt.matrix([1.0, 6.0, 12.0])
c = cvxopt.matrix([-4.1, -3.5, -3.8, -2.9, -3.3])
print(A)
print(b)
print(c)
cvxopt.solvers.lp(c,A,b)
# sol = cvxopt.solvers.lp(c,A,b)
# print(sol['x'])

The following displays the corresponding Output/ValueError:

Output/ValueError

Does anyone know how to deal with that problem? Any ideas would be much appreciated.

I am coding on a windows machine using python (3.8.5) in jupyter notebook and cvxopt (1.2.0).

1 Answers1

2

From the error it looks like it is infeasible. Try swapping the sign on c and check the results

Marco_sbt
  • 309
  • 1
  • 12
  • Thank you very much for your quick response Marco_sbt. I swapped the signs but the error persists. Do you have any other idea? I guess I am modeling incorrectly in terms of the cvxopt syntax... – dominikmeyer95 Sep 10 '21 at 11:35