-
Notifications
You must be signed in to change notification settings - Fork 55
Description
For now there are multiple concepts referring to the same idea: we want to use variables from different nodes in a penalty.
-
Since PhaseTransition are just a special case of MultinodeConstraints (but are handled differently in the back ground), we could uniformized and formalize them as a MultinodeConstraint
-
MultinodePenalties can only be used with PhaseDynamics.SHARED_DURING_THE_PHASE if there are 3 nodes or less defined. There is no technical limitation preventing us from using more nodes. So instead of defining 3 cx (hard coded: cx_start, cx_mid and cx_end), we should adapt the number of cx to the number of nodes used in the multinode penalty. This would allow to use PhaseDynamics.SHARED_DURING_THE_PHASE with all multinode penalties. for In addition, this would prevent from defining 3 cx when only one or two are needed, reducing RAM and computational time.
-
The multinodes are handled differently for OdeSolver.COLLOCATION because cx_intermediates_list must be defined. This refactor would allow to uniformize implementation across ode solvers, reducing error risks on the dev and user sides.
-
penalty.derivative and penalty.explicit_derivative indicate to compute the difference between the output of a penalty between two nodes, which is the definition of a MultinodePenalty. This is an artefact from before MultinodePenalties were introduced. Introducing these as formal MultinodePenalties would greatly simplify penalty_option.py and interface_utils.py, which are a nightmare to maintain, thus error-prone.