From 4df8e990d5dbd52ed42cc0733e98687a33858eb0 Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Tue, 23 Nov 2021 20:22:30 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20ajout=20des=20modifs=20de=20la=20derni?= =?UTF-8?q?=C3=A8re=20fois?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 0 docs/rapport.md | 0 exo1/voitures.lp | 0 exo1/voitures.sol | 0 exo2/personnel.dat | 0 exo2/personnel.mod | 0 exo2/personnel.sol | 0 exo3/bourse.lp | 0 exo3/bourse.sol | 0 exo4/ecommerce.dat | 0 exo4/ecommerce.mod | 0 exo4/ecommerce.sol | 0 exo4/ecommerce2.sol | 77 --------------------------------- exo4/ecommerce3.sol | 101 -------------------------------------------- exobonus/bonus.dat | 0 exobonus/bonus.mod | 13 +++--- script.sh | 0 17 files changed, 6 insertions(+), 185 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 docs/rapport.md mode change 100644 => 100755 exo1/voitures.lp mode change 100644 => 100755 exo1/voitures.sol mode change 100644 => 100755 exo2/personnel.dat mode change 100644 => 100755 exo2/personnel.mod mode change 100644 => 100755 exo2/personnel.sol mode change 100644 => 100755 exo3/bourse.lp mode change 100644 => 100755 exo3/bourse.sol mode change 100644 => 100755 exo4/ecommerce.dat mode change 100644 => 100755 exo4/ecommerce.mod mode change 100644 => 100755 exo4/ecommerce.sol delete mode 100644 exo4/ecommerce2.sol delete mode 100644 exo4/ecommerce3.sol mode change 100644 => 100755 exobonus/bonus.dat mode change 100644 => 100755 exobonus/bonus.mod mode change 100644 => 100755 script.sh diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/docs/rapport.md b/docs/rapport.md old mode 100644 new mode 100755 diff --git a/exo1/voitures.lp b/exo1/voitures.lp old mode 100644 new mode 100755 diff --git a/exo1/voitures.sol b/exo1/voitures.sol old mode 100644 new mode 100755 diff --git a/exo2/personnel.dat b/exo2/personnel.dat old mode 100644 new mode 100755 diff --git a/exo2/personnel.mod b/exo2/personnel.mod old mode 100644 new mode 100755 diff --git a/exo2/personnel.sol b/exo2/personnel.sol old mode 100644 new mode 100755 diff --git a/exo3/bourse.lp b/exo3/bourse.lp old mode 100644 new mode 100755 diff --git a/exo3/bourse.sol b/exo3/bourse.sol old mode 100644 new mode 100755 diff --git a/exo4/ecommerce.dat b/exo4/ecommerce.dat old mode 100644 new mode 100755 diff --git a/exo4/ecommerce.mod b/exo4/ecommerce.mod old mode 100644 new mode 100755 diff --git a/exo4/ecommerce.sol b/exo4/ecommerce.sol old mode 100644 new mode 100755 diff --git a/exo4/ecommerce2.sol b/exo4/ecommerce2.sol deleted file mode 100644 index bcd5b29..0000000 --- a/exo4/ecommerce2.sol +++ /dev/null @@ -1,77 +0,0 @@ -Problem: ecommerce -Rows: 11 -Columns: 12 -Non-zeros: 33 -Status: OPTIMAL -Objective: CoutTotal = 5.25 (MINimum) - - No. Row name St Activity Lower bound Upper bound Marginal ------- ------------ -- ------------- ------------- ------------- ------------- - 1 ProportionTotalUn[d1,f1] - NS 1 1 = 2 - 2 ProportionTotalUn[d1,f2] - NS 1 1 = 1 - 3 ProportionTotalUn[d2,f1] - NS 1 1 = 2 - 4 ProportionTotalUn[d2,f2] - NS 1 1 = 3 - 5 RespectDesStocks[f1,m1] - NU 2.5 2.5 -0.5 - 6 RespectDesStocks[f1,m2] - B 0.5 1 - 7 RespectDesStocks[f1,m3] - B 0 2 - 8 RespectDesStocks[f2,m1] - NU 1 1 -0.666667 - 9 RespectDesStocks[f2,m2] - B 1 2 - 10 RespectDesStocks[f2,m3] - NU 1 1 -0.333333 - 11 CoutTotal B 5.25 - - No. Column name St Activity Lower bound Upper bound Marginal ------- ------------ -- ------------- ------------- ------------- ------------- - 1 coef[d1,f1,m1] - B 0.75 0 1 - 2 coef[d1,f1,m2] - B 0.25 0 1 - 3 coef[d1,f1,m3] - NL 0 0 1 1 - 4 coef[d1,f2,m1] - B 1 0 1 - 5 coef[d1,f2,m2] - NL 0 0 1 2 - 6 coef[d1,f2,m3] - NL 0 0 1 1 - 7 coef[d2,f1,m1] - NU 1 0 1 -0.5 - 8 coef[d2,f1,m2] - B 0 0 1 - 9 coef[d2,f1,m3] - NL 0 0 1 1 - 10 coef[d2,f2,m1] - B 0.333333 0 1 - 11 coef[d2,f2,m2] - B 0.333333 0 1 - 12 coef[d2,f2,m3] - B 0.333333 0 1 - -Karush-Kuhn-Tucker optimality conditions: - -KKT.PE: max.abs.err = 4.44e-16 on row 8 - max.rel.err = 1.48e-16 on row 8 - High quality - -KKT.PB: max.abs.err = 0.00e+00 on row 0 - max.rel.err = 0.00e+00 on row 0 - High quality - -KKT.DE: max.abs.err = 0.00e+00 on column 0 - max.rel.err = 0.00e+00 on column 0 - High quality - -KKT.DB: max.abs.err = 0.00e+00 on row 0 - max.rel.err = 0.00e+00 on row 0 - High quality - -End of output diff --git a/exo4/ecommerce3.sol b/exo4/ecommerce3.sol deleted file mode 100644 index c4673e3..0000000 --- a/exo4/ecommerce3.sol +++ /dev/null @@ -1,101 +0,0 @@ -Problem: ecommerce -Rows: 23 -Columns: 12 -Non-zeros: 45 -Status: OPTIMAL -Objective: CoutTotal = 8 (MINimum) - - No. Row name St Activity Lower bound Upper bound Marginal ------- ------------ -- ------------- ------------- ------------- ------------- - 1 ProportionZeroUn[d1,f1,m1] - B 0.75 1 - 2 ProportionZeroUn[d1,f1,m2] - B 0.25 1 - 3 ProportionZeroUn[d1,f1,m3] - B 0 1 - 4 ProportionZeroUn[d1,f2,m1] - B 1 1 - 5 ProportionZeroUn[d1,f2,m2] - B 0 1 - 6 ProportionZeroUn[d1,f2,m3] - B 0 1 - 7 ProportionZeroUn[d2,f1,m1] - NU 1 1 -3 - 8 ProportionZeroUn[d2,f1,m2] - B 0 1 - 9 ProportionZeroUn[d2,f1,m3] - B 0 1 - 10 ProportionZeroUn[d2,f2,m1] - B 0.333333 1 - 11 ProportionZeroUn[d2,f2,m2] - B 0.333333 1 - 12 ProportionZeroUn[d2,f2,m3] - B 0.333333 1 - 13 ProportionTotalUn[d1,f1] - NS 1 1 = 2 - 14 ProportionTotalUn[d1,f2] - NS 1 1 = 2 - 15 ProportionTotalUn[d2,f1] - NS 1 1 = 4 - 16 ProportionTotalUn[d2,f2] - NS 1 1 = 5 - 17 RespectDesStocks[f1,m1] - NU 2.5 2.5 < eps - 18 RespectDesStocks[f1,m2] - B 0.5 1 - 19 RespectDesStocks[f1,m3] - B 0 2 - 20 RespectDesStocks[f2,m1] - NU 1 1 -1.33333 - 21 RespectDesStocks[f2,m2] - B 1 2 - 22 RespectDesStocks[f2,m3] - NU 1 1 -0.666667 - 23 CoutTotal B 8 - - No. Column name St Activity Lower bound Upper bound Marginal ------- ------------ -- ------------- ------------- ------------- ------------- - 1 coef[d1,f1,m1] - B 0.75 0 - 2 coef[d1,f1,m2] - B 0.25 0 - 3 coef[d1,f1,m3] - NL 0 0 1 - 4 coef[d1,f2,m1] - B 1 0 - 5 coef[d1,f2,m2] - NL 0 0 1 - 6 coef[d1,f2,m3] - NL 0 0 < eps - 7 coef[d2,f1,m1] - B 1 0 - 8 coef[d2,f1,m2] - NL 0 0 < eps - 9 coef[d2,f1,m3] - B 0 0 - 10 coef[d2,f2,m1] - B 0.333333 0 - 11 coef[d2,f2,m2] - B 0.333333 0 - 12 coef[d2,f2,m3] - B 0.333333 0 - -Karush-Kuhn-Tucker optimality conditions: - -KKT.PE: max.abs.err = 4.44e-16 on row 20 - max.rel.err = 1.48e-16 on row 20 - High quality - -KKT.PB: max.abs.err = 0.00e+00 on row 0 - max.rel.err = 0.00e+00 on row 0 - High quality - -KKT.DE: max.abs.err = 0.00e+00 on column 0 - max.rel.err = 0.00e+00 on column 0 - High quality - -KKT.DB: max.abs.err = 0.00e+00 on row 0 - max.rel.err = 0.00e+00 on row 0 - High quality - -End of output diff --git a/exobonus/bonus.dat b/exobonus/bonus.dat old mode 100644 new mode 100755 diff --git a/exobonus/bonus.mod b/exobonus/bonus.mod old mode 100644 new mode 100755 index 783e326..13ea78e --- a/exobonus/bonus.mod +++ b/exobonus/bonus.mod @@ -1,4 +1,3 @@ -# # 0 1 2 3 5 # 1 0 1 2 3 # 2 1 0 1 2 @@ -18,10 +17,6 @@ # 1 0 0 0 0 # # 4 2 3 5 1 -# - -# GLPK model file created by SUN for RO teaching - ############################### Model ############################### @@ -47,8 +42,12 @@ s.t. RespectUnePersonneParTravail{j in POSITIONS}: sum{i in POSITIONS} cycle[i, j] = 1; # Pas de sous cycle -s.t. SousCycle1{(i in POSITIONS, j in POSITIONS):(i <= j and i < 4)}: - sum{k in POSITIONS, l in POSITIONS: i <= k <= j, i <= l <= j} cycle[k, l] <= (j - i + 1); +s.t. SousCycle{i in POSITIONS, j in POSITIONS}: + + if (i <= j && i < 4) then + sum {k in POSITIONS, l in POSITIONS} (cycle[k, l] && (i <= k <= j && i <= l <= j)) <= (j - i + 1)) + else + true; ###### Objective ###### diff --git a/script.sh b/script.sh old mode 100644 new mode 100755