File tree Expand file tree Collapse file tree 8 files changed +36
-3
lines changed
scala/edu/ie3/simbench/config Expand file tree Collapse file tree 8 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 1919
2020 targetFolder = "convertedData/multiVoltLvlNoSwitches"
2121 compress = true
22+ workers = 20
2223 }
2324
2425 simbenchCodes = [
150151 "1-MV-urban--2-no_sw"
151152 ]
152153}
154+
155+ conversion {
156+ removeSwitches = false
157+ participantWorkersPerType = 20
158+ }
Original file line number Diff line number Diff line change 1919
2020 targetFolder = "convertedData/multiVoltLvlNoSwitches"
2121 compress = true
22+ workers = 20
2223 }
2324
2425 simbenchCodes = [
112113 "1-MVLV-urban-all-2-no_sw"
113114 ]
114115}
116+
117+ conversion {
118+ removeSwitches = false
119+ participantWorkersPerType = 20
120+ }
Original file line number Diff line number Diff line change 1919
2020 targetFolder = "convertedData/mvLvNoSwitches"
2121 compress = true
22+ workers = 20
2223 }
2324
2425 simbenchCodes = [
106107
107108conversion {
108109 removeSwitches = true
110+ participantWorkersPerType = 20
109111}
Original file line number Diff line number Diff line change 1919
2020 targetFolder = "convertedData/singleVoltLvlNoSwitches"
2121 compress = true
22+ workers = 20
2223 }
2324
2425 simbenchCodes = [
6364 "1-MV-urban--2-no_sw"
6465 ]
6566}
67+
68+ conversion {
69+ removeSwitches = false
70+ participantWorkersPerType = 20
71+ }
Original file line number Diff line number Diff line change 1919
2020 targetFolder = "convertedData/smallGrid"
2121 compress = false
22+ workers = 20
2223 }
2324
2425 simbenchCodes = [
2526 "1-LV-rural1--1-sw"
2627 ]
2728}
29+
30+ conversion {
31+ removeSwitches = false
32+ participantWorkersPerType = 20
33+ }
Original file line number Diff line number Diff line change 1818 csv = CsvConfig
1919 targetFolder = "String" | "convertedData"
2020 compress = "Boolean" | true
21+ workers = "Int" | 20
2122 }
2223}
2324conversion {
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ case object ConfigValidator {
3535 @ throws[SimbenchException ]
3636 private def checkValidity (io : SimbenchConfig .Io ): Unit = {
3737 checkSimbenchCodes(io.simbenchCodes)
38+ if (io.output.workers <= 0 )
39+ throw new SimbenchException (
40+ " The amount of output workers has to be positive!"
41+ )
3842 }
3943
4044 /**
Original file line number Diff line number Diff line change 1- // generated by tscfg 0.9.993 on Fri Aug 27 13:41:17 CEST 2021
1+ // generated by tscfg 0.9.993 on Mon Aug 30 16:37:01 CEST 2021
22// source: src/main/resources/config-template.conf
33
44package edu .ie3 .simbench .config
@@ -121,7 +121,8 @@ object SimbenchConfig {
121121 final case class Output (
122122 compress : scala.Boolean ,
123123 csv : SimbenchConfig .CsvConfig ,
124- targetFolder : java.lang.String
124+ targetFolder : java.lang.String ,
125+ workers : scala.Int
125126 )
126127 object Output {
127128 def apply (
@@ -139,7 +140,8 @@ object SimbenchConfig {
139140 ),
140141 targetFolder =
141142 if (c.hasPathOrNull(" targetFolder" )) c.getString(" targetFolder" )
142- else " convertedData"
143+ else " convertedData" ,
144+ workers = if (c.hasPathOrNull(" workers" )) c.getInt(" workers" ) else 20
143145 )
144146 }
145147 }
You can’t perform that action at this time.
0 commit comments