MaximizingFunctionWeight#

class pybrops.opt.prob.FunctionWeight.MaximizingFunctionWeight(wt, optimization_type='min')[source]#

Bases: FunctionWeight

Class for representing weights for functions that are maximizing in their natural state.

Constructor for MaximizingFunctionWeight.

Parameters:
  • wt (Real) – A weight value. Must be non-negative.

  • optimization_type (str) –

    The problem optimization type for which to calculate the weight sign. Must be either "min" or "max" to represent a minimizing or maximizing optimization, respectively.

    If the function in its original state is naturally maximizing and the optimization type is minimizing, then wt is represented in its negated form by this class.

    If the function in its original state is naturally maximizing and the optimization type is maximizing, then wt is represented in its unaltered form by this class.

Methods

Attributes

optimization_type

The problem type for which to calculate the weight sign..

wt

A weight value.

property optimization_type: str#

The problem type for which to calculate the weight sign..

property wt: Real#

A weight value.