diff --git a/__pycache__/outputToGraph.cpython-310.pyc b/__pycache__/outputToGraph.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9d066e5f82c18e3857c0385111bae5138eeef39c Binary files /dev/null and b/__pycache__/outputToGraph.cpython-310.pyc differ diff --git a/multipleRuns.py b/multipleRuns.py new file mode 100644 index 0000000000000000000000000000000000000000..b324937fca8e6fe362618a7118ec83e5e1fa7d5b --- /dev/null +++ b/multipleRuns.py @@ -0,0 +1,16 @@ +from outputToGraph import run_java_jar, make_diagram, JAR_LOCATION,OUTPUT_FILE_LOCATION +import sys +import shutil + +def save_csv(i) : + old_location = OUTPUT_FILE_LOCATION + new_location = f"src/main/resources/output{i}.csv" + shutil.move(old_location,new_location) + +if ((len(sys.argv) > 1)): + for i in range (int(sys.argv[1])) : + run_java_jar(JAR_LOCATION) + make_diagram(OUTPUT_FILE_LOCATION) + save_csv(i) +else : + print("Usage : python3 multipleRuns.py <nb of runs>") \ No newline at end of file diff --git a/outputToGraph.py b/outputToGraph.py index c872c8eb9c552fcf5cf179c25a4cbac692dfdf1c..7d8c4366d7e28890d97683f2bb22f21b137d85c2 100644 --- a/outputToGraph.py +++ b/outputToGraph.py @@ -82,5 +82,6 @@ def edit_yaml(key, value): # copyToOutputFolder(f"output{i}.csv") # makeDiagram(f"{OUTPUT_FOLDER}/output{i}.csv") -run_java_jar(JAR_LOCATION) -make_diagram(OUTPUT_FILE_LOCATION) +if __name__ == "__main__": + run_java_jar(JAR_LOCATION) + make_diagram(OUTPUT_FILE_LOCATION) diff --git a/src/main/java/agents/states/SuceptibleSEIRSState.java b/src/main/java/agents/states/SuceptibleSEIRSState.java index 890d486f11222d3cdf4c03589e8de727f00e7f0f..e28076e7301389e4626f68b977e3572bbbe0e9af 100644 --- a/src/main/java/agents/states/SuceptibleSEIRSState.java +++ b/src/main/java/agents/states/SuceptibleSEIRSState.java @@ -19,4 +19,10 @@ public class SuceptibleSEIRSState extends SEIRSState { public String toString() { return SUCEPTIBLE; } + + public static void main(String[] args) { + float i = 4.12f; + int i2 = (int) i; + System.out.println((float)i2); + } } diff --git a/src/main/resources/output.png b/src/main/resources/output.png deleted file mode 100644 index 310181f96fff737b9bfe5c206b8691e159e4082e..0000000000000000000000000000000000000000 Binary files a/src/main/resources/output.png and /dev/null differ