Minimize absolute value
- class rtctools.optimization.min_abs_goal_programming_mixin.MinAbsGoalProgrammingMixin(*args, **kwargs)[source]
Bases:
_GoalProgrammingMixinBase
Similar behavior to
GoalProgrammingMixin
, but anyMinAbsGoal
passed tomin_abs_goals()
ormin_abs_path_goals()
will be automatically converted to:An auxiliary minimization variable
Two additional linear constraints relating the auxiliary variable to the goal function
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_problem –
OptimizationProblem
instance.