[add] multiple commits merged

# Conflicts:
#	docs/wiki/config/config.yml
#	src/main/scala/scim/Main.scala
#	src/main/scala/scim/archive/Elements.scala
#	src/main/scala/scim/archive/GroundTruth.scala
#	src/main/scala/scim/datastruct/Configuration.scala
#	src/main/scala/scim/lib/Concurrency.scala
This commit is contained in:
2020-01-29 01:19:10 -06:00
parent 00669fa9d3
commit 32438ef5b8
12 changed files with 845 additions and 46 deletions

View File

@@ -3,7 +3,7 @@
## Simulation
* `duration`:`int` - number of simulation ticks, after which everything will be reset to the initial configuration
* `tickfactor`:`int` - used to artificially add ticks by repeating the result of a simulation tick by the given value
* `tickfactor`:`int` - used to artificially add ticks by repeating the calculation of a simulation tick by the given value
* `loop`:`bool` - loop the simulation
* `loopcount`:`int` - amount of loops, `0` for infinite
@@ -59,7 +59,7 @@ Elements:
* `end`:`int` _[optional]_ - last simulation tick before this function is inactive
Alternative condensed of `timeline` notation as `array`: `[start, end]`
Alternative condensed of `value` notation as `array`: `[start, value or None, ...]`
* `delta`:`array` _[optional]_ - function to calculate `value` of the next simulation tick, only called if no value is defined for the next tick. Result is saved as new `value` and passed again to the function for the next tick. If no function is given, the `value` remains
* `delta`:`array` _[optional]_ - function to calculate `value` of the next simulation tick, overwrites any existing value. Result is saved as new `value` and passed again to the function for the next tick. If no function is given, the `value` remains
* `name`:`String` - name of the function. Needs to exist at compile time in a map: `["name" -> (value: double, parentValue: double, args: ...) => double]`
* `args`:`array` - arguments passed to the function in addition to the `value`
* `timeline`:`array` - sets simulation tick when this function is active and turns inactive.

View File

@@ -1,8 +1,14 @@
simulation:
duration: 500
tickfactor: 10
loop: true
loopcount: 20
runs: 20
parCell: 0
parCellThreads: 5
parGroup: 0
parGroupThreads: 5
parSensor: 0
parSensorThreads: 5
sensors:
- group: temperature
@@ -16,27 +22,27 @@ sensors:
end: [3, 3]
count: 30
groundtruth:
- group: faultyTemp
parent: temperature
cells:
- [1, 2, 10]
groundtruths:
- group: temperature
truth:
- value: 11
- value: 11.0
timeline:
- start: 0
end: 120
- [240, 360]
delta:
- name: factor
args:
- 1.1
args: {factor: 1.1}
timeline:
- start: 60
end: 120
cells:
- [0, 2, 10]
blocks:
- start: [8, 1]
end: [3, 3]
count: 50
- start: 20
end: 95
- [170, randomValue, {arg: true}]
- group: humidity
parent: temperature
truth:
@@ -44,27 +50,18 @@ groundtruth:
- [30, 0.6]
- [50, None]
delta:
- [10, None, []]
- [30, addValuePercent, [0.03, 0.8]]
- [50, humidFromTemp, []]
blocks:
- start: [15, 15]
end: [17, 17]
percent: 0.8
- [10, None]
- [30, addValuePercent, {jitterA: 0.03, jitterB: 0.8}]
- [50, humidFromTemp]
behaviour:
behaviours:
- group: temperature
sharedObject: objectTemp
functions:
- name: randomValue
args:
- 40
- 80
duration:
- start: 60
- [100, normalValue, [2]]
- [120, None, []]
blocks:
- start: [5,6]
end: [8,9]
percent: 1.0
args: {a: 40, b: 80}
timeline:
- start: 44
end: 166
- [100, normalValue, {v: 2}]
- [120, addValuePercent, {}]