From d5b568e8e559e80df5d9d1cd56ba166f463e7e89 Mon Sep 17 00:00:00 2001
From: kohlhaasrebecca <rebecca.kohlhaas@outlook.com>
Date: Mon, 6 May 2024 14:42:56 +0200
Subject: [PATCH] Cleanup

---
 docs/diagrams/Structure_BayesInf.drawio       | 320 +++++++++++++++++-
 .../surrogate_models/sequential_design.py     |  44 +--
 2 files changed, 316 insertions(+), 48 deletions(-)

diff --git a/docs/diagrams/Structure_BayesInf.drawio b/docs/diagrams/Structure_BayesInf.drawio
index d71ef7225..008e3133a 100644
--- a/docs/diagrams/Structure_BayesInf.drawio
+++ b/docs/diagrams/Structure_BayesInf.drawio
@@ -1,4 +1,4 @@
-<mxfile host="Electron" modified="2024-04-24T13:20:35.182Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.11 Chrome/114.0.5735.289 Electron/25.9.8 Safari/537.36" etag="yF3UWZAVG7IacsJBd-44" version="22.1.11" type="device" pages="4">
+<mxfile host="Electron" modified="2024-05-02T13:04:17.265Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.11 Chrome/114.0.5735.289 Electron/25.9.8 Safari/537.36" etag="8fVWeNyeyMJR1iK2xxxZ" version="22.1.11" type="device" pages="5">
   <diagram name="Class and function structure" id="efOe0Jku58RX-i1bv-3b">
     <mxGraphModel dx="2921" dy="823" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
       <root>
@@ -411,8 +411,8 @@
       </root>
     </mxGraphModel>
   </diagram>
-  <diagram id="sQf09xvhinkT827TE7Va" name="Function structure Engine">
-    <mxGraphModel dx="1357" dy="914" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+  <diagram id="sQf09xvhinkT827TE7Va" name="old Function structure Engine">
+    <mxGraphModel dx="1912" dy="1275" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
       <root>
         <mxCell id="0" />
         <mxCell id="1" parent="0" />
@@ -422,10 +422,10 @@
         <mxCell id="JXjM7l_erEiZMkSmYBvl-2" value="hellinger_distance" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
           <mxGeometry x="1340" y="50" width="110" height="50" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-3" value="logpdf" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-3" value="logpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;" parent="1" vertex="1">
           <mxGeometry x="1050" y="50" width="110" height="50" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-4" value="subdomain" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-4" value="subdomain" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="625" y="50" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-5" value="start_engine" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
@@ -489,7 +489,7 @@
         <mxCell id="JXjM7l_erEiZMkSmYBvl-9" value="train_seq_design" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
           <mxGeometry x="315" y="310" width="110" height="50" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-12" value="util_VarBasedDesign" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-12" value="util_VarBasedDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="670" y="648" width="130" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=0;exitDx=0;exitDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-13" target="JXjM7l_erEiZMkSmYBvl-3" edge="1">
@@ -514,7 +514,7 @@
             <mxPoint x="-91" y="185" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-13" value="util_BayesianActiveDesign" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-13" value="util_BayesianActiveDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="1020" y="680" width="150" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-14" target="JXjM7l_erEiZMkSmYBvl-6" edge="1">
@@ -528,7 +528,7 @@
             <mxPoint x="-1" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-14" value="utilBayesianDesign" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-14" value="utilBayesianDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="880" y="730" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-15" target="JXjM7l_erEiZMkSmYBvl-12" edge="1">
@@ -542,7 +542,7 @@
             <mxPoint x="3" y="29" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-15" value="run_util_func" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-15" value="run_util_func" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="660" y="450" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-16" target="JXjM7l_erEiZMkSmYBvl-12" edge="1">
@@ -564,7 +564,7 @@
         <mxCell id="W5_FOelZ0qj-h3Gb0n3K-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="JXjM7l_erEiZMkSmYBvl-16" target="JXjM7l_erEiZMkSmYBvl-14" edge="1">
           <mxGeometry relative="1" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-16" value="dual_annealing" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-16" value="dual_annealing" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="910" y="450" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="W5_FOelZ0qj-h3Gb0n3K-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-17" target="JXjM7l_erEiZMkSmYBvl-18" edge="1">
