diff options
Diffstat (limited to 'src/main/Simulator/Simulator/Files/OtherFunctions/colBoolCalc.mo')
-rw-r--r-- | src/main/Simulator/Simulator/Files/OtherFunctions/colBoolCalc.mo | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/Simulator/Simulator/Files/OtherFunctions/colBoolCalc.mo b/src/main/Simulator/Simulator/Files/OtherFunctions/colBoolCalc.mo new file mode 100644 index 0000000..4dc352d --- /dev/null +++ b/src/main/Simulator/Simulator/Files/OtherFunctions/colBoolCalc.mo @@ -0,0 +1,13 @@ +within Simulator.Files.OtherFunctions; + +function colBoolCalc + extends Modelica.Icons.Function; + //column boolean calculator + input Integer noOfStages, noOfExCons, exConStages[noOfExCons]; + output Boolean bool[noOfStages]; +algorithm + bool := fill(false, noOfStages); + for i in 1:noOfExCons loop + bool[exConStages[i]] := true; + end for; +end colBoolCalc; |