scipy.optimize
scipy.optimize module
linprog
A = [-3 1;
1 2]
b = [6, 4]
c = [-1, 4]
x0_bounds = (nothing, nothing)
x1_bounds = (-3, nothing)
res = optimize.linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds])
Dict{Any, Any} with 13 entries:
"nit" => 0
"x" => [10.0, -3.0]
"slack" => [39.0, 0.0]
"crossover_nit" => 0
"upper" => Dict{Any, Any}("marginals"=>[0.0, 0.0], "residual"=>[Inf, …
"ineqlin" => Dict{Any, Any}("marginals"=>[-0.0, -1.0], "residual"=>[39.…
"status" => 0
"eqlin" => Dict{Any, Any}("marginals"=>Float64[], "residual"=>Float64…
"lower" => Dict{Any, Any}("marginals"=>[0.0, 6.0], "residual"=>[Inf, …
"success" => true
"con" => Float64[]
"fun" => -22.0
"message" => "Optimization terminated successfully. (HiGHS Status 7: Op…