@@ -575,7 +575,7 @@
             <mxPoint x="17" y="-2" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-17" value="tradeoff_weights" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-17" value="tradeoff_weights" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="980" y="210" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="1" source="JXjM7l_erEiZMkSmYBvl-18" target="JXjM7l_erEiZMkSmYBvl-4" edge="1">
@@ -611,19 +611,19 @@
             <mxPoint x="74" y="-1" as="offset" />
           </mxGeometry>
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-18" value="choose_next_sample" style="html=1;whiteSpace=wrap;fillColor=#fad7ac;strokeColor=#b46504;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-18" value="choose_next_sample" style="html=1;whiteSpace=wrap;fillColor=default;strokeColor=#000000;" parent="1" vertex="1">
           <mxGeometry x="610" y="210" width="140" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-20" value="util_AlphOptDesign" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
           <mxGeometry x="330" y="210" width="110" height="50" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-21" value="_normpdf" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-21" value="_normpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="1340" y="430" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="JXjM7l_erEiZMkSmYBvl-22" target="JXjM7l_erEiZMkSmYBvl-3" edge="1">
           <mxGeometry relative="1" as="geometry" />
         </mxCell>
-        <mxCell id="JXjM7l_erEiZMkSmYBvl-22" value="_corr_factor_BME" style="html=1;whiteSpace=wrap;strokeColor=#CC6600;" parent="1" vertex="1">
+        <mxCell id="JXjM7l_erEiZMkSmYBvl-22" value="_corr_factor_BME" style="html=1;whiteSpace=wrap;strokeColor=#000000;fillColor=default;" parent="1" vertex="1">
           <mxGeometry x="1130" y="220" width="110" height="50" as="geometry" />
         </mxCell>
         <mxCell id="JXjM7l_erEiZMkSmYBvl-23" value="_posteriorPlot" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
@@ -660,6 +660,298 @@
       </root>
     </mxGraphModel>
   </diagram>
