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

[Task]: Update Optimize Input Designs #3919

Merged
merged 24 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
900777d
START moving constraints over
Tom-Szendrey Jun 17, 2024
2c98e6f
name, update + delete, info circle
Tom-Szendrey Jun 17, 2024
2ba1c07
add isActive to the optimize constraint grp
Tom-Szendrey Jun 17, 2024
713d6d7
Merge branch 'main' of https://github.com/DARPA-ASKEM/TERArium into T…
Tom-Szendrey Jun 18, 2024
b61d35d
minor css
Tom-Szendrey Jun 18, 2024
dd1c790
moving settings to bottom
Tom-Szendrey Jun 18, 2024
545ad1f
first update to correct API call with new state
Tom-Szendrey Jun 18, 2024
ac30520
Merge branch 'main' of https://github.com/DARPA-ASKEM/TERArium into T…
Tom-Szendrey Jun 18, 2024
c3cd7bf
styling and labeling
Tom-Szendrey Jun 18, 2024
2ca0ac7
Removing policy group's coloured border
Tom-Szendrey Jun 18, 2024
1c9bdc8
updates to show additional options
Tom-Szendrey Jun 18, 2024
cb010d2
minor padding update
Tom-Szendrey Jun 18, 2024
a34d273
center label
Tom-Szendrey Jun 18, 2024
bb4bb1b
adding TODO tooltips
Tom-Szendrey Jun 18, 2024
b8b3d06
adding minimizer method
Tom-Szendrey Jun 18, 2024
6094adf
correction to isRunDisabled
Tom-Szendrey Jun 18, 2024
dea3edc
undefined error handling
Tom-Szendrey Jun 18, 2024
7849cdb
Merge branch 'main' of https://github.com/DARPA-ASKEM/TERArium into T…
Tom-Szendrey Jun 19, 2024
a864df3
Thanks Shawn
Tom-Szendrey Jun 19, 2024
929c1ba
need the attrs in tera-input
Tom-Szendrey Jun 19, 2024
7c07a0e
replacing primevue stuff with tera-input
Tom-Szendrey Jun 19, 2024
9a74901
replace with tera-input in group form
Tom-Szendrey Jun 19, 2024
ed53d4a
Good point Dan!
Tom-Szendrey Jun 19, 2024
cbfab8f
Merge branch 'main' of https://github.com/DARPA-ASKEM/TERArium into T…
Tom-Szendrey Jun 19, 2024
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 @@ -16,7 +16,6 @@ export enum ContextMethods {
}

export interface InterventionPolicyGroup {
borderColour: string;
name: string;
parameter: string;
startTime: number;
Expand All @@ -27,6 +26,16 @@ export interface InterventionPolicyGroup {
paramValue: number;
}

export interface ConstraintGroup {
name: string; // Title of the group
targetVariable: string;
qoiMethod: ContextMethods;
riskTolerance: number;
threshold: number;
isMinimized: boolean;
isActive: boolean; // Denotes whether or not this should be used when user hits run.
}

export interface OptimizeCiemssOperationState extends BaseState {
// Settings
endTime: number;
Expand All @@ -37,12 +46,9 @@ export interface OptimizeCiemssOperationState extends BaseState {
// Intervention policies
interventionType: InterventionTypes;
interventionPolicyGroups: InterventionPolicyGroup[];
// Constraints
qoiMethod: ContextMethods;
targetVariables: string[];
riskTolerance: number;
threshold: number;
isMinimized: boolean;
// Constraints:
constraintGroups: ConstraintGroup[];
// Charts + Outputs:
chartConfigs: string[][];
inProgressOptimizeId: string;
inProgressForecastId: string;
Expand All @@ -53,7 +59,6 @@ export interface OptimizeCiemssOperationState extends BaseState {
}

export const blankInterventionPolicyGroup: InterventionPolicyGroup = {
borderColour: '#cee2a4',
name: 'Policy bounds',
parameter: '',
startTime: 0,
Expand All @@ -64,6 +69,16 @@ export const blankInterventionPolicyGroup: InterventionPolicyGroup = {
paramValue: 0
};

export const defaultConstraintGroup: ConstraintGroup = {
name: 'Constraint',
qoiMethod: ContextMethods.max,
targetVariable: '',
riskTolerance: 5,
threshold: 1,
isMinimized: true,
isActive: true
};

export const OptimizeCiemssOperation: Operation = {
name: WorkflowOperationTypes.OPTIMIZE_CIEMSS,
displayName: 'Optimize with PyCIEMSS',
Expand All @@ -85,11 +100,7 @@ export const OptimizeCiemssOperation: Operation = {
maxfeval: 25,
interventionType: InterventionTypes.paramValue,
interventionPolicyGroups: [blankInterventionPolicyGroup],
qoiMethod: ContextMethods.max,
targetVariables: [],
riskTolerance: 5,
threshold: 1,
isMinimized: true,
constraintGroups: [defaultConstraintGroup],
chartConfigs: [],
inProgressOptimizeId: '',
inProgressForecastId: '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="policy-group" :style="`border-left: 9px solid ${props.config.borderColour}`">
<div class="policy-group">
<div class="form-header">
<div>
<InputText
Expand Down
Loading
Loading