Add ability to instantiate a Scenario object via paths to relevant files
@jenhagg ya está trabajando en esto.
Desde el 2/4/2021.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Motivation/Description
As discussed over Slack, a Scenario in Analyze state is mostly read-only (with the exception of being able to delete the Scenario), providing access to:
- scenario metadata that's retrieved from the ScenarioList
- a Grid object that's parsed from a .mat file
- input profiles
- output time series
- a change table
Instantiating a Scenario in Analyze state currently relies on using the ScenarioList on the 'compute server' to grab the metadata, locate the grid.mat file, locate the output files, and calculate the input profiles from the base profiles and the change table. However, if we can instantiate a Scenario object in an alternate way that still provides the user with access to all of the relevant data, then we can pass this Scenario object to the many analysis and plotting functions in PostREISE without depending on an external machine that has a ScenarioList and organizes the input/output files in a particular way. This could allow alternate organization of the input/output files to suit a user's needs, e.g. all files for one scenario in the same folder rather than named in a particular way in a raw folder, a data/input folder, a data/output folder.
One design idea
We could create a new AnalyzeFromFilepaths class, as a child class of the existing Analyze class (so that all of our existing checks on isinstance(foo, Analyze) still pass. This new class would overwrite all existing get_x() methods.
Similarly, we could create a new ScenarioFromFilepaths class as a child class of the existing Scenario class. We could instantiate this new ScenarioFromFilepaths class in the following pattern:
class Scenario:
...
@staticmethod
def from_filepaths(
*,
grid_model,
interconnect,
grid_filepath,
pg_filepath,
pf_filepath,
lmp_filepath,
congu_filepath,
congl_filepath,
averaged_cong_filepath,
dcline_pf_filepath=None,
storage_pg_filepath=None,
storage_e_filepath=None,
load_shed_filepath=None,
demand_filepath=None,
hydro_filepath=None,
solar_filepath=None,
wind_filepath=None,
base_demand_filepath=None,
base_hydro_filepath=None,
base_solar_filepath=None,
base_wind_filepath=None,
ct=None,
)
Then, a Scenario which behaves virtually-identically identically to the current Scenario in Analyze state (with the exception of being able to access certain ScenarioList entries) could be instantiated with:
- All required inputs, plus
- either:
- paths to scaled/appended input profiles, or
- paths to base input profiles, plus a change table
with the call signature scenario = Scenario.from_filepaths(**kwargs).
This could also provide the base for functions which could be given one or more folders (e.g. outputs_folder, inputs_folder or base_profiles_folder + ct) and would determine the filepaths automatically and return a ScenarioFromFilepaths.
- Lenguaje dominante
- Python
- Estrellas
- 63
- Forks
- 48
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Breakthrough-Energy/PowerSimData
-
Update demand flexibility documentationQuizá libre de nuevo @jenhagg la tomó hace 1419 días y no hay ningún pull request abierto. Abiertodocumentation
Breakthrough-Energy/PowerSimData#706 · 4 asignados ·
-
Allow demand flexibility to be enabled without flexibility profilesQuizá libre de nuevo @jenhagg la tomó hace 1419 días y no hay ningún pull request abierto. Abierto
Breakthrough-Energy/PowerSimData#705 · 1 comentario · 4 asignados ·
-
Create a dedicated object that compares two gridsQuizá libre de nuevo @jenhagg la tomó hace 1482 días y no hay ningún pull request abierto. Abiertofeature request
Breakthrough-Energy/PowerSimData#688 · 4 asignados ·
-
Fetch usa_tamu data from zenodoQuizá libre de nuevo @jenhagg la tomó hace 1483 días y no hay ningún pull request abierto. Abiertofeature request
Breakthrough-Energy/PowerSimData#687 · 4 asignados ·
-
Make ramp rate input flexible to other gridsQuizá libre de nuevo @jenhagg la tomó hace 1494 días y no hay ningún pull request abierto. Abiertobug
Breakthrough-Energy/PowerSimData#680 · 9 comentarios · 5 asignados ·
Todos los issues de Breakthrough-Energy/PowerSimData
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
webrecorder/warcio#209 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Jeffy123-zhu/logspecter#20 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día