let main () =
match User_interface.Text.cp_rule#get with
"sandpile" ->
let module Auto =
Rule.Sandpile.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "eca" ->
let module Auto =
Rule.Eca.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "parallel_2eca" ->
let module Auto =
Rule.Parallel_2eca.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "cyclic" ->
let module Auto =
Rule.Cyclic.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "totalizing" ->
let module Auto =
Rule.Totalizing.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "majority" ->
let module Auto =
Rule.Majority.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "antimajority" ->
let module Auto =
Rule.Antimajority.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "rrcs_2d" ->
let module Auto =
Rule.Rrcs_2d.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "rrpcs_2d" ->
let module Auto =
Rule.Rrpcs_2d.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "Ising" ->
let module Auto =
Rule.Ising.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "Ising_4bodies" ->
let module Auto =
Rule.Ising.Four_bodies (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "Ising_4bodies_optimized" ->
let module Auto =
Rule.Ising.Four_bodies_optimized
(User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| "shift" ->
let module Auto =
Rule.Shift.Automaton (User_interface.Text.Rule_parameters)
in
let module Go = Main (Topo) (Auto) (Experiment2 (Auto))
in
Go.main ()
| _ ->
failwith
("The name of the model to simulate is unknown. Available rules are " ^ User_interface.Text.available_rules ^ ".")