commonpower.modeling.base.ElementTypes
- class ElementTypes(value)[source]
Bases:
IntEnumThe ElementTypes describe the type of ModelElements. This is necessary to allow for specific treatment.
Methods
conjugateReturns self, the complex conjugate of any int.
bit_lengthNumber of bits necessary to represent self in binary.
bit_countNumber of ones in the binary representation of the absolute value of self.
to_bytesReturn an array of bytes representing an integer.
from_bytesReturn the integer represented by the given array of bytes.
as_integer_ratioReturn integer ratio.
Attributes
realthe real part of a complex number
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
denominatorthe denominator of a rational number in lowest terms
State variable.
Generic variable.
Input variable.
Exogenous input, which is read from a data provider.
Fixed Parameter.
Constraint.
Robust constraint.
Cost variable.
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.