Minimize absolute value

class rtctools.optimization.min_abs_goal_programming_mixin.MinAbsGoalProgrammingMixin(*args, **kwargs)[source]

Bases: _GoalProgrammingMixinBase

Similar behavior to GoalProgrammingMixin, but any MinAbsGoal passed to min_abs_goals() or min_abs_path_goals() will be automatically converted to:

  1. An auxiliary minimization variable

  2. Two additional linear constraints relating the auxiliary variable to the goal function

  3. A new goal (of a different type) minimizing the auxiliary variable

min_abs_goals() List[MinAbsGoal][source]

User problem returns list of MinAbsGoal objects.

Returns:

A list of goals.

min_abs_path_goals() List[MinAbsGoal][source]

User problem returns list of MinAbsGoal objects.

Returns:

A list of goals.

class rtctools.optimization.min_abs_goal_programming_mixin.MinAbsGoal[source]

Bases: Goal

Absolute minimization goal class which can be used to minimize the absolute value of the goal’s (linear) goal function. Contrary to its super class, the default order is 1 as absolute minimization is typically desired for fully linear problems.

order = 1

The goal violation value is taken to the order’th power in the objective function.

class rtctools.optimization.min_abs_goal_programming_mixin.MinAbsStateGoal(optimization_problem)[source]

Bases: StateGoal, MinAbsGoal

__init__(optimization_problem)

Initialize the state goal object.

Parameters:

optimization_problemOptimizationProblem instance.