diff --git a/docs/wiki/config/config.yml b/docs/wiki/config/config.yml index 0bd8d5e..afad968 100644 --- a/docs/wiki/config/config.yml +++ b/docs/wiki/config/config.yml @@ -1,5 +1,5 @@ simulation: - duration: 500 + duration: 24 tickfactor: 10 runs: 20 parCell: 0 @@ -33,26 +33,26 @@ groundtruths: - value: 11.0 timeline: - start: 0 - end: 120 - - [240, 360] + end: 12 + - [18, 24] delta: - name: factor args: {factor: 1.1} timeline: - - start: 20 - end: 95 - - [170, randomValue, {arg: true}] + - start: 10 + end: 20 + - [17, randomValue, {arg: true}] - group: humidity parent: temperature truth: - [0, None] - - [30, 0.6] - - [50, None] + - [3, 0.6] + - [5, None] delta: - [10, None] - - [30, addValuePercent, {jitterA: 0.03, jitterB: 0.8}] - - [50, humidFromTemp] + - [13, addValuePercent, {jitterA: 0.03, jitterB: 0.8}] + - [15, humidFromTemp] behaviours: - group: temperature @@ -61,8 +61,8 @@ behaviours: - name: randomValue args: {a: 40, b: 80} timeline: - - start: 44 - end: 166 - - [100, normalValue, {v: 2}] - - [120, addValuePercent, {}] - - [180, normalValue, {x: 0, y: 2}] \ No newline at end of file + - start: 4 + end: 6 + - [10, normalValue, {v: 2}] + - [12, addValuePercent, {}] + - [18, normalValue, {x: 0, y: 2}] \ No newline at end of file diff --git a/src/main/scala/scim/Main.scala b/src/main/scala/scim/Main.scala index 2e9c533..4ea1df0 100644 --- a/src/main/scala/scim/Main.scala +++ b/src/main/scala/scim/Main.scala @@ -17,28 +17,17 @@ object Main { val simBehavirous = SimulationBehaviours(behaviours) def main(args: Array[String]): Unit = { - val config = "docs/wiki/config/config.yml" - val list: Map[String, Any] = yml.parse(config) - - new SimulationConfigParser(list, simBehavirous).parse() - // println(printUtil.indentCollection(list.toString()).toString) - //new Test2().run() - val parlist: Map[String, Int] = Map("a" -> 1, "b" -> 1, "c" -> 1, "d" -> 1) - val v: Vector[Int] = Vector(1,2,3,4,5,6,7) - - //lib.evalUtil.time("par", parlist.par.map({_ => Thread.sleep(10); 2})) - //lib.evalUtil.time("ser", parlist.map({_ => Thread.sleep(10); 2})) - //startSimulation() + startSimulation() } def startSimulation(): Unit = { - val config = new Parser().parse("docs/wiki/config/config.yml", simBehavirous).get + val config = new Parser().parse("docs/wiki/config/config.yml", simBehavirous) val sharedMemory = config.sharedMemory val output = new Output(sharedMemory) - val outputThread = new Thread(output) val simulator = new Simulation(config) for(_ <- 0 to sharedMemory.config.runs) { + val outputThread = new Thread(output) outputThread.start() simulator.start() outputThread.join()