commonpower.modeling.base.ElementTypes

class ElementTypes(value)[source]

Bases: IntEnum

The ElementTypes describe the type of ModelElements. This is necessary to allow for specific treatment.

Methods

conjugate

Returns self, the complex conjugate of any int.

bit_length

Number of bits necessary to represent self in binary.

bit_count

Number of ones in the binary representation of the absolute value of self.

to_bytes

Return an array of bytes representing an integer.

from_bytes

Return the integer represented by the given array of bytes.

as_integer_ratio

Return integer ratio.

Attributes

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

STATE

State variable.

VAR

Generic variable.

INPUT

Input variable.

DATA

Exogenous input, which is read from a data provider.

CONSTANT

Fixed Parameter.

CONSTRAINT

Constraint.

ROBUST_CONSTRAINT

Robust constraint.

COST

Cost variable.

SET

Set.

CONSTANT = 5

Fixed Parameter. Parameters can either be constant across runs or be initialized in each run based on a specific logic. Maps to the Pyomo type Param.

CONSTRAINT = 6

Constraint. Input coupling and dynamics functions are defined with this type. Maps to the Pyomo type Constraint.

COST = 8

Cost variable. This is essentially a generic variable but explicitly defined to simplify downstream analysis. Maps to the Pyomo type Var.

DATA = 4

Exogenous input, which is read from a data provider. Maps to the Pyomo type Param.

INPUT = 3

Input variable. Maps to the Pyomo type Var.

ROBUST_CONSTRAINT = 7

Robust constraint. This is a special type of constraint that is evaluated by the RobustConstraintBuilder. Is expanded to (usually) multiple instances of the Pyomo type Constraint.

SET = 9

Set. Sets can be useful to specify the values a discrete variable can take. Maps to the Pyomo type Set.

STATE = 1

State variable. Maps to the Pyomo type Var.

VAR = 2

Generic variable. The difference to state variables is that VAR does not have to be initialized. Maps to the Pyomo type Var.