let main () =
match User_interface.Text.cp_synchronism#get with
"synchronous" ->
let module Exp = Experiment3 (Synchronism.Synchronous)
in
let module Go = Load_Rule (Topo) (Exp) in Go.main ()
| "asynchronous" ->
let module Synchro =
struct
let ur = User_interface.Text.cp_update_rate#get
let next_step a b c =
Synchronism.Asynchronous.next_step
User_interface.Text.synchronism_prng ur a b c
end
in
let module Exp = Experiment3 (Synchro)
in
let module Go = Load_Rule (Topo) (Exp) in Go.main ()
| "sequential" ->
let module Synchro =
struct
let nbu = User_interface.Text.cp_nb_updates#get
let next_step a b c =
Synchronism.Sequential.next_step
User_interface.Text.synchronism_prng nbu a b c
end
in
let module Exp = Experiment3 (Synchro)
in
let module Go = Load_Rule (Topo) (Exp) in Go.main ()
| _ ->
failwith
("The name of the synchronism is unknown. Available synchronisms are " ^ User_interface.Text.available_synchronisms ^ ".")