[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] glpk.js
From: |
Henri Gourvest |
Subject: |
[Help-glpk] glpk.js |
Date: |
Mon, 10 Dec 2012 18:11:01 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 |
Hi,
I just started a new project to run glpk in a webbrowser in pure javascript.
https://github.com/hgourvest/glpk.js
actually I have LP/MIP solver running
and the CPLEX parser
regards
\* Objective function *\
Minimize
obj: +17 x1_1 +23 x2_1 +16 x3_1 +19 x4_1 +18 x5_1 +21 x1_2 +16 x2_2 +20 x3_2 +19 x4_2 +19 x5_2 +22 x1_3 +21 x2_3 +16 x3_3 +22 x4_3 +15 x5_3 +18 x1_4 +16 x2_4 +25 x3_4 +22 x4_4 +15 x5_4 +24 x1_5 +17 x2_5
+24 x3_5 +20 x4_5 +21 x5_5 +15 x1_6 +16 x2_6 +16 x3_6 +16 x4_6 +25 x5_6 +20 x1_7 +19 x2_7 +17 x3_7 +19 x4_7 +16 x5_7 +18 x1_8 +25 x2_8 +19 x3_8 +17 x4_8 +16 x5_8 +19 x1_9 +18 x2_9 +19 x3_9 +21 x4_9 +23 x5_9
+18 x1_10 +21 x2_10 +18 x3_10 +19 x4_10 +15 x5_10 +16 x1_11 +17 x2_11 +20 x3_11 +25 x4_11 +22 x5_11 +22 x1_12 +15 x2_12 +16 x3_12 +23 x4_12 +17 x5_12 +24 x1_13 +25 x2_13 +17 x3_13 +25 x4_13 +19 x5_13 +24 x1_14
+17 x2_14 +21 x3_14 +25 x4_14 +22 x5_14 +16 x1_15 +24 x2_15 +24 x3_15 +25 x4_15 +24 x5_15
\* Constraints *\
Subject To
one_1: +x1_1 +x2_1 +x3_1 +x4_1 +x5_1 = 1
one_2: +x1_2 +x2_2 +x3_2 +x4_2 +x5_2 = 1
one_3: +x1_3 +x2_3 +x3_3 +x4_3 +x5_3 = 1
one_4: +x1_4 +x2_4 +x3_4 +x4_4 +x5_4 = 1
one_5: +x1_5 +x2_5 +x3_5 +x4_5 +x5_5 = 1
one_6: +x1_6 +x2_6 +x3_6 +x4_6 +x5_6 = 1
one_7: +x1_7 +x2_7 +x3_7 +x4_7 +x5_7 = 1
one_8: +x1_8 +x2_8 +x3_8 +x4_8 +x5_8 = 1
one_9: +x1_9 +x2_9 +x3_9 +x4_9 +x5_9 = 1
one_10: +x1_10 +x2_10 +x3_10 +x4_10 +x5_10 = 1
one_11: +x1_11 +x2_11 +x3_11 +x4_11 +x5_11 = 1
one_12: +x1_12 +x2_12 +x3_12 +x4_12 +x5_12 = 1
one_13: +x1_13 +x2_13 +x3_13 +x4_13 +x5_13 = 1
one_14: +x1_14 +x2_14 +x3_14 +x4_14 +x5_14 = 1
one_15: +x1_15 +x2_15 +x3_15 +x4_15 +x5_15 = 1
lim_1: +8 x1_1 +15 x1_2 +14 x1_3 +23 x1_4 +8 x1_5 +16 x1_6 +8 x1_7 +25 x1_8 +9 x1_9 +17 x1_10 +25 x1_11 +15 x1_12 +10 x1_13 +8 x1_14 +24 x1_15 <= 36
lim_2: +15 x2_1 +7 x2_2 +23 x2_3 +22 x2_4 +11 x2_5 +11 x2_6 +12 x2_7 +10 x2_8 +17 x2_9 +16 x2_10 +7 x2_11 +16 x2_12 +10 x2_13 +18 x2_14 +22 x2_15 <= 34
lim_3: +21 x3_1 +20 x3_2 +6 x3_3 +22 x3_4 +24 x3_5 +10 x3_6 +24 x3_7 +9 x3_8 +21 x3_9 +14 x3_10 +11 x3_11 +14 x3_12 +11 x3_13 +19 x3_14 +16 x3_15 <= 38
lim_4: +20 x4_1 +11 x4_2 +8 x4_3 +14 x4_4 +9 x4_5 +5 x4_6 +6 x4_7 +19 x4_8 +19 x4_9 +7 x4_10 +6 x4_11 +6 x4_12 +13 x4_13 +9 x4_14 +18 x4_15 <= 27
lim_5: +8 x5_1 +13 x5_2 +13 x5_3 +13 x5_4 +10 x5_5 +20 x5_6 +25 x5_7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