You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* check and set variable types when setting value
* handle special FMI3Types in class
* import FMI3 specical data types
* set value for fmi3 through ssv files
* update setValue.rst with FMI-3.0 data types
Copy file name to clipboardExpand all lines: doc/UsersGuide/source/api/oms3/setValue.rst
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ when the model is simulated or exported.
11
11
* The parameter must exist in the referenced FMU/component or a top level system connectors; otherwise, an error will be raised.
12
12
* Values are stored at the SSP level and exported together with the model structure.
13
13
* Supported data types are numerical (``float``, ``int``, ``str``, ``bool``).
14
+
* Special FMI-3.0 data types like ``Float64``, ``Float32``, ``Int8``, ``Int16``, ``Int32``, ``Int64``, ``UInt8``, ``UInt16``, ``UInt32``, ``UInt64`` are handled via special
15
+
classes in OMSimulator like ``Float64``, ``Int32``, etc. These classes can be imported from OMSimulator and used to set parameter values with specific fmi3 data types.
14
16
* Parameters can be set before or after instantation.
15
17
16
18
**Syntax:**
@@ -21,7 +23,7 @@ when the model is simulated or exported.
21
23
22
24
**Parameters:**
23
25
- ``cref`` (*CRef*): Reference to the parameter variable within a component. The :class:`CRef` must specify the system, component, and parameter name (e.g., ``CRef("default", "Add1", "k1")``).
24
-
- ``value`` (*float* | *int* | *str* | *bool* ): The value to assign to the parameter.
26
+
- ``value`` (*float* | *int* | *str* | *bool* | *Float64* | *Float32* | *Int8* | *Int16* | *Int32* | *Int64* | *UInt8* | *UInt16* | *UInt32* | *UInt64*): The value to assign to the parameter.
25
27
26
28
**Example usage**:
27
29
@@ -54,3 +56,28 @@ when the model is simulated or exported.
54
56
55
57
# Export the SSP with parameter values applied
56
58
model.export("setValue2.ssp")
59
+
60
+
61
+
**Example of setting FMI-3.0 specific data types:**
0 commit comments