+  <diagram name="new Function structure Engine" id="iNGcEAQ2-D2qgcItFAcZ">
+    <mxGraphModel dx="2049" dy="1366" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+      <root>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-0" />
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-1" parent="y4f9s6x6-MheSwlm3NQo-0" />
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-2" value="&lt;p style=&quot;margin:0px;margin-top:4px;text-align:center;&quot;&gt;&lt;b&gt;Engine&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;div style=&quot;height:2px;&quot;&gt;&lt;/div&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="60" y="140" width="630" height="612.5" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-3" value="hellinger_distance" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="314" y="40" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-4" value="logpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="100" y="30" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-6" value="start_engine" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="270" y="628" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-8" target="y4f9s6x6-MheSwlm3NQo-6">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-8" value="train_normal" style="html=1;whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="170" y="430" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-11" target="y4f9s6x6-MheSwlm3NQo-22">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="335" y="362.5" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-11" target="y4f9s6x6-MheSwlm3NQo-8">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-11" value="train_sequential" style="html=1;whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="170" y="337.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-12" value="eval_metamodel" style="html=1;whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="100" y="262.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-22" target="y4f9s6x6-MheSwlm3NQo-59">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-15" value="if len(obs_data) != 0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-14">
+          <mxGeometry x="0.8137" relative="1" as="geometry">
+            <mxPoint x="-57" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-22" target="y4f9s6x6-MheSwlm3NQo-65">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="350" y="337.4999999999998" as="sourcePoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-17" value="if len(obs_data) != 0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-16">
+          <mxGeometry x="0.7684" y="3" relative="1" as="geometry">
+            <mxPoint x="1" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-22" target="y4f9s6x6-MheSwlm3NQo-66">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-19" value="if expdes.valid_model_runs" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-18">
+          <mxGeometry x="0.606" y="3" relative="1" as="geometry">
+            <mxPoint x="-16" y="3" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-22" target="y4f9s6x6-MheSwlm3NQo-67">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-21" value="if mc_ref and pce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-20">
+          <mxGeometry x="0.7094" y="-3" relative="1" as="geometry">
+            <mxPoint x="-31" y="-3" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-22" value="train_seq_design" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="315" y="337.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-38">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="1095.0000000000005" y="679.9999999999998" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-27" value="if method == &#39;bayesactdesign&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=default;" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-26">
+          <mxGeometry x="-0.6235" y="2" relative="1" as="geometry">
+            <mxPoint x="289" y="2" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-38">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="735" y="648" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-38">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="935.0000000000005" y="730" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-37" value="if method == &#39;bayesoptdesign&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-36">
+          <mxGeometry x="0.6143" y="-3" relative="1" as="geometry">
+            <mxPoint x="3" y="29" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-43">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="735" y="648" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-40" value="if method == &#39;varoptdesign&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-39">
+          <mxGeometry x="-0.5992" relative="1" as="geometry">
+            <mxPoint x="-197" y="62" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-43">
+          <mxGeometry relative="1" as="geometry">
+            <Array as="points">
+              <mxPoint x="965" y="590" />
+              <mxPoint x="1095" y="590" />
+            </Array>
+            <mxPoint x="1095.0000000000005" y="679.9999999999998" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-43">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="935.0000000000005" y="730" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" target="y4f9s6x6-MheSwlm3NQo-54">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="980" y="234.99999999999977" as="sourcePoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-45" value="if exploit _method is &#39;bayesoptdesign&#39;,&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&#39;bayesactdesign&#39; or &#39;varoptdesign&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-44">
+          <mxGeometry x="0.1312" y="2" relative="1" as="geometry">
+            <mxPoint x="17" y="-2" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-54">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="790" y="280.0000000000002" as="sourcePoint" />
+            <mxPoint x="715" y="449.9999999999998" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-49" value="if exploit _method is &#39;bayesoptdesign&#39;,&lt;br&gt;&#39;bayesactdesign&#39; or &#39;varoptdesign&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-48">
+          <mxGeometry x="0.1579" relative="1" as="geometry">
+            <mxPoint x="-15" y="49" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-54">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="680" y="205.05882352941194" as="sourcePoint" />
+            <mxPoint x="965.0000000000005" y="449.9999999999998" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-51" value="if explore_method == &#39;dual annealing&#39;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-50">
+          <mxGeometry x="-0.6061" relative="1" as="geometry">
+            <mxPoint x="270" y="46" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-56" value="_normpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="414" y="260" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-58" target="y4f9s6x6-MheSwlm3NQo-4">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-58" value="_corr_factor_BME" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="100" y="190" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-59" value="_posteriorPlot" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="520" y="440" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-65" target="y4f9s6x6-MheSwlm3NQo-3">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-61" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-65" target="y4f9s6x6-MheSwlm3NQo-56">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-62" value="always" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-61">
+          <mxGeometry x="0.0929" y="-1" relative="1" as="geometry">
+            <mxPoint as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-65" target="y4f9s6x6-MheSwlm3NQo-58">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-64" value="commented out?" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="y4f9s6x6-MheSwlm3NQo-63">
+          <mxGeometry x="-0.1477" y="3" relative="1" as="geometry">
+            <mxPoint as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-65" value="_BME_Calculator" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="314" y="190" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-66" value="_validError" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="520" y="510" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-67" value="_error_Mean_Std" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="520" y="580" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-0" value="&lt;p style=&quot;margin:0px;margin-top:4px;text-align:center;&quot;&gt;&lt;b&gt;SequentialDesign&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;div style=&quot;height:2px;&quot;&gt;&lt;/div&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="930" y="262.5" width="700" height="480" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-1" value="logpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1460" y="167.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-2" value="subdomain" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1165" y="167.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.25;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-5" target="y4f9s6x6-MheSwlm3NQo-6">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-3" value="util_VarBasedDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1040" y="617.5" width="130" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-4" target="SsGTdGMXFo9aN4bdp-I0-10">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-4" value="util_BayesianActiveDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1330" y="597.5" width="150" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-5" target="SsGTdGMXFo9aN4bdp-I0-10">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-5" target="y4f9s6x6-MheSwlm3NQo-8">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-5" value="utilBayesianDesign" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1210" y="668.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-6" target="SsGTdGMXFo9aN4bdp-I0-5">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-6" target="SsGTdGMXFo9aN4bdp-I0-4">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="0U_F1tHcRfVGgDRGmiKV-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;fillColor=#d5e8d4;gradientColor=#97d077;strokeColor=#82b366;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-6" target="y4f9s6x6-MheSwlm3NQo-55">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-6" value="run_util_func" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1130" y="477.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-7" target="SsGTdGMXFo9aN4bdp-I0-5">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-7" target="SsGTdGMXFo9aN4bdp-I0-4">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="0U_F1tHcRfVGgDRGmiKV-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;dashed=1;fillColor=#d5e8d4;gradientColor=#97d077;strokeColor=#82b366;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-7" target="SsGTdGMXFo9aN4bdp-I0-6">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-7" value="dual_annealing" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1310" y="447.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-8" value="tradeoff_weights" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1340" y="337.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-9" target="SsGTdGMXFo9aN4bdp-I0-8">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-9" target="SsGTdGMXFo9aN4bdp-I0-2">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-9" target="SsGTdGMXFo9aN4bdp-I0-6">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-9" target="SsGTdGMXFo9aN4bdp-I0-7">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-9" target="y4f9s6x6-MheSwlm3NQo-55">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-9" value="choose_next_sample" style="html=1;whiteSpace=wrap;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1115" y="337.5" width="140" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-10" value="_normpdf" style="html=1;whiteSpace=wrap;strokeColor=#000000;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="1500" y="668.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-4" target="SsGTdGMXFo9aN4bdp-I0-1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="1500" y="367.5" as="sourcePoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="SsGTdGMXFo9aN4bdp-I0-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="SsGTdGMXFo9aN4bdp-I0-6" target="SsGTdGMXFo9aN4bdp-I0-3">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-55" value="util_AlphOptDesign" style="html=1;whiteSpace=wrap;" vertex="1" parent="y4f9s6x6-MheSwlm3NQo-1">
+          <mxGeometry x="960" y="467.5" width="110" height="50" as="geometry" />
+        </mxCell>
+        <mxCell id="y4f9s6x6-MheSwlm3NQo-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="y4f9s6x6-MheSwlm3NQo-1" source="y4f9s6x6-MheSwlm3NQo-22" target="SsGTdGMXFo9aN4bdp-I0-9">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="680" y="259.9999999999998" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+      </root>
+    </mxGraphModel>
+  </diagram>
   <diagram id="ME5gyYpVqUByTnAIOcMV" name="Parameter and function interaction">
     <mxGraphModel dx="2049" dy="1366" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
       <root>
