my_petrinet_with_MM.mvc 580 B

1234567891011121314151617181920212223242526272829303132333435
  1. import models/SimpleClassDiagrams as SCD
  2. include "primitives.alh"
  3. SCD PetriNets{
  4. Class Natural {}
  5. Class Place{
  6. tokens : Natural
  7. }
  8. Class Transition{}
  9. Association P2T (Place, Transition) {
  10. weight : Natural
  11. }
  12. Association T2P (Transition, Place) {
  13. weight : Natural
  14. }
  15. }
  16. PetriNets my_petrinet {
  17. Place p1 {
  18. tokens = 1
  19. }
  20. Place p2 {
  21. tokens = 3
  22. }
  23. Transition t1 {}
  24. P2T (p1, t1) {
  25. weight = 1
  26. }
  27. T2P (t1, p2) {
  28. weight = 2
  29. }
  30. }
  31. export my_petrinet to models/my_petrinet