Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pyciemss-api call to notebook. #4211

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
</section>
<section :tabName="OptimizeTabs.Notebook" class="ml-4 mr-2 pt-3">
<p>Under construction. Use the wizard for now.</p>
<div class="result-message-grid">
<div v-for="(value, key) in optimizeRequestPayload" :key="key" class="result-message-row">
<div class="label">{{ key }}:</div>
<div class="value">{{ formatJsonValue(value) }}</div>
</div>
</div>
YohannParis marked this conversation as resolved.
Show resolved Hide resolved
</section>
<template #preview>
<tera-drilldown-preview
Expand Down Expand Up @@ -340,7 +346,8 @@ import {
getRunResult,
getRunResultCSV,
makeOptimizeJobCiemss,
parsePyCiemssMap
parsePyCiemssMap,
getSimulation
} from '@/services/models/simulation-service';
import {
CsvAsset,
Expand Down Expand Up @@ -506,6 +513,7 @@ const runResultsSummary = ref<{ [runId: string]: any }>({});
const riskResults = ref<{ [runId: string]: any }>({});
const simulationRawContent = ref<{ [runId: string]: CsvAsset | null }>({});
const optimizationResult = ref<any>('');
const optimizeRequestPayload = ref<any>('');

const modelParameterOptions = ref<string[]>([]);
const modelStateAndObsOptions = ref<string[]>([]);
Expand Down Expand Up @@ -750,6 +758,7 @@ const setOutputValues = async () => {
runResultsSummary.value[postForecastRunId] = postResultSummary;

optimizationResult.value = await getRunResult(knobs.value.optimizationRunId, 'optimize_results.json');
optimizeRequestPayload.value = (await getSimulation(knobs.value.optimizationRunId))?.executionPayload || '';
};

const preProcessedInterventionsData = computed<Dictionary<{ name: string; value: number; time: number }[]>>(() => {
Expand Down Expand Up @@ -903,11 +912,12 @@ watch(
display: flex;
flex-direction: row;
gap: var(--gap-small);
overflow: auto;
}

.label {
font-weight: bold;
width: 150px; /* Adjust the width of the label column as needed */
width: 210px; /* Adjust the width of the label column as needed */
}
.value {
flex-grow: 1;
Expand Down
Loading