123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- include "primitives.alh"
- include "modelling.alh"
- include "object_oeprations.alh"
- Composite schedule {
- {Contains} Success success {}
- {Contains} Failure failure {}
- {Contains} Atomic add_resource_handler {
- LHS {}
- RHS {
- Post_CDEVS/DEVSInstance post_resource_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return "resource_handler"!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "ResourceHandler"!
- $
- }
- Post_CDEVS/InputPort post_resource_2 {
- name = "resource_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_resource_1, post_resource_2) {}
- Post_CDEVS/OutputPort post_resource_3 {
- name = "resource_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_resource_1, post_resource_3) {}
- }
- }
-
- {Contains} ForAll initial {
- LHS {
- Pre_PM/Initial pre_init_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_init_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_init_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "Initial"!
- $
- }
- Trace (post_init_0, post_init_1) {}
- Post_CDEVS/OutputPort post_init_2 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_init_1, post_init_2) {}
- }
- }
-
- {Contains} ForAll finish {
- LHS {
- Pre_PM/Initial pre_finish_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_finish_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_finish_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "Finish"!
- $
- }
- Trace (post_finish_0, post_finish_1) {}
- Post_CDEVS/InputPort post_finish_2 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_finish_1, post_finish_2) {}
- }
- }
-
- {Contains} ForAll activity {
- LHS {
- Pre_PM/Initial pre_activity_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_activity_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_activity_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "Activity"!
- $
- value_parameters = $
- String function value(model : Element, name : String, mapping : Element):
- return "[" + cast_value(read_attribute(model, mapping["0"], "name")) + ", " + cast_string(read_attribute(model, mapping["0"], "distribution")) + "]"!
- $
- }
- Trace (post_activity_0, post_activity_1) {}
- Post_CDEVS/InputPort post_activity_2 {
- name = "resource_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_2) {}
- Post_CDEVS/OutputPort post_activity_3 {
- name = "resource_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_3) {}
- Post_CDEVS/InputPort post_activity_4 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_4) {}
- Post_CDEVS/OutputPort post_activity_5 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_5) {}
- }
- }
- {Contains} ForAll parallelsplit {
- LHS {
- Pre_PM/Initial pre_split_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_split_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_split_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "ParallelSplit"!
- $
- }
- Trace (post_split_0, post_split_1) {}
- Post_CDEVS/InputPort post_split_2 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_split_1, post_split_2) {}
- Post_CDEVS/OutputPort post_split_3 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_split_1, post_split_3) {}
- }
- }
- {Contains} ForAll synchronization {
- LHS {
- Pre_PM/Initial pre_sync_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_sync_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_sync_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "Synchronization"!
- $
- }
- Trace (post_sync_0, post_sync_1) {}
- Post_CDEVS/InputPort post_sync_2 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_sync_1, post_sync_2) {}
- Post_CDEVS/OutputPort post_sync_3 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_sync_1, post_sync_3) {}
- }
- }
- {Contains} ForAll xor {
- LHS {
- Pre_PM/Initial pre_xor_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_xor_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_xor_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "ExclusiveChoice"!
- $
- }
- Trace (post_xor_0, post_xor_1) {}
- Post_CDEVS/InputPort post_xor_2 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_xor_1, post_xor_2) {}
- Post_CDEVS/OutputPort post_xor_3 {
- name = "control_out1"
- }
- Post_CDEVS/DEVSInstanceToPort (post_xor_1, post_xor_3) {}
- Post_CDEVS/OutputPort post_xor_4 {
- name = "control_out2"
- }
- Post_CDEVS/DEVSInstanceToPort (post_xor_1, post_xor_4) {}
- }
- }
- {Contains} ForAll merge {
- LHS {
- Pre_PM/Initial pre_merge_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_merge_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_merge_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "SimpleMerge"!
- $
- }
- Trace (post_merge_0, post_merge_1) {}
- Post_CDEVS/InputPort post_merge_2 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_merge_1, post_merge_2) {}
- Post_CDEVS/OutputPort post_merge_3 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_merge_1, post_merge_3) {}
- }
- }
- {Contains} ForAll multi {
- LHS {
- Pre_PM/Initial pre_multi_0 {
- label = "0"
- }
- }
- RHS {
- Post_PM/Initial post_multi_0 {
- label = "0"
- }
- Post_CDEVS/DEVSInstance post_multi_1 {
- label = "1"
- value_name = $
- String function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- value_type = $
- String function value(model : Element, name : String, mapping : Element):
- return "MultiInstance"!
- $
- value_parameters = $
- String function value(model : Element, name : String, mapping : Element):
- return "[" + cast_value(read_attribute(model, mapping["0"], "name")) + ", " + cast_string(read_attribute(model, mapping["0"], "nr_instances")) + ", " + cast_string(read_attribute(model, mapping["0"], "distribution")) + "]"!
- $
- }
- Trace (post_multi_0, post_multi_1) {}
- Post_CDEVS/InputPort post_multi_2 {
- name = "resource_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_2) {}
- Post_CDEVS/OutputPort post_multi_3 {
- name = "resource_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_3) {}
- Post_CDEVS/InputPort post_multi_4 {
- name = "control_in"
- }
- Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_4) {}
- Post_CDEVS/OutputPort post_multi_5 {
- name = "control_out"
- }
- Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_5) {}
- }
- }
- }
|