Skip to content

Add method to retrieve scenario table#373

Merged
rouille merged 1 commit intodevelopfrom
ben/sl
Jan 20, 2021
Merged

Add method to retrieve scenario table#373
rouille merged 1 commit intodevelopfrom
ben/sl

Conversation

@rouille
Copy link
Copy Markdown
Collaborator

@rouille rouille commented Jan 20, 2021

Purpose

Write method to retrieve the scenario table within the scenario framework

What the code is doing

Return the scenario table as a data frame

Testing

(PostREISE) [~/CEM/PostREISE] (develop) brdo$ python
Python 3.8.3 (default, Jul  8 2020, 14:27:55) 
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from powersimdata.scenario.scenario import Scenario
>>> s = Scenario(1270)
Transferring ScenarioList.csv from server
100%|########################################################################################################################| 238k/238k [00:00<00:00, 1.54Mb/s]
Transferring ExecuteList.csv from server
100%|#######################################################################################################################| 21.5k/21.5k [00:00<00:00, 469kb/s]
SCENARIO: Julia | USA2030HVDC_Design3_OB1_Mesh500x38

--> State
analyze
--> Loading grid
Loading bus
Loading plant
Loading heat_rate_curve
Loading gencost_before
Loading gencost_after
Loading branch
Loading dcline
Loading sub
Loading bus2sub
--> Loading ct
>>> s.get_scenario_table()
Transferring ScenarioList.csv from server
100%|########################################################################################################################| 238k/238k [00:00<00:00, 1.69Mb/s]
       plan                                                       name    state interconnect  ... interval    engine runtime infeasibilities
id                                                                                            ...                                           
132    test                             WACA2030AllMatchCA_StorageTest  analyze      Western  ...     144H     REISE    0:31                
134    base  WACA_Anchor_IndependentGoals_2030_SpurUpgrade_Mesh100t100  analyze      Western  ...     144H     REISE    3:55       34:5_58:5
135    base   WACA_Anchor_IntegratedGoals_2030_SpurUpgrade_Mesh100t100  analyze      Western  ...     144H     REISE    3:41            58:5
137    base     WACA_Anchor_AllMatchCA_2030_SpurUpgrade_OB_1_Mesh100x3  analyze      Western  ...     144H     REISE    3:45                
138    base     WACA_Anchor_AllMatchCA_2030_SpurUpgrade_OB_2_Mesh100x3  analyze      Western  ...     144H     REISE    3:47                
...     ...                                                        ...      ...          ...  ...      ...       ...     ...             ...
1821  Julia       USA2030_Ambitious_Design1_CoalRelax_OB0.5_Mesh500x38  analyze          USA  ...      24H  REISE.jl   24:51                
1822  Julia       USA2030_Ambitious_Design1_CoalRelax_OB0.5_Mesh500x39  analyze          USA  ...      24H  REISE.jl   24:17                
1823  Julia       USA2030_Ambitious_Design1_CoalRelax_OB0.5_Mesh500x40  analyze          USA  ...      24H  REISE.jl   25:55                
1824  Julia       USA2030_Ambitious_Design1_CoalRelax_OB0.5_Mesh500x41  execute          USA  ...      24H  REISE.jl                        
1825    CEM                         Western_2030_AllMatchCA_OB3_Mesh50  execute      Western  ...      24H  REISE.jl                        

[1482 rows x 15 columns]

Where to look

It is a one line method named get_scenario_table in the Scenario class

Time estimate

5 min

@rouille rouille added the new feature Feature that is currently in progress. label Jan 20, 2021
@rouille rouille added this to the Serenity Now milestone Jan 20, 2021
Copy link
Copy Markdown
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. Thanks.

@rouille rouille changed the title feat: add method to retrieve scenario table Add method to retrieve scenario table Jan 20, 2021
@rouille rouille merged commit 895fe1e into develop Jan 20, 2021
@rouille rouille deleted the ben/sl branch January 20, 2021 22:08
@ahurli ahurli mentioned this pull request Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Feature that is currently in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants