pn_design_model_larger.mvc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import models/PetriNets_Design as PetriNets
  2. PetriNets pn {
  3. Place critical_section_1 {
  4. tokens = 0
  5. name = "critical_section_1"
  6. }
  7. Place critical_section_2 {
  8. tokens = 0
  9. name = "critical_section_2"
  10. }
  11. Place lock_available {
  12. tokens = 1
  13. name = "lock_available"
  14. }
  15. Transition release_section_1 {
  16. name = "release_section_1"
  17. }
  18. Transition release_section_2 {
  19. name = "release_section_2"
  20. }
  21. Transition acquire_section_1 {
  22. name = "acquire_section_1"
  23. }
  24. Transition acquire_section_2 {
  25. name = "acquire_section_2"
  26. }
  27. P2T (critical_section_1, release_section_1) {
  28. weight = 1
  29. }
  30. P2T (critical_section_2, release_section_2) {
  31. weight = 1
  32. }
  33. P2T (lock_available, acquire_section_1) {
  34. weight = 1
  35. }
  36. P2T (lock_available, acquire_section_2) {
  37. weight = 1
  38. }
  39. T2P (release_section_1, lock_available) {
  40. weight = 1
  41. }
  42. T2P (release_section_2, lock_available) {
  43. weight = 1
  44. }
  45. T2P (acquire_section_1, critical_section_1) {
  46. weight = 1
  47. }
  48. T2P (acquire_section_2, critical_section_2) {
  49. weight = 1
  50. }
  51. }
  52. export pn to models/pn