You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

364 lines
15 KiB

  1. mdp
  2. // parameters
  3. const int n_resources = 3;
  4. const int n_tasks = 2;
  5. const int n_sensors = 4;
  6. // sensor resources
  7. const int resource1=1;
  8. const int resource2=2;
  9. const int resource3=3;
  10. const int resource4=1;
  11. // network configuration
  12. const int e12=1;
  13. const int e13=1;
  14. const int e14=1;
  15. const int e21=e12;
  16. const int e23=1;
  17. const int e24=1;
  18. const int e31=e13;
  19. const int e32=e23;
  20. const int e34=1;
  21. const int e41=e14;
  22. const int e42=e24;
  23. const int e43=e34;
  24. module controller // schedules the algorithm
  25. // algorithm status
  26. status : [0..7];
  27. // task resource indicator variables
  28. t1_r1 : [0..1];
  29. t1_r2 : [0..1];
  30. t1_r3 : [0..1];
  31. t2_r1 : [0..1];
  32. t2_r2 : [0..1];
  33. t2_r3 : [0..1];
  34. // schedule placeholders
  35. turn1 : [0..n_sensors];
  36. turn2 : [0..n_sensors];
  37. turn3 : [0..n_sensors];
  38. turn4 : [0..n_sensors];
  39. turn5 : [0..n_sensors];
  40. // selecting schedule uniformly at random
  41. [] status=0 -> 1/24 : (turn1'=1) & (turn2'=2) & (turn3'=3) & (turn4'=4) & (status'=1)
  42. + 1/24 : (turn1'=1) & (turn2'=2) & (turn3'=4) & (turn4'=3) & (status'=1)
  43. + 1/24 : (turn1'=1) & (turn2'=3) & (turn3'=2) & (turn4'=4) & (status'=1)
  44. + 1/24 : (turn1'=1) & (turn2'=3) & (turn3'=4) & (turn4'=2) & (status'=1)
  45. + 1/24 : (turn1'=1) & (turn2'=4) & (turn3'=2) & (turn4'=3) & (status'=1)
  46. + 1/24 : (turn1'=1) & (turn2'=4) & (turn3'=3) & (turn4'=2) & (status'=1)
  47. + 1/24 : (turn1'=2) & (turn2'=1) & (turn3'=3) & (turn4'=4) & (status'=1)
  48. + 1/24 : (turn1'=2) & (turn2'=1) & (turn3'=4) & (turn4'=3) & (status'=1)
  49. + 1/24 : (turn1'=2) & (turn2'=3) & (turn3'=1) & (turn4'=4) & (status'=1)
  50. + 1/24 : (turn1'=2) & (turn2'=3) & (turn3'=4) & (turn4'=1) & (status'=1)
  51. + 1/24 : (turn1'=2) & (turn2'=4) & (turn3'=1) & (turn4'=3) & (status'=1)
  52. + 1/24 : (turn1'=2) & (turn2'=4) & (turn3'=3) & (turn4'=1) & (status'=1)
  53. + 1/24 : (turn1'=3) & (turn2'=1) & (turn3'=2) & (turn4'=4) & (status'=1)
  54. + 1/24 : (turn1'=3) & (turn2'=1) & (turn3'=4) & (turn4'=2) & (status'=1)
  55. + 1/24 : (turn1'=3) & (turn2'=2) & (turn3'=1) & (turn4'=4) & (status'=1)
  56. + 1/24 : (turn1'=3) & (turn2'=2) & (turn3'=4) & (turn4'=1) & (status'=1)
  57. + 1/24 : (turn1'=3) & (turn2'=4) & (turn3'=1) & (turn4'=2) & (status'=1)
  58. + 1/24 : (turn1'=3) & (turn2'=4) & (turn3'=2) & (turn4'=1) & (status'=1)
  59. + 1/24 : (turn1'=4) & (turn2'=1) & (turn3'=2) & (turn4'=3) & (status'=1)
  60. + 1/24 : (turn1'=4) & (turn2'=1) & (turn3'=3) & (turn4'=2) & (status'=1)
  61. + 1/24 : (turn1'=4) & (turn2'=2) & (turn3'=1) & (turn4'=3) & (status'=1)
  62. + 1/24 : (turn1'=4) & (turn2'=2) & (turn3'=3) & (turn4'=1) & (status'=1)
  63. + 1/24 : (turn1'=4) & (turn2'=3) & (turn3'=1) & (turn4'=2) & (status'=1)
  64. + 1/24 : (turn1'=4) & (turn2'=3) & (turn3'=2) & (turn4'=1) & (status'=1);
  65. // initialising non-empty tasks uniformly at random
  66. [] status=1 -> 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  67. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  68. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  69. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  70. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  71. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  72. + 1/49 : (t1_r1'=0) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  73. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  74. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  75. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  76. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  77. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  78. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  79. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  80. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  81. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  82. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  83. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  84. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  85. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  86. + 1/49 : (t1_r1'=0) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  87. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  88. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  89. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  90. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  91. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  92. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  93. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  94. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  95. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  96. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  97. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  98. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  99. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  100. + 1/49 : (t1_r1'=1) & (t1_r2'=0) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  101. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  102. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  103. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  104. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  105. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  106. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  107. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=0) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  108. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  109. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  110. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=0) & (t2_r2'=1) & (t2_r3'=1) & (status'=2)
  111. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=0) & (status'=2)
  112. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=0) & (t2_r3'=1) & (status'=2)
  113. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=0) & (status'=2)
  114. + 1/49 : (t1_r1'=1) & (t1_r2'=1) & (t1_r3'=1) & (t2_r1'=1) & (t2_r2'=1) & (t2_r3'=1) & (status'=2);
  115. // executing the schedule
  116. // 1st round
  117. [str1] status=2 & turn1=1 -> (status'=2);
  118. [fin1] status=2 & turn1=1 -> (status'=3);
  119. [str2] status=2 & turn1=2 -> (status'=2);
  120. [fin2] status=2 & turn1=2 -> (status'=3);
  121. [str3] status=2 & turn1=3 -> (status'=2);
  122. [fin3] status=2 & turn1=3 -> (status'=3);
  123. [str4] status=2 & turn1=4 -> (status'=2);
  124. [fin4] status=2 & turn1=4 -> (status'=3);
  125. // 2nd round
  126. [str1] status=3 & turn2=1 -> (status'=3);
  127. [fin1] status=3 & turn2=1 -> (status'=4);
  128. [str2] status=3 & turn2=2 -> (status'=3);
  129. [fin2] status=3 & turn2=2 -> (status'=4);
  130. [str3] status=3 & turn2=3 -> (status'=3);
  131. [fin3] status=3 & turn2=3 -> (status'=4);
  132. [str4] status=3 & turn2=4 -> (status'=3);
  133. [fin4] status=3 & turn2=4 -> (status'=4);
  134. // 3rd round
  135. [str1] status=4 & turn3=1 -> (status'=4);
  136. [fin1] status=4 & turn3=1 -> (status'=5);
  137. [str2] status=4 & turn3=2 -> (status'=4);
  138. [fin2] status=4 & turn3=2 -> (status'=5);
  139. [str3] status=4 & turn3=3 -> (status'=4);
  140. [fin3] status=4 & turn3=3 -> (status'=5);
  141. [str4] status=4 & turn3=4 -> (status'=4);
  142. [fin4] status=4 & turn3=4 -> (status'=5);
  143. // 4th round
  144. [str1] status=5 & turn4=1 -> (status'=5);
  145. [fin1] status=5 & turn4=1 -> (status'=6);
  146. [str2] status=5 & turn4=2 -> (status'=5);
  147. [fin2] status=5 & turn4=2 -> (status'=6);
  148. [str3] status=5 & turn4=3 -> (status'=5);
  149. [fin3] status=5 & turn4=3 -> (status'=6);
  150. [str4] status=5 & turn4=4 -> (status'=5);
  151. [fin4] status=5 & turn4=4 -> (status'=6);
  152. [] status=6 -> (status'=7);
  153. [] status=7 -> (status'=7);
  154. endmodule
  155. module sensor1
  156. state1 : [0..1];
  157. // team membership indicators
  158. m1_t1 : [0..1];
  159. m1_t2 : [0..1];
  160. // starting turn, selecting order of tasks
  161. [str1] state1=0 -> (state1'=1);
  162. // if there is no team and has required skill - initiating the team
  163. [] state1=1 & !committed & team_size_t1=0 & has_resource_t1 -> (m1_t1'=1);
  164. [] state1=1 & !committed & team_size_t2=0 & has_resource_t2 -> (m1_t2'=1);
  165. // if team already exists and one of the neighbours is in it - joining the team
  166. [] state1=1 & !committed & team_size_t1>0 & can_join_t1 & has_resource_t1 & !resource_filled_t1 -> (m1_t1'=1);
  167. [] state1=1 & !committed & team_size_t2>0 & can_join_t2 & has_resource_t2 & !resource_filled_t2 -> (m1_t2'=1);
  168. [fin1] state1>0 -> (state1'=0);
  169. endmodule
  170. module sensor2 = sensor1
  171. [
  172. state1=state2,
  173. str1=str2,
  174. fin1=fin2,
  175. m1_t1=m2_t1,
  176. m1_t2=m2_t2,
  177. m2_t1=m1_t1,
  178. m2_t2=m1_t2,
  179. resource1=resource2,
  180. resource2=resource1,
  181. e12=e21,
  182. e13=e23,
  183. e14=e24,
  184. e15=e25,
  185. e21=e12,
  186. e23=e13,
  187. e24=e14,
  188. e25=e15
  189. ]
  190. endmodule
  191. module sensor3 = sensor1
  192. [
  193. state1=state3,
  194. str1=str3,
  195. fin1=fin3,
  196. m1_t1=m3_t1,
  197. m1_t2=m3_t2,
  198. m3_t1=m1_t1,
  199. m3_t2=m1_t2,
  200. resource1=resource3,
  201. resource3=resource1,
  202. e12=e32,
  203. e13=e31,
  204. e14=e34,
  205. e15=e35,
  206. e31=e13,
  207. e32=e12,
  208. e34=e14,
  209. e35=e15
  210. ]
  211. endmodule
  212. module sensor4 = sensor1
  213. [
  214. state1=state4,
  215. str1=str4,
  216. fin1=fin4,
  217. m1_t1=m4_t1,
  218. m1_t2=m4_t2,
  219. m4_t1=m1_t1,
  220. m4_t2=m1_t2,
  221. resource1=resource4,
  222. resource4=resource1,
  223. e12=e42,
  224. e13=e43,
  225. e14=e41,
  226. e15=e45,
  227. e41=e14,
  228. e42=e12,
  229. e43=e13,
  230. e45=e15
  231. ]
  232. endmodule
  233. // agent is committed to some team
  234. formula committed = (m1_t1+m1_t2) > 0;
  235. // formulae to compute team sizes
  236. formula team_size_t1 = m1_t1+m2_t1+m3_t1+m4_t1;
  237. formula team_size_t2 = m1_t2+m2_t2+m3_t2+m4_t2;
  238. // formulae to check whether the agent can join the team
  239. formula can_join_t1 = e12*m2_t1 + e13*m3_t1 + e14*m4_t1 > 0;
  240. formula can_join_t2 = e12*m2_t2 + e13*m3_t2 + e14*m4_t2 > 0;
  241. // formulae to check whether agent has the resource required by the task
  242. formula has_resource_t1 = ( (t1_r1=1&resource1=1) | (t1_r2=1&resource1=2) | (t1_r3=1&resource1=3) );
  243. formula has_resource_t2 = ( (t2_r1=1&resource1=1) | (t2_r2=1&resource1=2) | (t2_r3=1&resource1=3) );
  244. // formulae to check whether the resource of an agent has been already filled in the team
  245. formula resource_filled_t1 = (m2_t1=1 & resource1=resource2) | (m3_t1=1 & resource1=resource3) | (m4_t1=1 & resource1=resource4);
  246. formula resource_filled_t2 = (m2_t2=1 & resource1=resource2) | (m3_t2=1 & resource1=resource3) | (m4_t2=1 & resource1=resource4);
  247. // formula to compute team initiation probability (assuming each agent has at least one connection)
  248. formula IP = (e12*(1-((m2_t1+m2_t2)=0?0:1))+e13*(1-((m3_t1+m3_t2)=0?0:1))+e14*(1-((m4_t1+m4_t2)=0?0:1))) / (e12+e13+e14);
  249. // labels and formulae for property specification
  250. formula finished = (status=6);
  251. label "end" = (status=7);
  252. formula agent1_joins_successful_team = (task1_completed & m1_t1=1) | (task2_completed & m1_t2=1);
  253. formula agent1_joins_successful_team_of_1 = (task1_completed & m1_t1=1 & team_size_t1=1) | (task2_completed & m1_t2=1 & team_size_t2=1);
  254. formula agent1_joins_successful_team_of_2 = (task1_completed & m1_t1=1 & team_size_t1=2) | (task2_completed & m1_t2=1 & team_size_t2=2);
  255. formula agent1_joins_successful_team_of_3 = (task1_completed & m1_t1=1 & team_size_t1=3) | (task2_completed & m1_t2=1 & team_size_t2=3);
  256. formula agent2_joins_successful_team = (task1_completed & m2_t1=1) | (task2_completed & m2_t2=1);
  257. formula agent2_joins_successful_team_of_1 = (task1_completed & m2_t1=1 & team_size_t1=1) | (task2_completed & m2_t2=1 & team_size_t2=1);
  258. formula agent2_joins_successful_team_of_2 = (task1_completed & m2_t1=1 & team_size_t1=2) | (task2_completed & m2_t2=1 & team_size_t2=2);
  259. formula agent2_joins_successful_team_of_3 = (task1_completed & m2_t1=1 & team_size_t1=3) | (task2_completed & m2_t2=1 & team_size_t2=3);
  260. formula agent3_joins_successful_team = (task1_completed & m3_t1=1) | (task2_completed & m3_t2=1);
  261. formula agent3_joins_successful_team_of_1 = (task1_completed & m3_t1=1 & team_size_t1=1) | (task2_completed & m3_t2=1 & team_size_t2=1);
  262. formula agent3_joins_successful_team_of_2 = (task1_completed & m3_t1=1 & team_size_t1=2) | (task2_completed & m3_t2=1 & team_size_t2=2);
  263. formula agent3_joins_successful_team_of_3 = (task1_completed & m3_t1=1 & team_size_t1=3) | (task2_completed & m3_t2=1 & team_size_t2=3);
  264. formula agent4_joins_successful_team = (task1_completed & m4_t1=1) | (task2_completed & m4_t2=1);
  265. formula agent4_joins_successful_team_of_1 = (task1_completed & m4_t1=1 & team_size_t1=1) | (task2_completed & m4_t2=1 & team_size_t2=1);
  266. formula agent4_joins_successful_team_of_2 = (task1_completed & m4_t1=1 & team_size_t1=2) | (task2_completed & m4_t2=1 & team_size_t2=2);
  267. formula agent4_joins_successful_team_of_3 = (task1_completed & m4_t1=1 & team_size_t1=3) | (task2_completed & m4_t2=1 & team_size_t2=3);
  268. formula task1_completed = finished
  269. & ((t1_r1=1)=>((m1_t1=1&resource1=1)|(m2_t1=1&resource2=1)|(m3_t1=1&resource3=1)|(m4_t1=1&resource4=1)))
  270. & ((t1_r2=1)=>((m1_t1=1&resource1=2)|(m2_t1=1&resource2=2)|(m3_t1=1&resource3=2)|(m4_t1=1&resource4=2)))
  271. & ((t1_r3=1)=>((m1_t1=1&resource1=3)|(m2_t1=1&resource2=3)|(m3_t1=1&resource3=3)|(m4_t1=1&resource4=3)));
  272. formula task2_completed = finished
  273. & ((t2_r1=1)=>((m1_t2=1&resource1=1)|(m2_t2=1&resource2=1)|(m3_t2=1&resource3=1)|(m4_t2=1&resource4=1)))
  274. & ((t2_r2=1)=>((m1_t2=1&resource1=2)|(m2_t2=1&resource2=2)|(m3_t2=1&resource3=2)|(m4_t2=1&resource4=2)))
  275. & ((t2_r3=1)=>((m1_t2=1&resource1=3)|(m2_t2=1&resource2=3)|(m3_t2=1&resource3=3)|(m4_t2=1&resource4=3)));
  276. // rewards
  277. rewards "w_1_total"
  278. [] agent1_joins_successful_team : 1;
  279. [] agent2_joins_successful_team : 1;
  280. [] agent3_joins_successful_team : 1;
  281. [] agent4_joins_successful_team : 1;
  282. endrewards
  283. rewards "w_2_total"
  284. [] task1_completed : 1;
  285. [] task2_completed : 1;
  286. endrewards