Resurect viz - #469
Merged
Merged
Conversation
…m in the power_system_configs array
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the simulation configuration structure to support multiple power system configurations by changing from a single power_system_config object to an array power_system_configs. The refactor moves simulator_config and model_creation_config from the top-level simulation_config into individual power system configurations, enabling future support for multi-simulator scenarios.
- Restructured
SimulationConfigurationinterface to usepower_system_configsarray instead of singularpower_system_config - Moved simulator-specific settings into nested
simulator_configwithin each power system configuration - Updated all component usages to access the first element of the new array structure using
power_system_configs[0]
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| client/webpack.development.config.js | Updated proxy target port from 8092 to 8080 and reformatted with consistent spacing |
| client/src/app/simulation/topology-renderer/TopologyRendererContainer.tsx | Updated all references from power_system_config to power_system_configs[0] for topology and control operations |
| client/src/app/simulation/simulation-configuration-editor/views/simulation-configuration-tab/SimulationConfigurationTab.tsx | Updated form initialization to access simulator and model config from new nested structure |
| client/src/app/simulation/simulation-configuration-editor/views/power-system-configuration-tab/PowerSystemConfigurationTab.tsx | Updated dropdown selected option finders to use array notation |
| client/src/app/simulation/simulation-configuration-editor/models/SimulationConfigurationTabModel.ts | Expanded model_creation_config with additional fields (encoding, system_frequency, triplex, etc.) |
| client/src/app/simulation/simulation-configuration-editor/SimulationConfigurationEditor.tsx | Updated config cloning, validation, and form population to handle array structure and nested simulator_config |
| client/src/app/simulation/measurement-chart/models/FetchLimitsFileRequest.ts | Added model_id parameter to request |
| client/src/app/simulation/measurement-chart/MeasurementChartContainer.tsx | Updated to extract and pass model_id from active simulation config |
| client/src/app/expected-result-comparison/models/SimulationVsExpectedRequest.ts | Restructured request body to match new config format with string types for numeric fields |
| client/src/app/common/topology/Node.ts | Added optional y2 property to Node interface |
| client/src/app/common/simulation/default-simulation-configuration.ts | Replaced default config structure to use power_system_configs array with nested simulator_config |
| client/src/app/common/simulation/SimulationConfiguration.ts | Refactored interface to use PowerSystemConfig array and removed simulator settings from simulation_config |
| client/src/app/AppContainer.tsx | Explicitly instantiated Simulation object before pushing to queue |
| assets/config.json | Changed version from "v1.0" to "develop" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…to simulator_config object; simulation seems to work just fine
…lationConfigurationEditor.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the simulation configuration structure across the application, transitioning from a single
power_system_configobject to a list ofpower_system_configs, and refactoring related interfaces, default values, and usages throughout the codebase. Additionally, it updates several components and models to align with the new structure, adds new configuration fields, and improves how simulation and model IDs are handled in requests.Simulation Configuration Refactor:
SimulationConfigurationinterface to replace the singlepower_system_configobject with an array ofpower_system_configs, each containing a nestedsimulator_configand expandedmodel_creation_configfields. This change is reflected inSimulationConfiguration.ts, the default configuration, and all usages throughout the app. [1] [2]power_system_configs[0]instead ofpower_system_config, including form population, validation, and submission in theSimulationConfigurationEditorand related components. [1] [2] [3] [4] [5] [6] [7] [8] [9]SimulationVsExpectedRequestto use the new configuration structure and ensure all relevant fields are strings where appropriate.Component and Model Updates:
MeasurementChartContainerandFetchLimitsFileRequestto include and utilize amodel_idparameter derived from the active simulation's configuration, ensuring correct model identification in requests. [1] [2]SimulationConfigurationTabModelinterface to include the new fields added tomodel_creation_config, such asencoding,system_frequency,triplex, etc.Miscellaneous Changes:
assets/config.jsonfromv1.0todevelopto reflect the ongoing development state.y2property to theNodeinterface for future extensibility.Simulationinstance before pushing to the queue.These changes collectively improve the flexibility and scalability of the simulation configuration system, making it easier to support multiple power system configurations and simulators in the future.