Commit c19ab862 authored by Tjerk Vreeken's avatar Tjerk Vreeken

Fix big-M in mixed integer example

Similar to the big-M fix for the goal proramming example done in
commit a1101002.
parent e9e4ecfa
......@@ -4,19 +4,19 @@ time,Q_orifice,Q_pump,is_downhill,sea_level,storage_level
2013-05-20 00:00:00,4.729408,0.000000,1.000000,0.200000,0.398123
2013-05-20 01:00:00,3.423235,0.000000,1.000000,0.300000,0.403799
2013-05-20 02:00:00,1.378672,0.000000,1.000000,0.400000,0.416836
2013-05-20 03:00:00,0.000000,4.476889,0.000000,0.500000,0.418719
2013-05-20 04:00:00,0.000000,4.103700,0.000000,0.600000,0.421946
2013-05-20 05:00:00,0.000000,3.817639,0.000000,0.700000,0.426203
2013-05-20 06:00:00,0.000000,3.544285,0.000000,0.800000,0.431443
2013-05-20 07:00:00,0.000000,3.265951,0.000000,0.900000,0.437686
2013-05-20 08:00:00,0.000000,2.976000,0.000000,1.000000,0.444972
2013-05-20 09:00:00,0.000000,2.671708,0.000000,0.900000,0.453354
2013-05-20 10:00:00,0.000000,2.340619,0.000000,0.800000,0.462928
2013-05-20 11:00:00,0.000000,1.983423,0.000000,0.700000,0.473787
2013-05-20 12:00:00,0.000000,1.592914,0.000000,0.600000,0.486053
2013-05-20 13:00:00,0.000315,1.125490,1.000000,0.500000,0.500000
2013-05-20 03:00:00,0.000000,4.403457,0.000000,0.500000,0.418984
2013-05-20 04:00:00,0.000000,4.039766,0.000000,0.600000,0.422441
2013-05-20 05:00:00,0.000000,3.770278,0.000000,0.700000,0.426868
2013-05-20 06:00:00,0.000000,3.517466,0.000000,0.800000,0.432205
2013-05-20 07:00:00,0.000000,3.256937,0.000000,0.900000,0.438480
2013-05-20 08:00:00,0.000000,2.994531,0.000000,1.000000,0.445699
2013-05-20 09:00:00,0.000000,2.712544,0.000000,0.900000,0.453934
2013-05-20 10:00:00,0.000000,2.390271,0.000000,0.800000,0.463329
2013-05-20 11:00:00,0.000000,2.029730,0.000000,0.700000,0.474022
2013-05-20 12:00:00,0.000000,1.633157,0.000000,0.600000,0.486143
2013-05-20 13:00:00,0.001503,1.149293,1.000000,0.500000,0.500000
2013-05-20 14:00:00,3.360000,1.640000,1.000000,0.400000,0.500000
2013-05-20 15:00:00,4.751758,0.248242,1.000000,0.300000,0.500000
2013-05-20 16:00:00,5.475820,0.000000,1.000000,0.200000,0.498287
2013-05-20 17:00:00,5.815266,0.000000,1.000000,0.100000,0.495352
2013-05-20 18:00:00,5.494218,0.000000,1.000000,0.000000,0.493573
2013-05-20 16:00:00,5.485497,0.000000,1.000000,0.200000,0.498252
2013-05-20 17:00:00,5.819139,0.000000,1.000000,0.100000,0.495303
2013-05-20 18:00:00,5.505331,0.000000,1.000000,0.000000,0.493484
......@@ -26,8 +26,7 @@ class Example(CSVMixin, ModelicaMixin, CollocatedIntegratedOptimizationProblem):
def path_constraints(self, ensemble_member):
# Call super to get default constraints
constraints = super().path_constraints(ensemble_member)
# M is a handy big number
M = 1e10
M = 2 # The so-called "big-M"
# Release through orifice downhill only. This constraint enforces the
# fact that water only flows downhill.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment