Linearized order

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

Bases: _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.

goal_programming_options()[source]

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: 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: LinearizedOrderGoal, 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.

__init__(optimization_problem)

Initialize the state goal object.

Parameters:

optimization_problemOptimizationProblem instance.