Deltares / rtc-tools

The Deltares toolbox for control and optimization of environmental systems.
GNU Lesser General Public License v3.0
0 stars 2 forks source link

WIP: Support absolute goal order for minimization goals #1590

Closed SGeeversAtVortech closed 1 month ago

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Dec 30, 2018, 22:19

One would typically use order=2 to minimize the absolute value of the goal function, but that makes nominals a bit harder and easily leads to scaling issues. A more involved option that was used is to introduce an auxiliary variable and additional constraints to minimize the absolute value of the goal function.

It is the latter logic that this commit adds to GoalProgrammingMixin, such that the user now only has to set order="abs" on a Goal instance. The auxiliary variable and accompanying constraints are automatically added behind the scenes.

Closes #1060

TODO:

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Dec 30, 2018, 22:25

TODO:

Open questions:

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Dec 30, 2018, 22:26

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @codecov on Dec 30, 2018, 22:42

Codecov Report

Merging #242 into master will increase coverage by 0.23%. The diff coverage is 81.17%.

Impacted Files Coverage Δ
...rc/rtctools/optimization/goal_programming_mixin.py 82.81% <81.17%> (+0.04%) :arrow_up:
SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Dec 30, 2018, 23:02

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @TPiovesan on Jan 7, 2019, 11:49

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1402

One of these constraints is not convex if the goal function is non-linear. A linearity check is needed.

SGeeversAtVortech commented 1 month ago

In GitLab by @TPiovesan on Jan 7, 2019, 11:49

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1338

Initial underscore?

SGeeversAtVortech commented 1 month ago

In GitLab by @TPiovesan on Jan 7, 2019, 11:49

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1333

Need to overwrite the default order of the goal; i.e., self.order = 1.

SGeeversAtVortech commented 1 month ago

In GitLab by @TPiovesan on Jan 7, 2019, 11:49

Commented on src/rtctools/optimization/goal_programming_mixin.py line 443

abs_var is always non-negative so (0.0, np.inf) is a more appropriate bound

SGeeversAtVortech commented 1 month ago

In GitLab by @TPiovesan on Jan 7, 2019, 11:55

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1331

Weird phrase

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:22

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1402

We do not do convexity checks for goals currently, as this is impossible in GoalProgrammingMixin (at least before solver_input is defined). It is something we could add to CollInt at a later date.

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:24

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1338

I wanted it to be "private", but you're right that we do not do that for the other additional variables. A collision is also unlikely, or at least about as likely as it is with the path_eps/eps variables. Will change.

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:26

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1333

Good catch.

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:26

Commented on src/rtctools/optimization/goal_programming_mixin.py line 443

Good catch.

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:34

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1338

changed this line in version 4 of the diff

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:34

Commented on src/rtctools/optimization/goal_programming_mixin.py line 443

changed this line in version 4 of the diff

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:34

Commented on src/rtctools/optimization/goal_programming_mixin.py line 1331

changed this line in version 4 of the diff

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:34

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 7, 2019, 12:35

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 9, 2019, 14:04

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 9, 2019, 15:04

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 9, 2019, 16:46

added 14 commits

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 9, 2019, 18:10

added 1 commit

Compare with previous version

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 14, 2019, 16:31

The implementation of !245 is preferred to not clutter GPMixin any more.

SGeeversAtVortech commented 1 month ago

In GitLab by @vreeken on Jan 14, 2019, 16:31

closed