How to write mathematical formulation based on Gurobi Python script?
AnsweredIs there any API or tools in Gurobi to generate the math equation of constraints based on the Python script of that constraint? I want to get the math formula of the following constraint:
model2.addConstrs((gp.quicksum(deploy[s, o, r] for s in Stations)
<= Demand[o, r] for o in OilSpills for r in ResourcesD),
name='C_deploy_demand')
Expected output
0
-
Hi Tanmoy,
There is no functionality within Gurobi that can do this. Perhaps there are tools which can convert standardized lp or mps files to latex, and you could leverage that by writing your model to file, but in saying that I'm not aware of any such tools. This does not mean they don't exist though.- Riley
0 -
When I was typing this question, my brain was hinting me in your very same point. funny. I will post here if I found something useful from lp file - Latex direction,
0
Please sign in to leave a comment.
Comments
2 comments