Ask Your Question
0

Interactive linear programming

asked 2019-09-29 09:07:27 +0100

Cyrille gravatar image

updated 2023-05-19 21:56:38 +0100

FrédéricC gravatar image

1) According to the documentation of "interactive simplex method" the following code seems legitimate

%display latex A = ([1, 1, 3], [3, 1, 2], [2, 0, 2]) b = (1000, 1500, 1100) c = (10, 5, 2) P = InteractiveLPProblemStandardForm(A, b, c,["x_1", "x_2", "x_3"],slack_variables=["e_4", "e_5", "e_6"], problem_type="min",constraint_type=["<=", ">=","<="]) show(P)

seems correct. But I receive an error message

TypeError: __init__() got an unexpected keyword argument 'constraint_type'.

2) mai I write "=" 3) If I add

variable_type=[">=", ">="]

what must I enter if there is no restriction on a variable ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2019-09-29 10:46:01 +0100

eric_g gravatar image

According to the documentation returned by

InteractiveLPProblemStandardForm?

your input code is not correct, since InteractiveLPProblemStandardForm has no keyword argument constraint_type. Moreover, the documentation says:

Unlike "InteractiveLPProblem", this class does not allow you to
adjust types of constraints (they are always ""<="") and variables
(they are always "">=""), and the problem type may only be ""max""
or ""-max"".
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-09-29 09:07:27 +0100

Seen: 307 times

Last updated: Sep 29 '19