On 05/16/2018 01:39 PM, Andrew Makhorin wrote:
-------- Forwarded Message --------
To: help-glpk@gnu.org <help-glpk@gnu.org>
Subject: Hello. I need a example to use GLPK java for MIP.
Date: Wed, 16 May 2018 10:39:46 +0000 (UTC)

Dear help-glpk.


I'm a student learning optimization.


I'm doing optimization modeling in JAVA.


However, there are only 1-dimension variables among the existing
examples
Can you give me an example that has more than 2-dimensional variables?


For example,
If the objective function is sum (s in S, p in P) x (s, p)

Hello Minjun,

sets (like S and P) are not supported by the GLPK library. So you have to create a column for each combination of s and p in your own Java coding.

If that looks too tedious, the code at
https://www.xypron.de/projects/linopt/
might help you. See the example a
https://www.xypron.de/projects/linopt/examples.html

Best regards

Heinrich



forall (s in S, p in P) x (s, p) is_binary
I want to show it in java.


Could you pass me some more difficult examples than the example in the
existing folder?


Thank you.


Best regards.



_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to