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

Feature request: Multiobjective incremental solver in creation order (equivalent to 'lexicon') #73

Open dreinon opened 3 years ago

dreinon commented 3 years ago

It might be useful for some cases of use to have this kind of solver.

tpaviot commented 3 years ago

ok, got it. This will require some refactoring in the solver code but it can be done, most of the material is already there.

dreinon commented 3 years ago

I have achieved this for now by:

  1. solving for the first objective
  2. adding a constraint to make the indicator value be the one gotten in (1)
  3. Adding the next objective and solving for both at the same time (since I can't delete the first) with the constraint in (2).

Because of 2, I modified the returns of add_objective methods to return indicators, so I could apply constraints to them.

It might be better if the objective of (1) is removed before (3) since the constraint of (2) does the work.