force-h2020 / force-bdss

Business Decision System general interface
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

separated scipy from weights #340

Closed sparsonslab closed 4 years ago

sparsonslab commented 4 years ago

Description

Contributes to #321. Separates scipy optimization from the consideration of weights, by creating a new ScipyOptimizerEngine class whose optimize() method just returns the optimal point found. WeightedOptimizerEngine then becomes a subclass of ScipyOptimizerEngine.

Summary

Separates scipy optimization from the consideration of weights.

Future Work

To create a mixin-class for weighted methods (as suggested in #321)

Changes

Added ScipyOptimizerEngine class. WeightedOptimizerEngine is much the same as it was before, but now:

codecov[bot] commented 4 years ago

Codecov Report

Merging #340 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
+ Coverage   98.40%   98.42%   +0.01%     
==========================================
  Files          60       61       +1     
  Lines        1694     1709      +15     
  Branches      172      172              
==========================================
+ Hits         1667     1682      +15     
  Misses         23       23              
  Partials        4        4              
Impacted Files Coverage Δ
force_bdss/api.py 100.00% <100.00%> (ø)
...ss/mco/optimizer_engines/scipy_optimizer_engine.py 100.00% <100.00%> (ø)
force_bdss/mco/optimizer_engines/space_sampling.py 100.00% <100.00%> (ø)
...mco/optimizer_engines/weighted_optimizer_engine.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c345905...744d1a5. Read the comment docs.

sparsonslab commented 4 years ago

Obviously doesn't pass code coverage, as I haven't put in any tests for the new scipy-engine class. But is this the kind of thing you were thinking of?