From 35e331e01f5864d5bed113e0b0be0c92472d2431 Mon Sep 17 00:00:00 2001 From: Tom Szendrey Date: Thu, 19 Dec 2024 13:32:15 -0500 Subject: [PATCH] Calibrated Configs failing createAMRFromConfiguration (#5877) Co-authored-by: Daniel Chang --- .../hmiserver/service/data/ModelConfigurationService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/ModelConfigurationService.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/ModelConfigurationService.java index 9fbfb313eb..5566d6535f 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/ModelConfigurationService.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/ModelConfigurationService.java @@ -207,7 +207,10 @@ private static ModelDistribution getModelDistribution(final ModelParameter param } public static Model createAMRFromConfiguration(final Model model, final ModelConfiguration modelConfiguration) { - setModelParameters(model.getParameters(), modelConfiguration.getParameterSemanticList()); + // Do not bother setting when we have simulationId as we will use that calibration's inferred parameters. + if (modelConfiguration.getSimulationId() == null) { + setModelParameters(model.getParameters(), modelConfiguration.getParameterSemanticList()); + } setModelInitials(model.getInitials(), modelConfiguration.getInitialSemanticList()); setModelObservables(model.getObservables(), modelConfiguration.getObservableSemanticList()); return model.clone();