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
add support for ssc:LinearTransformation in connections (#1566)
* propagate linearTransformation to C code base
* propagate linearTransformation from python to C-API
* apply linearTransformation during simulation
* support LinearTransformation in parameter mapping
Copy file name to clipboardExpand all lines: include/OMSimulator/Types.h
+23-5Lines changed: 23 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -316,15 +316,33 @@ typedef struct {
316
316
doubley2;
317
317
} ssd_system_geometry_t;
318
318
319
+
/*
320
+
* \brief 4.5.2.1 ssc:LinearTransformation
321
+
* This element provides for a linear transformation of the source value to the target value,
322
+
* i.e. in the calculation target = factor * source + offset.
323
+
*/
324
+
typedefstruct {
325
+
/*
326
+
* This attribute specifies an optional factor value to use in a linear transformation. The default is 1.
327
+
*/
328
+
doublefactor;
329
+
/*
330
+
* This attribute specifies an optional offset value to use in a linear transformation. The default is 0.
331
+
*/
332
+
doubleoffset;
333
+
boolisSet; ///< This flag indicates whether the linear transformation has been set or not. The default is false.
334
+
} oms_linear_transformation_t;
335
+
319
336
/**
320
337
* \brief Connection between two connectors.
321
338
*/
322
339
typedefstruct {
323
-
oms_connection_type_enu_ttype; ///< Connection type
324
-
char*conA; ///< Name of connector A
325
-
char*conB; ///< Name of connector B
326
-
ssd_connection_geometry_t*geometry; ///< Geometry information of the connection
327
-
boolsuppressUnitConversion; ///< Boolean to specify if automatic unit conversion between connections should be suppressed
340
+
oms_connection_type_enu_ttype; ///< Connection type
341
+
char*conA; ///< Name of connector A
342
+
char*conB; ///< Name of connector B
343
+
ssd_connection_geometry_t*geometry; ///< Geometry information of the connection
344
+
boolsuppressUnitConversion; ///< Boolean to specify if automatic unit conversion between connections should be suppressed
345
+
oms_linear_transformation_tlinearTransformation; ///< Linear transformation of the source value to the target value, i.e. in the calculation target = factor * source + offset.
std::vector<Connection*> connections; // needed to set the units and resolve linear transformation of the connections in the strongly connected components
0 commit comments