scenario.sa 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. module PowerWindowModel
  2. /*
  3. Each of these fmu descriptions has to include more information about the FMU.
  4. Namely:
  5. environment must refer to the name of the instance of the FMU. Therefore, the name of the FMU to be instantiated is missing.
  6. The location of the .fmu file is also missing.
  7. The "type discrete event" no longer serves any purpose, so should be removed.
  8. The "full internal dependencies" is not needed once you have the file to parse.
  9. The "output ports" can be specified here, for syntax completion purposes, but they can be retrieved from the *.fmu file.
  10. If you agree with these changes, you should have the following:
  11. fmu Environent environment // declares the instance name environment of the FMU environment.
  12. ./path/to/Environment.fmu
  13. output ports passenger_up, passenger_down, driver_up, driver_down
  14. */
  15. fmu environment
  16. type discrete event
  17. output ports passenger_up, passenger_down, driver_up, driver_down
  18. full internal dependencies
  19. fmu controller
  20. type discrete event
  21. input ports obj_detected, passenger_up, passenger_down, driver_up, driver_down
  22. output ports up, down, stop
  23. full internal dependencies
  24. fmu power
  25. type continuous time
  26. input ports up, down, reaction_torque (N.m)
  27. output ports armature_current (mA), motor_speed (m/s)
  28. full internal dependencies
  29. fmu window
  30. type continuous time
  31. input ports motor_speed (m/s), reaction_force (N)
  32. output ports height (cm), window_reaction_torque (N.m)
  33. full internal dependencies
  34. fmu obstacle
  35. type continuous time
  36. input ports height (m)
  37. output ports reaction_force (N)
  38. full internal dependencies
  39. /*
  40. The dotted syntax will have to be supported.
  41. According the Casper and Kenneth, it is very common to have variables with the same name, but that should not be connected. So it is better to not assume implicit connections in this description.
  42. */
  43. armature_current -> obj_detected // only ports that change names need to be connected