Linearized order

class rtctools.optimization.linearized_order_goal_programming_mixin.LinearizedOrderGoalProgrammingMixin(**kwargs)[source]

Bases: rtctools.optimization.goal_programming_mixin_base._GoalProgrammingMixinBase

Adds support for linearization of the goal objective functions, i.e. the violation variables to a certain power. This can be used to keep a problem fully linear and/or make sure that no quadratic constraints appear when using the goal programming option keep_soft_constraints.


If linearize_goal_order is set to True, the goal’s order will be approximated linearly for any goals where order > 1. Note that this option does not work with minimization goals of higher order. Instead, it is suggested to transform these minimization goals into goals with a target (and function range) when using this option. Note that this option can be overriden on the level of a goal by using a LinearizedOrderGoal (see LinearizedOrderGoal.linearize_order).

class rtctools.optimization.linearized_order_goal_programming_mixin.LinearizedOrderGoal[source]

Bases: rtctools.optimization.goal_programming_mixin_base.Goal

linearize_order = None

Override linearization of goal order. Related global goal programming option is linearize_goal_order (see LinearizedOrderGoalProgrammingMixin.goal_programming_options()). The default value of None defers to the global option, but the user can explicitly override it per goal by setting this value to True or False.

class rtctools.optimization.linearized_order_goal_programming_mixin.LinearizedOrderStateGoal(optimization_problem)[source]

Bases: rtctools.optimization.linearized_order_goal_programming_mixin.LinearizedOrderGoal, rtctools.optimization.goal_programming_mixin_base.StateGoal

Convenience class definition for linearized order state goals. Note that it is possible to just inherit from LinearizedOrderGoal to get the needed functionality for control of the linearization at goal level.


Initialize the state goal object.

Parameters:optimization_problemOptimizationProblem instance.