Deltares / rtc-tools

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

Fix seed derivatives - [merged] #1326

Closed SGeeversAtVortech closed 1 week ago

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Oct 25, 2018, 15:28

Merges seed-derivatives -> master

The value of the derivatives is added to the seed.

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 1, 2018, 11:21

added 2 commits

Compare with previous version

SGeeversAtVortech commented 5 years ago

In GitLab by @codecov on Nov 1, 2018, 11:25

Codecov Report

Merging #198 into master will increase coverage by 0.05%. The diff coverage is 82.35%.

Impacted Files Coverage Δ
src/rtctools/optimization/homotopy_mixin.py 0% <0%> (ø) :arrow_up:
...tion/collocated_integrated_optimization_problem.py 74.08% <100%> (+0.3%) :arrow_up:
...rc/rtctools/optimization/goal_programming_mixin.py 84.06% <50%> (-0.13%) :arrow_down:
SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 14:32

Commented on src/rtctools/optimization/collocated_integrated_optimization_problem.py line 1756

Would need to be synced with a better identifier (see below)

SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 14:32

Commented on src/rtctools/optimization/collocated_integrated_optimization_problem.py line 1831

We need to give the result a better name than "der(X)", since this only concerns t0 values of the derivatives. How about "der(X)(0)"?

SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 14:32

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

Rather than checking on length, it would be safer to check the key to see whether we are dealing with a t0 derivative value.

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 1, 2018, 15:20

Commented on src/rtctools/optimization/collocated_integrated_optimization_problem.py line 1756

changed this line in version 3 of the diff

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 1, 2018, 15:20

added 2 commits

Compare with previous version

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 1, 2018, 15:25

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

In this way we make sure that we seed also the extra_variables. With @vreeken we decided to leave the check like this.

SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 15:28

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

Good point on the extra_variables.

SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 15:28

resolved all discussions

SGeeversAtVortech commented 5 years ago

In GitLab by @baayen on Nov 1, 2018, 15:28

approved this merge request

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 1, 2018, 17:45

added 5 commits

Compare with previous version

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:35

added 3 commits

Compare with previous version

SGeeversAtVortech commented 5 years ago

In GitLab by @vreeken on Nov 2, 2018, 16:42

Commented on tests/optimization/test_goal_programming.py line 839

Why set this tolerance if you're not using it below?

SGeeversAtVortech commented 5 years ago

In GitLab by @vreeken on Nov 2, 2018, 16:42

Commented on tests/optimization/test_goal_programming.py line 843

That is a very low tolerance. I would assume it's either zero (and just use assertEqual then), of something like 1e-6.

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:48

Commented on tests/optimization/test_goal_programming.py line 843

I didn't use assertEqual because, as far as I could figure out, you can only assert equality for each element of the array and for all of it at once. I decided against doing a loop over the elements as I though it was an uglier check, but I can as well do that.

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:48

Commented on tests/optimization/test_goal_programming.py line 839

You are right. This is useless.

SGeeversAtVortech commented 5 years ago

In GitLab by @vreeken on Nov 2, 2018, 16:52

Commented on tests/optimization/test_goal_programming.py line 843

If they are both arrays, you can use self.assertTrue(np.array_equal(v1, v2)) instead.

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:56

Commented on tests/optimization/test_goal_programming.py line 843

OK

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:59

Commented on tests/optimization/test_goal_programming.py line 839

changed this line in version 6 of the diff

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:59

Commented on tests/optimization/test_goal_programming.py line 843

changed this line in version 6 of the diff

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 16:59

added 1 commit

Compare with previous version

SGeeversAtVortech commented 5 years ago

In GitLab by @vreeken on Nov 2, 2018, 17:03

approved this merge request

SGeeversAtVortech commented 5 years ago

In GitLab by @TPiovesan on Nov 2, 2018, 17:21

merged