diff --git a/src/bayesvalidrox/surrogate_models/sequential_design.py b/src/bayesvalidrox/surrogate_models/sequential_design.py
index 72779f022..7a95934f9 100644
--- a/src/bayesvalidrox/surrogate_models/sequential_design.py
+++ b/src/bayesvalidrox/surrogate_models/sequential_design.py
@@ -123,16 +123,10 @@ class SequentialDesign:
 
         # Read observations or MCReference
         # TODO: recheck the logic in this if statement 
-        # ToDo: this could perhaps be moved into the Sequential Design
+        # TODO: TotalSigma2 and self.observations not always defined !?
         if (len(self.Model.observations) != 0 or self.Model.meas_file is not None) and hasattr(self.MetaModel,
                                                                                                'Discrepancy'):
             self.observations = self.Model.read_observation()
-            obs_data = self.observations
-        else:
-            obs_data = []
-            # TODO: TotalSigma2 not defined if not in this else???
-            # TODO: no self.observations if in here
-            TotalSigma2 = {}
             
         
 
@@ -149,7 +143,7 @@ class SequentialDesign:
         n_candidates : int, optional
             Number of candidate samples. The default is 5.
         var : string, optional
-            Utility function. The default is None. # TODO: default is set to DKL, not none
+            Utility function. The default is 'DKL'.
 
         Raises
         ------
