New linear goal order mixin
Alternative implementation of !250 (closed), but now as a separate mixin.
-
Check/fix docstrings -
Rename to LinearizedOrderGoalProgrammingMixin
The 'ugly' parts, although it can all be considered private/friendly/internal API:
- We override the created objective function by setting
_objective_func
on a Goal instance. GPMixin checks for the existence of this attribute before creating the default. - We refer to the epsilon created by GPMixin for a certain goal with its expected name, which is "path_eps_<normalized_priority>_<goal_index>", or
"eps_{}_{}".format(sym_index, j)
in the relevant code. - We add an option to
goal_programming_options()
Edited by Tjerk Vreeken