From 358d9b652dae63b8d262e9204965e64801f30523 Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Tue, 4 Feb 2025 21:12:20 -0500 Subject: [PATCH] merge 2.31.5 back into main (#6419) Co-authored-by: Cole Blanchard <33158416+blanchco@users.noreply.github.com> Co-authored-by: Nelson Liu Co-authored-by: Yohann Paris Co-authored-by: Cole Blanchard Co-authored-by: Derek Vince Co-authored-by: Daniel Chang Co-authored-by: Tom Szendrey Co-authored-by: Shawn Yama Co-authored-by: Jamie Waese <120480244+jamiewaese-uncharted@users.noreply.github.com> Co-authored-by: Jaehwan Ryu Co-authored-by: Adrian <95376249+asylves1@users.noreply.github.com> --- .../model-parts/tera-model-part-entry.vue | 13 +- .../model/petrinet/tera-initial-entry.vue | 4 + .../model/petrinet/tera-initial-table.vue | 32 ++- .../model/petrinet/tera-parameter-entry.vue | 19 +- .../model/petrinet/tera-parameter-table.vue | 38 +++- .../tera-calibrate-ciemss-drilldown.vue | 9 +- .../tera-calibrate-node-ciemss.vue | 85 +++++--- .../tera-calibrate-ensemble-node-ciemss.vue | 23 ++- .../tera-compare-datasets-drilldown.vue | 185 ++++++------------ .../tera-model-config-drilldown.vue | 5 +- .../tera-model-configuration-item.vue | 19 +- .../tera-model-from-equations-drilldown.vue | 6 +- .../tera-optimize-ciemss-node.vue | 35 ++-- .../tera-simulate-ciemss-drilldown.vue | 35 ++-- .../tera-simulate-ensemble-node-ciemss.vue | 38 ++-- .../stratify-mira/stratify-mira-operation.ts | 4 +- .../stratify-mira/tera-stratify-drilldown.vue | 13 +- .../ops/stratify-mira/tera-stratify-node.vue | 61 ++++-- .../workflow/tera-workflow-annotation.vue | 55 +++++- .../hmi-client/src/composables/useCharts.ts | 100 +++++----- .../client/hmi-client/src/services/charts.ts | 36 +++- .../client/hmi-client/src/services/graph.ts | 2 +- .../client/hmi-client/src/services/jupyter.ts | 2 +- packages/client/hmi-client/src/utils/stats.ts | 127 +++++++++++- .../data/ModelConfigurationService.java | 5 +- 25 files changed, 605 insertions(+), 346 deletions(-) diff --git a/packages/client/hmi-client/src/components/model/model-parts/tera-model-part-entry.vue b/packages/client/hmi-client/src/components/model/model-parts/tera-model-part-entry.vue index 9b7146d625..884f4300bb 100644 --- a/packages/client/hmi-client/src/components/model/model-parts/tera-model-part-entry.vue +++ b/packages/client/hmi-client/src/components/model/model-parts/tera-model-part-entry.vue @@ -65,6 +65,7 @@ diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue index a5c24a840f..94bf92f127 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/model-from-equations/tera-model-from-equations-drilldown.vue @@ -477,10 +477,8 @@ const onSelection = (id: string) => { }; function onCheckBoxChange(equation) { - const state = cloneDeep(props.node.state); - const index = state.equations.findIndex((e) => e.name === equation.name); - state.equations[index].includeInProcess = equation.includeInProcess; - emit('update-state', state); + const index = clonedState.value.equations.findIndex((e) => e.name === equation.name); + clonedState.value.equations[index].includeInProcess = equation.includeInProcess; } async function onRun(extractionService: 'mira' | 'skema' = 'skema') { diff --git a/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-node.vue b/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-node.vue index 024028d23d..e7885f0fe1 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-node.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/optimize-ciemss/tera-optimize-ciemss-node.vue @@ -245,7 +245,6 @@ Provide a consis summary in 100 words or less. state.inProgressPostForecastId = ''; state.postForecastRunId = postSimId; state.currentProgress = 0; - emit('update-state', state); const datasetName = `Forecast run ${state.postForecastRunId}`; const projectId = useProjects().activeProjectId.value; @@ -256,21 +255,31 @@ Provide a consis summary in 100 words or less. false ); if (!datasetResult) { + state.simulateErrorMessage = { + name: 'Failed to create dataset', + value: '', + traceback: `Failed to create dataset from simulation result: ${state.postForecastRunId}` + }; + emit('update-state', state); return; } - emit('append-output', { - type: OptimizeCiemssOperation.outputs[0].type, - label: nodeOutputLabel(props.node, `Optimize output`), - value: [ - { - policyInterventionId: state.optimizedInterventionPolicyId, - datasetId: datasetResult.id - } - ], - isSelected: false, - state: _.omit(state, ['chartSettings']) - }); + emit( + 'append-output', + { + type: OptimizeCiemssOperation.outputs[0].type, + label: nodeOutputLabel(props.node, `Optimize output`), + value: [ + { + policyInterventionId: state.optimizedInterventionPolicyId, + datasetId: datasetResult.id + } + ], + isSelected: false, + state: _.omit(state, ['chartSettings']) + }, + state + ); } else { // Simulation Failed: const state = _.cloneDeep(props.node.state); diff --git a/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue index 42fda40033..75aacef71a 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/simulate-ciemss/tera-simulate-ciemss-drilldown.vue @@ -329,17 +329,19 @@