my_petrinet_with_MM_and_constraints.mvc 555 B

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