sketch.BASE.sa 892 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import ExternalModule
  2. module LocalModule
  3. semantic adaptation Adapted_FMU_Name
  4. for fmu fmu1, fmu2, fmu3, fmu4, ... ; \\ Kenneth> how does it know where the FMU fils are_):?
  5. input ports in_port_1,
  6. in_port_2,
  7. ...
  8. ;
  9. output ports out_port_1,
  10. out_port_2,
  11. ...
  12. ;
  13. param p1 := c1,
  14. p2 := c2,
  15. ...
  16. ;
  17. in var iv1 := init_iv1,
  18. iv2 := init_iv2,
  19. ...
  20. ;
  21. out var ov1 := init_ov1,
  22. ov2 := init_ov2,
  23. ...
  24. ;
  25. in rules {
  26. in_condition_1 -> {
  27. sa_in_1 //function with write access to invars with no read access to any vars except input.
  28. } --> {
  29. update_in_1 //read all (except out vars) and write access to all invars
  30. };
  31. in_condition_2 -> {
  32. sa_in_2
  33. } --> {
  34. update_in_2
  35. };
  36. ...
  37. }
  38. control rules {
  39. ...
  40. return step_size;
  41. }
  42. out rules {
  43. out_condition_1 -> {
  44. update_out_1
  45. } --> { sa_out_1 };
  46. in_condition_2 -> {
  47. update_out_1
  48. } --> { sa_out_2 };
  49. ...
  50. }