ClassicDEVS.metamodel 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. {
  2. "types": {
  3. "State": [
  4. {
  5. "name": "name",
  6. "type": "string",
  7. "default": ""
  8. },
  9. {
  10. "name": "initial",
  11. "type": "bool",
  12. "default": false
  13. },
  14. {
  15. "name": "time_advance",
  16. "type": "code",
  17. "default": ""
  18. },
  19. {
  20. "name": "output",
  21. "type": "code",
  22. "default": ""
  23. }
  24. ],
  25. "BaseDEVS": [
  26. {
  27. "name": "name",
  28. "type": "string",
  29. "default": ""
  30. },
  31. {
  32. "name": "attributes",
  33. "type": "list<$ATTRIBUTE>",
  34. "default": []
  35. },
  36. {
  37. "name": "parameters",
  38. "type": "list<$ARG>",
  39. "default": []
  40. },
  41. {
  42. "name": "__init__",
  43. "type": "code",
  44. "default": ""
  45. },
  46. {
  47. "name": "position",
  48. "type": "list<int>",
  49. "default": [
  50. 0,
  51. 0
  52. ]
  53. },
  54. {
  55. "name": "scale",
  56. "type": "list<int>",
  57. "default": [
  58. 0,
  59. 0
  60. ]
  61. }
  62. ],
  63. "CoupledDEVS": [
  64. {
  65. "name": "select",
  66. "type": "code",
  67. "default": "return imm[0]"
  68. },
  69. {
  70. "name": "name",
  71. "type": "string",
  72. "default": ""
  73. },
  74. {
  75. "name": "attributes",
  76. "type": "list<$ATTRIBUTE>",
  77. "default": []
  78. },
  79. {
  80. "name": "parameters",
  81. "type": "list<$ARG>",
  82. "default": []
  83. },
  84. {
  85. "name": "__init__",
  86. "type": "code",
  87. "default": ""
  88. },
  89. {
  90. "name": "position",
  91. "type": "list<int>",
  92. "default": [
  93. 0,
  94. 0
  95. ]
  96. },
  97. {
  98. "name": "scale",
  99. "type": "list<int>",
  100. "default": [
  101. 0,
  102. 0
  103. ]
  104. }
  105. ],
  106. "Event": [
  107. {
  108. "name": "name",
  109. "type": "string",
  110. "default": ""
  111. },
  112. {
  113. "name": "attributes",
  114. "type": "list<$ATTRIBUTE>",
  115. "default": []
  116. },
  117. {
  118. "name": "parameters",
  119. "type": "list<$ARG>",
  120. "default": []
  121. },
  122. {
  123. "name": "__init__",
  124. "type": "code",
  125. "default": ""
  126. }
  127. ],
  128. "Port": [
  129. {
  130. "name": "name",
  131. "type": "string",
  132. "default": ""
  133. },
  134. {
  135. "name": "position",
  136. "type": "list<int>",
  137. "default": [
  138. 0,
  139. 0
  140. ]
  141. }
  142. ],
  143. "InputPort": [
  144. {
  145. "name": "name",
  146. "type": "string",
  147. "default": ""
  148. },
  149. {
  150. "name": "position",
  151. "type": "list<int>",
  152. "default": [
  153. 0,
  154. 0
  155. ]
  156. }
  157. ],
  158. "OutputPort": [
  159. {
  160. "name": "name",
  161. "type": "string",
  162. "default": ""
  163. },
  164. {
  165. "name": "position",
  166. "type": "list<int>",
  167. "default": [
  168. 0,
  169. 0
  170. ]
  171. }
  172. ],
  173. "Simulation": [
  174. {
  175. "name": "end_condition",
  176. "type": "code",
  177. "default": ""
  178. }
  179. ],
  180. "InternalTransition": [
  181. {
  182. "name": "condition",
  183. "type": "code",
  184. "default": ""
  185. },
  186. {
  187. "name": "action",
  188. "type": "code",
  189. "default": ""
  190. }
  191. ],
  192. "ExternalTransition": [
  193. {
  194. "name": "condition",
  195. "type": "code",
  196. "default": ""
  197. },
  198. {
  199. "name": "action",
  200. "type": "code",
  201. "default": ""
  202. }
  203. ],
  204. "ports": [],
  205. "AtomicDEVS": [
  206. {
  207. "name": "name",
  208. "type": "string",
  209. "default": ""
  210. },
  211. {
  212. "name": "attributes",
  213. "type": "list<$ATTRIBUTE>",
  214. "default": []
  215. },
  216. {
  217. "name": "parameters",
  218. "type": "list<$ARG>",
  219. "default": []
  220. },
  221. {
  222. "name": "__init__",
  223. "type": "code",
  224. "default": ""
  225. },
  226. {
  227. "name": "position",
  228. "type": "list<int>",
  229. "default": [
  230. 0,
  231. 0
  232. ]
  233. },
  234. {
  235. "name": "scale",
  236. "type": "list<int>",
  237. "default": [
  238. 0,
  239. 0
  240. ]
  241. }
  242. ],
  243. "states": [],
  244. "channel": [
  245. {
  246. "name": "transfer_function",
  247. "type": "code",
  248. "default": ""
  249. }
  250. ],
  251. "StateDefinition": [
  252. {
  253. "name": "name",
  254. "type": "string",
  255. "default": ""
  256. },
  257. {
  258. "name": "attributes",
  259. "type": "list<$ATTRIBUTE>",
  260. "default": []
  261. },
  262. {
  263. "name": "parameters",
  264. "type": "list<$ARG>",
  265. "default": []
  266. },
  267. {
  268. "name": "initial_binding",
  269. "type": "list<map<[name,val],[string,string]>>",
  270. "default": []
  271. },
  272. {
  273. "name": "__init__",
  274. "type": "code",
  275. "default": ""
  276. }
  277. ],
  278. "statedef": [],
  279. "DevsInstance": [
  280. {
  281. "name": "name",
  282. "type": "string",
  283. "default": ""
  284. },
  285. {
  286. "name": "devs_type",
  287. "type": "string",
  288. "default": ""
  289. },
  290. {
  291. "name": "parameter_binding",
  292. "type": "list<map<[name,val],[string,string]>>",
  293. "default": []
  294. },
  295. {
  296. "name": "position",
  297. "type": "list<int>",
  298. "default": [
  299. 0,
  300. 0
  301. ]
  302. },
  303. {
  304. "name": "scale",
  305. "type": "list<int>",
  306. "default": [
  307. 0,
  308. 0
  309. ]
  310. }
  311. ],
  312. "submodels": []
  313. },
  314. "constraints": [
  315. {
  316. "name": "noAbstractInstances",
  317. "event": "pre-create",
  318. "code": "false",
  319. "targetType": "BaseDEVS"
  320. },
  321. {
  322. "name": "noAbstractInstances",
  323. "event": "pre-create",
  324. "code": "false",
  325. "targetType": "Port"
  326. }
  327. ],
  328. "actions": [
  329. {
  330. "name": "snapToTarget",
  331. "event": "post-connect",
  332. "code": "/*newline*/var neighborLinks = getNeighbors('*'),/*newline*/ neighborLink = undefined,/*newline*/ to_change = true;/*newline*/if (neighborLinks.length > 0) {/*newline*/ for (var i in neighborLinks) {/*newline*/ if (getAttr('$type', neighborLinks[i]).match(/ports/)) {/*newline*/ neighborLink = neighborLinks[i];/*newline*/ } else if (getAttr('$type', neighborLinks[i]).match(/channel/)) {/*newline*/ to_change = false;/*newline*/ }/*newline*/ }/*newline*/}/*newline*/if ( neighborLink ) {/*newline*/ var neighbor = getNeighbors('<', '*', neighborLink)[0],/*newline*/ npos = getAttr('position', neighbor),/*newline*/ nscale = getAttr('scale', neighbor),/*newline*/ mypos = getAttr('position'),/*newline*/ newpos = mypos;/*newline*/ if (!to_change) {/*newline*/ newpos = mypos;/*newline*/ } else if (mypos[1] > npos[1] + (250 * nscale[1])) {/*newline*/ newpos[1] = npos[1] + (250 * nscale[1]);/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[1] < npos[1]) {/*newline*/ newpos[1] = npos[1];/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]);/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0];/*newline*/ }/*newline*/ if (to_change) {/*newline*/ newpos = [newpos[0] - nscale[0] * (2 + nscale[0]), newpos[1] + nscale[1] * (19 + nscale[1])];/*newline*/ }/*newline*/ setAttr('position', newpos);/*newline*/}",
  333. "targetType": "Port"
  334. },
  335. {
  336. "name": "snapToTarget",
  337. "event": "post-connect",
  338. "code": "/*newline*/var neighborLinks = getNeighbors('*'),/*newline*/ neighborLink = undefined,/*newline*/ to_change = true;/*newline*/if (neighborLinks.length > 0) {/*newline*/ for (var i in neighborLinks) {/*newline*/ if (getAttr('$type', neighborLinks[i]).match(/ports/)) {/*newline*/ neighborLink = neighborLinks[i];/*newline*/ } else if (getAttr('$type', neighborLinks[i]).match(/channel/)) {/*newline*/ to_change = false;/*newline*/ }/*newline*/ }/*newline*/}/*newline*/if ( neighborLink ) {/*newline*/ var neighbor = getNeighbors('<', '*', neighborLink)[0],/*newline*/ npos = getAttr('position', neighbor),/*newline*/ nscale = getAttr('scale', neighbor),/*newline*/ mypos = getAttr('position'),/*newline*/ newpos = mypos;/*newline*/ if (!to_change) {/*newline*/ newpos = mypos;/*newline*/ } else if (mypos[1] > npos[1] + (250 * nscale[1])) {/*newline*/ newpos[1] = npos[1] + (250 * nscale[1]);/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[1] < npos[1]) {/*newline*/ newpos[1] = npos[1];/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]);/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0];/*newline*/ }/*newline*/ if (to_change) {/*newline*/ newpos = [newpos[0] - nscale[0] * (2 + nscale[0]), newpos[1] + nscale[1] * (19 + nscale[1])];/*newline*/ }/*newline*/ setAttr('position', newpos);/*newline*/}",
  339. "targetType": "InputPort"
  340. },
  341. {
  342. "name": "snapToTarget",
  343. "event": "post-connect",
  344. "code": "/*newline*/var neighborLinks = getNeighbors('*'),/*newline*/ neighborLink = undefined,/*newline*/ to_change = true;/*newline*/if (neighborLinks.length > 0) {/*newline*/ for (var i in neighborLinks) {/*newline*/ if (getAttr('$type', neighborLinks[i]).match(/ports/)) {/*newline*/ neighborLink = neighborLinks[i];/*newline*/ } else if (getAttr('$type', neighborLinks[i]).match(/channel/)) {/*newline*/ to_change = false;/*newline*/ }/*newline*/ }/*newline*/}/*newline*/if ( neighborLink ) {/*newline*/ var neighbor = getNeighbors('<', '*', neighborLink)[0],/*newline*/ npos = getAttr('position', neighbor),/*newline*/ nscale = getAttr('scale', neighbor),/*newline*/ mypos = getAttr('position'),/*newline*/ newpos = mypos;/*newline*/ if (!to_change) {/*newline*/ newpos = mypos;/*newline*/ } else if (mypos[1] > npos[1] + (250 * nscale[1])) {/*newline*/ newpos[1] = npos[1] + (250 * nscale[1]);/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[1] < npos[1]) {/*newline*/ newpos[1] = npos[1];/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]);/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0];/*newline*/ }/*newline*/ if (to_change) {/*newline*/ newpos = [newpos[0] - nscale[0] * (2 + nscale[0]), newpos[1] + nscale[1] * (19 + nscale[1])];/*newline*/ }/*newline*/ setAttr('position', newpos);/*newline*/}",
  345. "targetType": "OutputPort"
  346. },
  347. {
  348. "name": "snapToTarget",
  349. "event": "post-connect",
  350. "code": "/*newline*/var neighborLinks = getNeighbors('*'),/*newline*/ neighborLink = undefined,/*newline*/ to_change = true;/*newline*/if (neighborLinks.length > 0) {/*newline*/ for (var i in neighborLinks) {/*newline*/ if (getAttr('$type', neighborLinks[i]).match(/ports/)) {/*newline*/ neighborLink = neighborLinks[i];/*newline*/ } else if (getAttr('$type', neighborLinks[i]).match(/channel/)) {/*newline*/ to_change = false;/*newline*/ }/*newline*/ }/*newline*/}/*newline*/if ( neighborLink ) {/*newline*/ var neighbor = getNeighbors('<', '*', neighborLink)[0],/*newline*/ npos = getAttr('position', neighbor),/*newline*/ nscale = getAttr('scale', neighbor),/*newline*/ mypos = getAttr('position'),/*newline*/ newpos = mypos;/*newline*/ if (!to_change) {/*newline*/ newpos = mypos;/*newline*/ } else if (mypos[1] > npos[1] + (250 * nscale[1])) {/*newline*/ newpos[1] = npos[1] + (250 * nscale[1]);/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[1] < npos[1]) {/*newline*/ newpos[1] = npos[1];/*newline*/ if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]) - 50;/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0] + 50;/*newline*/ }/*newline*/ } else if (mypos[0] > npos[0] + (250 * nscale[0])) {/*newline*/ newpos[0] = npos[0] + (250 * nscale[0]);/*newline*/ } else if (mypos[0] < npos[0]) {/*newline*/ newpos[0] = npos[0];/*newline*/ }/*newline*/ if (to_change) {/*newline*/ newpos = [newpos[0] - nscale[0] * (2 + nscale[0]), newpos[1] + nscale[1] * (19 + nscale[1])];/*newline*/ }/*newline*/ setAttr('position', newpos);/*newline*/}",
  351. "targetType": "DevsInstance"
  352. }
  353. ],
  354. "cardinalities": {
  355. "State": [
  356. {
  357. "dir": "in",
  358. "type": "states",
  359. "min": "1",
  360. "max": "1"
  361. },
  362. {
  363. "dir": "out",
  364. "type": "InternalTransition",
  365. "min": "0",
  366. "max": "Infinity"
  367. },
  368. {
  369. "dir": "in",
  370. "type": "InternalTransition",
  371. "min": "0",
  372. "max": "Infinity"
  373. },
  374. {
  375. "dir": "out",
  376. "type": "ExternalTransition",
  377. "min": "0",
  378. "max": "Infinity"
  379. },
  380. {
  381. "dir": "in",
  382. "type": "ExternalTransition",
  383. "min": "0",
  384. "max": "Infinity"
  385. }
  386. ],
  387. "BaseDEVS": [
  388. {
  389. "dir": "out",
  390. "type": "ports",
  391. "min": "0",
  392. "max": "Infinity"
  393. }
  394. ],
  395. "CoupledDEVS": [
  396. {
  397. "dir": "out",
  398. "type": "submodels",
  399. "min": "0",
  400. "max": "Infinity"
  401. },
  402. {
  403. "dir": "out",
  404. "type": "ports",
  405. "min": "0",
  406. "max": "Infinity"
  407. }
  408. ],
  409. "Event": [],
  410. "Port": [
  411. {
  412. "dir": "in",
  413. "type": "ports",
  414. "min": "1",
  415. "max": "1"
  416. },
  417. {
  418. "dir": "in",
  419. "type": "channel",
  420. "min": "0",
  421. "max": "*"
  422. },
  423. {
  424. "dir": "out",
  425. "type": "channel",
  426. "min": "0",
  427. "max": "*"
  428. }
  429. ],
  430. "InputPort": [
  431. {
  432. "dir": "in",
  433. "type": "ports",
  434. "min": "1",
  435. "max": "1"
  436. },
  437. {
  438. "dir": "in",
  439. "type": "channel",
  440. "min": "0",
  441. "max": "*"
  442. },
  443. {
  444. "dir": "out",
  445. "type": "channel",
  446. "min": "0",
  447. "max": "*"
  448. }
  449. ],
  450. "OutputPort": [
  451. {
  452. "dir": "in",
  453. "type": "ports",
  454. "min": "1",
  455. "max": "1"
  456. },
  457. {
  458. "dir": "in",
  459. "type": "channel",
  460. "min": "0",
  461. "max": "*"
  462. },
  463. {
  464. "dir": "out",
  465. "type": "channel",
  466. "min": "0",
  467. "max": "*"
  468. }
  469. ],
  470. "Simulation": [],
  471. "InternalTransition": [
  472. {
  473. "dir": "in",
  474. "type": "State",
  475. "min": "0",
  476. "max": "1"
  477. },
  478. {
  479. "dir": "out",
  480. "type": "State",
  481. "min": "0",
  482. "max": "1"
  483. }
  484. ],
  485. "ExternalTransition": [
  486. {
  487. "dir": "in",
  488. "type": "State",
  489. "min": "0",
  490. "max": "1"
  491. },
  492. {
  493. "dir": "out",
  494. "type": "State",
  495. "min": "0",
  496. "max": "1"
  497. }
  498. ],
  499. "ports": [
  500. {
  501. "dir": "in",
  502. "type": "BaseDEVS",
  503. "min": "0",
  504. "max": "1"
  505. },
  506. {
  507. "dir": "out",
  508. "type": "Port",
  509. "min": "0",
  510. "max": "1"
  511. },
  512. {
  513. "dir": "in",
  514. "type": "DevsInstance",
  515. "min": "0",
  516. "max": "1"
  517. },
  518. {
  519. "dir": "in",
  520. "type": "CoupledDEVS",
  521. "min": "0",
  522. "max": "1"
  523. },
  524. {
  525. "dir": "out",
  526. "type": "InputPort",
  527. "min": "0",
  528. "max": "1"
  529. },
  530. {
  531. "dir": "out",
  532. "type": "OutputPort",
  533. "min": "0",
  534. "max": "1"
  535. },
  536. {
  537. "dir": "in",
  538. "type": "AtomicDEVS",
  539. "min": "0",
  540. "max": "1"
  541. }
  542. ],
  543. "AtomicDEVS": [
  544. {
  545. "dir": "out",
  546. "type": "statedef",
  547. "min": "1",
  548. "max": "1"
  549. },
  550. {
  551. "dir": "out",
  552. "type": "states",
  553. "min": "0",
  554. "max": "Infinity"
  555. },
  556. {
  557. "dir": "out",
  558. "type": "ports",
  559. "min": "0",
  560. "max": "Infinity"
  561. }
  562. ],
  563. "states": [
  564. {
  565. "dir": "in",
  566. "type": "AtomicDEVS",
  567. "min": "0",
  568. "max": "1"
  569. },
  570. {
  571. "dir": "out",
  572. "type": "State",
  573. "min": "0",
  574. "max": "1"
  575. }
  576. ],
  577. "channel": [
  578. {
  579. "dir": "in",
  580. "type": "Port",
  581. "min": "0",
  582. "max": "1"
  583. },
  584. {
  585. "dir": "out",
  586. "type": "Port",
  587. "min": "0",
  588. "max": "1"
  589. },
  590. {
  591. "dir": "in",
  592. "type": "InputPort",
  593. "min": "0",
  594. "max": "1"
  595. },
  596. {
  597. "dir": "out",
  598. "type": "InputPort",
  599. "min": "0",
  600. "max": "1"
  601. },
  602. {
  603. "dir": "in",
  604. "type": "OutputPort",
  605. "min": "0",
  606. "max": "1"
  607. },
  608. {
  609. "dir": "out",
  610. "type": "OutputPort",
  611. "min": "0",
  612. "max": "1"
  613. }
  614. ],
  615. "StateDefinition": [
  616. {
  617. "dir": "in",
  618. "type": "statedef",
  619. "min": "0",
  620. "max": "Infinity"
  621. }
  622. ],
  623. "statedef": [
  624. {
  625. "dir": "in",
  626. "type": "AtomicDEVS",
  627. "min": "0",
  628. "max": "1"
  629. },
  630. {
  631. "dir": "out",
  632. "type": "StateDefinition",
  633. "min": "0",
  634. "max": "1"
  635. }
  636. ],
  637. "DevsInstance": [
  638. {
  639. "dir": "in",
  640. "type": "submodels",
  641. "min": "1",
  642. "max": "1"
  643. },
  644. {
  645. "dir": "out",
  646. "type": "ports",
  647. "min": "0",
  648. "max": "Infinity"
  649. }
  650. ],
  651. "submodels": [
  652. {
  653. "dir": "in",
  654. "type": "CoupledDEVS",
  655. "min": "0",
  656. "max": "1"
  657. },
  658. {
  659. "dir": "out",
  660. "type": "DevsInstance",
  661. "min": "0",
  662. "max": "1"
  663. }
  664. ]
  665. },
  666. "legalConnections": {
  667. "State": {
  668. "State": [
  669. "InternalTransition",
  670. "ExternalTransition"
  671. ]
  672. },
  673. "BaseDEVS": {
  674. "Port": [
  675. "ports"
  676. ],
  677. "InputPort": [
  678. "ports"
  679. ],
  680. "OutputPort": [
  681. "ports"
  682. ]
  683. },
  684. "CoupledDEVS": {
  685. "DevsInstance": [
  686. "submodels"
  687. ],
  688. "Port": [
  689. "ports"
  690. ],
  691. "InputPort": [
  692. "ports"
  693. ],
  694. "OutputPort": [
  695. "ports"
  696. ]
  697. },
  698. "Port": {
  699. "Port": [
  700. "channel"
  701. ],
  702. "InputPort": [
  703. "channel"
  704. ],
  705. "OutputPort": [
  706. "channel"
  707. ]
  708. },
  709. "InputPort": {
  710. "Port": [
  711. "channel"
  712. ],
  713. "InputPort": [
  714. "channel"
  715. ],
  716. "OutputPort": [
  717. "channel"
  718. ]
  719. },
  720. "OutputPort": {
  721. "Port": [
  722. "channel"
  723. ],
  724. "InputPort": [
  725. "channel"
  726. ],
  727. "OutputPort": [
  728. "channel"
  729. ]
  730. },
  731. "AtomicDEVS": {
  732. "StateDefinition": [
  733. "statedef"
  734. ],
  735. "State": [
  736. "states"
  737. ],
  738. "Port": [
  739. "ports"
  740. ],
  741. "InputPort": [
  742. "ports"
  743. ],
  744. "OutputPort": [
  745. "ports"
  746. ]
  747. },
  748. "DevsInstance": {
  749. "Port": [
  750. "ports"
  751. ],
  752. "InputPort": [
  753. "ports"
  754. ],
  755. "OutputPort": [
  756. "ports"
  757. ]
  758. }
  759. },
  760. "connectorTypes": {
  761. "InternalTransition": "visual",
  762. "ExternalTransition": "visual",
  763. "ports": "visual",
  764. "states": "containment",
  765. "channel": "visual",
  766. "statedef": "visual",
  767. "submodels": "containment"
  768. },
  769. "types2parentTypes": {
  770. "State": [],
  771. "BaseDEVS": [],
  772. "CoupledDEVS": [
  773. "BaseDEVS"
  774. ],
  775. "Event": [],
  776. "Port": [],
  777. "InputPort": [
  778. "Port"
  779. ],
  780. "OutputPort": [
  781. "Port"
  782. ],
  783. "Simulation": [],
  784. "InternalTransition": [],
  785. "ExternalTransition": [],
  786. "ports": [],
  787. "AtomicDEVS": [
  788. "BaseDEVS"
  789. ],
  790. "states": [],
  791. "channel": [],
  792. "StateDefinition": [],
  793. "statedef": [],
  794. "DevsInstance": [],
  795. "submodels": []
  796. }
  797. }