pyanno4rt.optimization.components._conventional_component_class

Conventional component template.

Overview

Classes

ConventionalComponentClass

Conventional component template class.

Classes

class pyanno4rt.optimization.components._conventional_component_class.ConventionalComponentClass(name, parameter_name, parameter_category, parameter_value, embedding, weight, rank, bounds, link, identifier, display)[source]

Conventional component template class.

Parameters:
  • name (str) – Name of the component class.

  • parameter_name (tuple) – Name of the component parameters.

  • parameter_category (tuple) – Category of the component parameters.

  • parameter_value (tuple) – Value of the component parameters.

  • embedding ({'active', 'passive'}) – Mode of embedding for the component. In ‘passive’ mode, the component value is computed and tracked, but not considered in the optimization problem, unlike in ‘active’ mode.

  • weight (int or float) – Weight of the component function.

  • rank (int) – Rank of the component in the lexicographic order.

  • bounds (None or list) – Constraint bounds for the component.

  • link (None or list) – Other segments used for joint evaluation.

  • identifier (None or str) – Additional string for naming the component.

  • display (bool) – Indicator for the display of the component.

name

See ‘Parameters’.

Type:

str

parameter_name

See ‘Parameters’.

Type:

tuple

parameter_category

See ‘Parameters’.

Type:

tuple

parameter_value

See ‘Parameters’.

Type:

list

embedding

See ‘Parameters’.

Type:

{‘active’, ‘passive’}

weight

See ‘Parameters’.

Type:

float

rank

See ‘Parameters’.

Type:

int

bounds

See ‘Parameters’.

Type:

list

See ‘Parameters’.

Type:

list

identifier

See ‘Parameters’.

Type:

None or str

display

See ‘Parameters’.

Type:

bool

adjusted_parameters

Indicator for the adjustment of the parameters due to fractionation.

Type:

bool

RETURNS_OUTCOME

Indicator for the outcome focus of the component.

Type:

bool

DEPENDS_ON_MODEL

Indicator for the model dependency of the component.

Type:

bool

Overview

Methods

get_parameter_value()

Get the value of the parameters.

set_parameter_value(*args)

Set the value of the parameters.

get_weight_value()

Get the value of the weight.

set_weight_value(*args)

Set the value of the weight.

compute_value(*args)

abc Compute the component value.

compute_gradient(*args)

abc Compute the component gradient.

Members

get_parameter_value()[source]

Get the value of the parameters.

Returns:

Value of the parameters.

Return type:

list

set_parameter_value(*args)[source]

Set the value of the parameters.

Parameters:

*args (tuple) – Keyworded parameters. args[0] should give the value to be set.

get_weight_value()[source]

Get the value of the weight.

Returns:

Value of the weight.

Return type:

float

set_weight_value(*args)[source]

Set the value of the weight.

Parameters:

*args (tuple) – Keyworded parameters. args[0] should give the value to be set.

abstract compute_value(*args)[source]

Compute the component value.

abstract compute_gradient(*args)[source]

Compute the component gradient.