From 42acfa3e4089b7c8231617190792618a4fc9c939 Mon Sep 17 00:00:00 2001 From: Michael <1728165@stud.hs-mannheim.de> Date: Mon, 1 Jul 2024 14:27:31 +0200 Subject: [PATCH] fix GLMakie window closing with main.jl. Add missing Dependency for optimize --- env/Project.toml | 1 + main.jl | 2 +- optimize.jl | 6 +----- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/env/Project.toml b/env/Project.toml index 09ae876..e017a05 100644 --- a/env/Project.toml +++ b/env/Project.toml @@ -1,6 +1,7 @@ [deps] Agents = "46ada45e-f475-11e8-01d0-f70cc89e6671" AgentsExampleZoo = "88acaeb2-2f63-4ada-bca2-2825d9da22ed" +BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" diff --git a/main.jl b/main.jl index 3547e73..431b958 100644 --- a/main.jl +++ b/main.jl @@ -66,4 +66,4 @@ fig, abmobs = abmexploration( alabels = ["Sheep", "Wolf", "Eaten", "Starved"], mdata, mlabels = ["Grass"] ) -display(fig) \ No newline at end of file +wait(display(fig)) \ No newline at end of file diff --git a/optimize.jl b/optimize.jl index af71c96..5a38b81 100644 --- a/optimize.jl +++ b/optimize.jl @@ -79,11 +79,7 @@ fh = open(tempfilename, "w") serialize(fh, (optctrl, res)) close(fh) -#cost([0.806586, 0.0481975, 18.5285, 22.329]) -#[0.165438, 0.0462449, 15.4501, 12.0382] -#[0.571934, 0.74005, 4.22395, 24.9997, 15.4605, 1.09129, 2.18749, 24.3948, 11.3926] - -#Repro_Schaf, Repro_Wolf, Delta_Energie_Schaf, Delta_Energy_Wolf, Delta_Energy_Gras, n_Schaf, n_Wölfe +#Repro_Schaf, Repro_Wolf, Delta_Energie_Schaf, Delta_Energy_Wolf, Delta_Energy_Gras, n_Schafe, n_Wölfe #[0.26817737483789245, 0.027182763696826588, 14.440470034137558, 27.81279288508929, 15.785601397364756, 28.644469239080397, 13.471462703569484] #[0.11524114234251756, 0.07378121226251827, 29.31006871020899, 20.47494251025892, 5.915473514486612, 9.568612576389182, 22.299369669891565]