@@ -161,11 +155,11 @@ class SequentialDesign:
         Xnew : array (n_samples, n_params)
             Selected new training point(s).
         """
+        # Do all necessary initializations
         self.start_seqdesign()
 
         # Initialization
         # TODO: check if all of these variables are necessary, or if some should be class attributes
-        Bounds = self.ExpDesign.bound_tuples
         n_new_samples = self.ExpDesign.n_new_samples
         explore_method = self.ExpDesign.explore_method
         exploit_method = self.ExpDesign.exploit_method
@@ -174,7 +168,6 @@ class SequentialDesign:
 
         old_EDX = self.ExpDesign.X
         old_EDY = self.ExpDesign.Y.copy()
-        ndim = self.ExpDesign.X.shape[1]
         OutputNames = self.out_names
 
         # -----------------------------------------
@@ -182,7 +175,6 @@ class SequentialDesign:
         # -----------------------------------------
         # Utility function exploit_method provided by user
         if exploit_method.lower() == 'user':
-            # TODO: is the exploit_method meant here?
             if not hasattr(self.ExpDesign, 'ExploitFunction') or self.ExpDesign.ExploitFunction is None:
                 raise AttributeError(
                     'Function `ExploitFunction` not given to the ExpDesign, thus cannor run user-defined sequential'
@@ -203,7 +195,7 @@ class SequentialDesign:
             start_time = time.time()
 
             # Divide the domain to subdomains
-            subdomains = subdomain(Bounds, n_new_samples)
+            subdomains = subdomain(self.ExpDesign.bound_tuples, n_new_samples)
 
             # Multiprocessing
             if self.parallel:
@@ -364,7 +356,6 @@ class SequentialDesign:
 #                    Xnew[i] = newSamples[np.argmax(maxminScore)]
 #            else:
                 # Changed this from allCandiates to full set of candidates
-                # TODO: still not changed for e.g. 'Voronoi'
 #                Xnew = finalCandidates[sorted_idxtotalScore[:n_new_samples]]
 
         elif exploit_method.lower() == 'varoptdesign':
@@ -372,11 +363,6 @@ class SequentialDesign:
             UtilMethod = var.lower()
 
             # ------- Calculate Exoploration weight -------
-            # Compute exploration weight based on trade off scheme
-#            explore_w, exploit_w = self.tradeoff_weights(tradeoff_scheme,
-#                                                         old_EDX,
-#                                                         old_EDY)
-
             # Generate candidate samples from Exploration class
             nMeasurement = old_EDY[OutputNames[0]].shape[1]
 
@@ -471,34 +457,24 @@ class SequentialDesign:
                     # select the requested number of samples
 #                    Xnew[i] = newSamples[np.argmax(maxminScore)]
 
-        # TODO: For these 2 last methods, we should find better ways
         elif exploit_method.lower() == 'alphabetic':
             # TODO: Check function to see what it does for scores/how it chooses points, so it gives as an output the
             #       scores. See how it works with exploration_scores.
             # TODO: Check if it is a minimization or maximization. (We think it is minimization)
-            # ------- EXPLOITATION: ALPHABETIC -------
-            
             scoreExploitation = -self.util_AlphOptDesign(candidates, var)
 
         elif exploit_method == 'Space-filling':
-            # TODO: Set exploitation score to 0, so we can do tradeoff oustide of if/else
-            # ------- EXPLOITATION: SPACE-FILLING -------
-            scoreExploitation = scoreExploration
-
-            # ------- Select the best candidate -------
-            # find an optimal point subset to add to the initial design by
-            # maximization of the utility score and taking care of NaN values
-#            temp = totalScore.copy()
-#            temp[np.isnan(totalScore)] = -np.inf
-#            sorted_idxtotalScore = np.argsort(temp)[::-1]
-
-            # select the requested number of samples
-#            Xnew = candidates[sorted_idxtotalScore[:n_new_samples]]
+            # Set exploitation score to 0, so we can do tradeoff oustide of if/else
+            scoreExploitation = np.zeros(scoreExploration.shape[0])
 
         else:
             raise NameError('The requested design method is not available.')
 
         # ------------- Select the best candidates ------------------
+        # find an optimal point subset to add to the initial design by
+        # maximization of the utility score and taking care of NaN values
+        scoreExploration[np.isnan(scoreExploration)] = -np.inf
+        scoreExploitation[np.isnan(scoreExploitation)] = -np.inf
         totalScore = explore_w * scoreExploration
         totalScore += exploit_w * scoreExploitation
         
-- 
GitLab