tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
59 stars 17 forks source link

Multi to single optimization objective #58

Closed tpaviot closed 3 years ago

tpaviot commented 3 years ago

This PR introduces an API change.

An objective has now a weight. These weights are taken into consideration only in the case of multiobjective problems.

digital_transformation.add_objective_priorities(weight=1)
digital_transformation.add_objective_makespan(weight=10)

The multiobjective problem is turned into a single objective and use the incremental solver. The default z3 optimization is not used anymore.

Use the "QF_IDL" logics wherever you can.

ping @magic7s

tpaviot commented 3 years ago

Note: the case where both max and min objectives are added is not covered yet.

codecov-commenter commented 3 years ago

Codecov Report

Merging #58 (d8646aa) into master (4385243) will decrease coverage by 0.06%. The diff coverage is 95.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   94.99%   94.93%   -0.07%     
==========================================
  Files          30       30              
  Lines        3358     3318      -40     
==========================================
- Hits         3190     3150      -40     
  Misses        168      168              
Impacted Files Coverage Δ
test/test_indicator.py 99.37% <ø> (-0.01%) :arrow_down:
test/test_multiple_objectives.py 96.29% <ø> (-1.79%) :arrow_down:
processscheduler/solver.py 97.15% <94.44%> (-0.11%) :arrow_down:
processscheduler/problem.py 97.01% <96.96%> (-0.07%) :arrow_down:
processscheduler/objective.py 96.77% <100.00%> (-0.20%) :arrow_down:

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 4385243...d8646aa. Read the comment docs.