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

216 delta ensembles simulation time series #812

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

jorgenherje
Copy link
Collaborator

@jorgenherje jorgenherje commented Nov 25, 2024

Introduction of Delta Ensembles

Definition: DeltaEnsemble = CompareEnsemble - ReferenceEnsemble

This PR introduces framework logic to create, propagate and provide delta ensembles to modules. Implemented use of delta ensemble in SimulationTimeSeries-module, which introduces two new end-points for vector summary data: individual realization vectors and statistical vectors for delta ensembles.

Front-end:

  • Framework:

    • Functionality for creating delta ensembles

    • Introducing two type of ensembles and idents:

      • Rename existing Ensemble to RegularEnsemble
      • RegularEnsemble and DeltaEnsemble
      • RegularEnsembleIdent and DeltaEnsembleIdent
    • Restructure EnsembleSet:

      • Hold an array for each type of ensemble:
        • regularEnsembleArray: RegularEnsemble[];
        • deltaEnsembleArray: DeltaEnsemble[];
    • Allow delta ensembles in RealizationFilter.

    • Define and propagate delta ensembles to modules

    • Components:

      • Make EnsembleDropdown and EnsembleSelect handle DeltaEnsemble as an opt-in.
  • Modules:

    • Implement first usage in SimulationTimeSeries-module
    • The DeltaEnsembles are not published to data channels - only regular ensembles.

Back-end:

  • Create endpoints for timeseries of Delta Ensembles:
    • Individual realizations endpoint
    • Statistical endpoint

General fixes/adjustments

  • Bug in handleApplyAllClick() in realizationFilterSettings.tsx: added missing notification of realization filter change for subscribers (did not affect when closing drawer).
  • Remove unused hook useFirstEnsembleInEnsembleSet in WorkbenchSession.ts

Closes: #216
Closes: #538

Creating interfaces and generics
- Improve interaction/checks in dialog
- Add local store of created delta ensembles
- Add utils for array of various EnsembleIdentInterface implementaitons
- Improve functionalityof ensemble select dialog
WIP
@jorgenherje jorgenherje added the enhancement New feature or request label Nov 25, 2024
@jorgenherje jorgenherje self-assigned this Nov 25, 2024
Split code into two utils: One for fetching from back-end and another to assemble Ensemble and DeltaEnsemble objects to create new EnsembleSet
… to "Array" and more

EnsembleSet:
- Split override functions into separate function, and remove EnsembleType enum
- Rename original getEnsembleArr() to getEnsembleArray()

General:
- Rename namings from "Arr" to "Array"
- Move getEnsembleIdentFromString() from ensembleIdentUtils.ts to internal util for realizationFilterSettings
- Remove unused hook useFirstEnsembleInEnsembleSet in WorkbenchSession.ts
From "First Ensemble" and "Second Ensemble"  to "Compare Ensemble" and "Reference Ensemble"
Fix comments, minor bug fixes and adjust code
Adjust back-end after discussion with Sigurd
- Remove EnsembleInterface and EnsembleIdentInterface
- Rename `Ensemble` to `RegularEnsemble`and `EnsembleIdent` to `RegularEnsembleIdent`
Handle/prevent duplicated delta ensembles in dialog
Adjust incorrect order of RegularEnsemble arguments resulting in failing tests.
Minor fixes/adjustments based on observations during "EnsembleIdent->string"-spike
@jorgenherje jorgenherje marked this pull request as ready for review December 13, 2024 14:18
…ctions

Based on discussion: Remove overload, and explicitly implement fixup based on argument types. As the overloads had a bug, where currIdent could be of a type, and if the type does not exist in ensembleSet, an incorrect ident would be returned for a module not supporting it.

E.g. request RegularEnsembleIdent, ensemble set removes last RegularEnsembleIdent, then DeltaEnsembleIdent is returned, and the module might get error scenario.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant