Converting from Matlab to Gurobi using puLP - L1 norm in objective function.
Greetings:
I am interested in converting the following Matlab code to python puLP using Gurobi solver. In this code the objective function is the L1-norm. I have pasted the Matlab and python puLP code below. For the puLP code, I believe I have linearized the L1-norm correctly; however, when I run both codes, in which Gurobi solver is invoked, I get different results. The Matlab code results make sense. The puLP Gurobi solver results does not seem to make sense.
Any feedback if my approach in the conversion is correct or not is greatly appreciated!
Thank you
----------------------------------------------------pasted code below------------------------------------------------
Matlab code--------------------------------------------------------------------------------------------------------------
Python puLP Gurobi solver code------------------------------------------------------------------------------------
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
Post is closed for comments.
Comments
1 comment