FmiOutputVariable¶
- class mlfmu.types.fmu_component.FmiOutputVariable(*, name: str, type: ~mlfmu.types.fmu_component.FmiVariableType = FmiVariableType.REAL, description: str | None = None, variability: ~mlfmu.types.fmu_component.FmiVariability | None = None, startValue: float | str | bool | int | None = 0, isArray: bool = False, length: int | None = None, agentOutputIndexes: list[~typing.Annotated[str, ~pydantic.types.StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^(\d+|\d+:\d+)$)]] = [], causality: ~mlfmu.types.fmu_component.FmiCausality, variableReferences: list[int])¶
Bases:
OutputVariableData class representing an output variable in an FMI component.
- __init__(**kwargs: Any) None¶
Create an FMI output variable.
- Parameters:
causality (FmiCausality, optional) – Causality of the output variable., by default FmiCausality.OUTPUT
variable_references (list[int], optional) – List of variable references associated with the output variable., by default []
Methods
__init__(**kwargs)Create an FMI output variable.
construct([_fields_set])copy(*[, include, exclude, update, deep])Returns a copy of the model.
dict(*[, include, exclude, by_alias, ...])from_orm(obj)json(*[, include, exclude, by_alias, ...])model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, include, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
parse_file(path, *[, content_type, ...])parse_obj(obj)parse_raw(b, *[, content_type, encoding, ...])schema([by_alias, ref_template])schema_json(*[, by_alias, ref_template])update_forward_refs(**localns)validate(value)Attributes
model_computed_fieldsConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
The causality of the output variable.
The list of variable references associated with the output variable.
agent_output_indexesIndex or range of indices of agent outputs that will be linked to this output signal.
nameUnique name for the port.
typeData type as defined by FMI standard.
descriptionShort FMU variable description.
variabilitySignal variability as defined by FMI.
start_valueInitial value of the signal at time step 1.
is_arrayWhen dealing with an array signal, it is essential to specify the LENGTH parameter.
lengthDefines the number of entries in the signal if the signal is array.
- causality: FmiCausality¶
The causality of the output variable.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- variable_references: list[int]¶
The list of variable references associated with the output variable.