Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello, @Cyrille. I have written three pieces of code for MILPs. The first one displays the problem description as Sage itself does with p.show(), where p is a MILP, but it is shown in LaTeX format. You can check it here. Sorry I was too verbose with comments. You can delete them safely.

The second piece of code displays the description of the problem on a more mathematical notation. The code is here. I didn't use comments because it is essentially the same code, but with different output.

The third piece os code produces the solution to the problem in LaTeX format. You can find it here.

Finally, here you have an example using the problem of your original question. Uncomment the last three instructions alternatively to see the results.

Hopefully, this works correctly in all cases. If not, please let me know.

I hope this helps!