123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832 |
- {
- "types": {
- "State": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "initial",
- "type": "bool",
- "default": false
- },
- {
- "name": "current",
- "type": "bool",
- "default": false
- },
- {
- "name": "time_advance",
- "type": "code",
- "default": ""
- },
- {
- "name": "output",
- "type": "code",
- "default": ""
- }
- ],
- "EventInstance": [
- {
- "name": "event_type",
- "type": "string",
- "default": ""
- },
- {
- "name": "attribute_values",
- "type": "list<map<[name,val],[string,string]>>",
- "default": []
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "Port": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "InputPort": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "CoupledDEVS": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "attribute_values",
- "type": "list<map<[name,val],[string,string]>>",
- "default": []
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- },
- {
- "name": "scale",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "SimulationInstance": [
- {
- "name": "simulation_time",
- "type": "float",
- "default": 0
- }
- ],
- "StateInstance": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "attribute_values",
- "type": "list<map<[name,val],[string,string]>>",
- "default": []
- }
- ],
- "AtomicDEVS": [
- {
- "name": "time_next",
- "type": "string",
- "default": ""
- },
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "attribute_values",
- "type": "list<map<[name,val],[string,string]>>",
- "default": []
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- },
- {
- "name": "scale",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "BaseDEVS": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "attribute_values",
- "type": "list<map<[name,val],[string,string]>>",
- "default": []
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- },
- {
- "name": "scale",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "OutputPort": [
- {
- "name": "name",
- "type": "string",
- "default": ""
- },
- {
- "name": "position",
- "type": "list<int>",
- "default": [
- 0,
- 0
- ]
- }
- ],
- "ports": [],
- "ExternalTransition": [
- {
- "name": "condition",
- "type": "code",
- "default": ""
- },
- {
- "name": "action",
- "type": "code",
- "default": ""
- }
- ],
- "ConfluentTransition": [
- {
- "name": "condition",
- "type": "code",
- "default": ""
- },
- {
- "name": "action",
- "type": "code",
- "default": ""
- }
- ],
- "state": [],
- "channel": [
- {
- "name": "transfer_function",
- "type": "code",
- "default": ""
- }
- ],
- "states": [],
- "InternalTransition": [
- {
- "name": "condition",
- "type": "code",
- "default": ""
- },
- {
- "name": "action",
- "type": "code",
- "default": ""
- }
- ],
- "submodels": [],
- "injectLocation": [
- {
- "name": "time",
- "type": "float",
- "default": -1
- }
- ]
- },
- "constraints": [
- {
- "name": "noAbstractInstances",
- "event": "pre-create",
- "code": "false",
- "targetType": "Port"
- },
- {
- "name": "noAbstractInstances",
- "event": "pre-create",
- "code": "false",
- "targetType": "BaseDEVS"
- }
- ],
- "actions": [
- {
- "name": "snapToTarget",
- "event": "post-connect",
- "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*/}",
- "targetType": "Port"
- },
- {
- "name": "snapToTarget",
- "event": "post-connect",
- "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*/}",
- "targetType": "InputPort"
- },
- {
- "name": "snapToTarget",
- "event": "post-connect",
- "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*/}",
- "targetType": "OutputPort"
- }
- ],
- "cardinalities": {
- "State": [
- {
- "dir": "in",
- "type": "states",
- "min": "1",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "ExternalTransition",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "in",
- "type": "ExternalTransition",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "out",
- "type": "ConfluentTransition",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "in",
- "type": "ConfluentTransition",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "out",
- "type": "InternalTransition",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "in",
- "type": "InternalTransition",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "EventInstance": [
- {
- "dir": "out",
- "type": "injectLocation",
- "min": "1",
- "max": "1"
- }
- ],
- "Port": [
- {
- "dir": "in",
- "type": "ports",
- "min": "1",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "out",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "in",
- "type": "injectLocation",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "InputPort": [
- {
- "dir": "in",
- "type": "ports",
- "min": "1",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "out",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "in",
- "type": "injectLocation",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "CoupledDEVS": [
- {
- "dir": "in",
- "type": "submodels",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "submodels",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "out",
- "type": "ports",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "SimulationInstance": [],
- "StateInstance": [
- {
- "dir": "in",
- "type": "state",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "AtomicDEVS": [
- {
- "dir": "out",
- "type": "state",
- "min": "1",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "submodels",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "states",
- "min": "0",
- "max": "Infinity"
- },
- {
- "dir": "out",
- "type": "ports",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "BaseDEVS": [
- {
- "dir": "in",
- "type": "submodels",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "ports",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "OutputPort": [
- {
- "dir": "in",
- "type": "ports",
- "min": "1",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "out",
- "type": "channel",
- "min": "0",
- "max": "*"
- },
- {
- "dir": "in",
- "type": "injectLocation",
- "min": "0",
- "max": "Infinity"
- }
- ],
- "ports": [
- {
- "dir": "in",
- "type": "BaseDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "Port",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "InputPort",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "CoupledDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "AtomicDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "OutputPort",
- "min": "0",
- "max": "1"
- }
- ],
- "ExternalTransition": [
- {
- "dir": "in",
- "type": "State",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "State",
- "min": "0",
- "max": "1"
- }
- ],
- "ConfluentTransition": [
- {
- "dir": "in",
- "type": "State",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "State",
- "min": "0",
- "max": "1"
- }
- ],
- "state": [
- {
- "dir": "in",
- "type": "AtomicDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "StateInstance",
- "min": "0",
- "max": "1"
- }
- ],
- "channel": [
- {
- "dir": "in",
- "type": "Port",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "Port",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "InputPort",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "InputPort",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "in",
- "type": "OutputPort",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "OutputPort",
- "min": "0",
- "max": "1"
- }
- ],
- "states": [
- {
- "dir": "in",
- "type": "AtomicDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "State",
- "min": "0",
- "max": "1"
- }
- ],
- "InternalTransition": [
- {
- "dir": "in",
- "type": "State",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "State",
- "min": "0",
- "max": "1"
- }
- ],
- "submodels": [
- {
- "dir": "in",
- "type": "CoupledDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "BaseDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "CoupledDEVS",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "AtomicDEVS",
- "min": "0",
- "max": "1"
- }
- ],
- "injectLocation": [
- {
- "dir": "in",
- "type": "EventInstance",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "Port",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "InputPort",
- "min": "0",
- "max": "1"
- },
- {
- "dir": "out",
- "type": "OutputPort",
- "min": "0",
- "max": "1"
- }
- ]
- },
- "legalConnections": {
- "State": {
- "State": [
- "ExternalTransition",
- "ConfluentTransition",
- "InternalTransition"
- ]
- },
- "EventInstance": {
- "Port": [
- "injectLocation"
- ],
- "InputPort": [
- "injectLocation"
- ],
- "OutputPort": [
- "injectLocation"
- ]
- },
- "Port": {
- "Port": [
- "channel"
- ],
- "InputPort": [
- "channel"
- ],
- "OutputPort": [
- "channel"
- ]
- },
- "InputPort": {
- "Port": [
- "channel"
- ],
- "InputPort": [
- "channel"
- ],
- "OutputPort": [
- "channel"
- ]
- },
- "CoupledDEVS": {
- "BaseDEVS": [
- "submodels"
- ],
- "CoupledDEVS": [
- "submodels"
- ],
- "AtomicDEVS": [
- "submodels"
- ],
- "Port": [
- "ports"
- ],
- "InputPort": [
- "ports"
- ],
- "OutputPort": [
- "ports"
- ]
- },
- "AtomicDEVS": {
- "StateInstance": [
- "state"
- ],
- "State": [
- "states"
- ],
- "Port": [
- "ports"
- ],
- "InputPort": [
- "ports"
- ],
- "OutputPort": [
- "ports"
- ]
- },
- "BaseDEVS": {
- "Port": [
- "ports"
- ],
- "InputPort": [
- "ports"
- ],
- "OutputPort": [
- "ports"
- ]
- },
- "OutputPort": {
- "Port": [
- "channel"
- ],
- "InputPort": [
- "channel"
- ],
- "OutputPort": [
- "channel"
- ]
- }
- },
- "connectorTypes": {
- "ports": "visual",
- "ExternalTransition": "visual",
- "ConfluentTransition": "visual",
- "state": "visual",
- "channel": "visual",
- "states": "containment",
- "InternalTransition": "visual",
- "submodels": "containment",
- "injectLocation": "visual"
- },
- "types2parentTypes": {
- "State": [],
- "EventInstance": [],
- "Port": [],
- "InputPort": [
- "Port"
- ],
- "CoupledDEVS": [
- "BaseDEVS"
- ],
- "SimulationInstance": [],
- "StateInstance": [],
- "AtomicDEVS": [
- "BaseDEVS"
- ],
- "BaseDEVS": [],
- "OutputPort": [
- "Port"
- ],
- "ports": [],
- "ExternalTransition": [],
- "ConfluentTransition": [],
- "state": [],
- "channel": [],
- "states": [],
- "InternalTransition": [],
- "submodels": [],
- "injectLocation": []
- }
- }
|