ames-market / psst

PSST - Power System Simulation Toolbox
Other
39 stars 27 forks source link

Unable to build_model from example notebook cases #13

Open allisonmcampbell opened 3 years ago

allisonmcampbell commented 3 years ago

Hi @kdheepak ,

I am working through the example notebook cases. These are the steps I have taken:

  1. clone https://github.com/ames-market/psst.git to local
  2. open Jupyter notebook
  3. navigate to /notebooks/
  4. execute Validation01-SingleGenerator.ipynb

Upon executing, I see two issues. The first appears to be cosmetic, the second impedes completion of the program.

  1. create_network(case).draw()
/Users/[username]/opt/miniconda3/lib/python3.7/site-packages/pygraphviz/agraph.py:1341: RuntimeWarning: Error: remove_overlap: Graphviz not built with triangulation library

  warnings.warn(b"".join(errors).decode(self.encoding), RuntimeWarning)

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-008cbfbdc91b> in <module>
----> 1 create_network(case).draw()

~/github/Y0-SCUC/psst/psst/network/__init__.py in draw(self, *args, **kwargs)
    165         self.draw_generators(*args, **kwargs)
    166         self.draw_buses(*args, **kwargs)
--> 167         self.draw_branches(*args, **kwargs)
    168         self.draw_connections('gen_to_bus', *args, **kwargs)
    169         self.draw_connections('load_to_bus', *args, **kwargs)

~/github/Y0-SCUC/psst/psst/network/__init__.py in draw_branches(self, **kwargs)
    121 
    122     def draw_branches(self, **kwargs):
--> 123         edgelist = kwargs.pop('edgelist', [(f, t) for f, t, e in self._G.edges(data=True) if e['kind']=='branch'])
    124         return self._draw_edges(edgelist, **kwargs)
    125 

~/github/Y0-SCUC/psst/psst/network/__init__.py in <listcomp>(.0)
    121 
    122     def draw_branches(self, **kwargs):
--> 123         edgelist = kwargs.pop('edgelist', [(f, t) for f, t, e in self._G.edges(data=True) if e['kind']=='branch'])
    124         return self._draw_edges(edgelist, **kwargs)
    125 

KeyError: 'kind'
  1. model = build_model(case)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-13-4024499f690c> in <module>
----> 1 model = build_model(case)

~/github/Y0-SCUC/psst/psst/model/__init__.py in build_model(case, generator_df, load_df, branch_df, bus_df, ZonalDataComplete, PriceSenLoadData, previous_unit_commitment_df, base_MVA, base_KV, config)
     62         config = dict()
     63 
---> 64     zonalData = ZonalDataComplete['zonalData']
     65     zonalBusData = ZonalDataComplete['zonalBusData']
     66     ReserveUpZonalPercent = ZonalDataComplete['ReserveUpZonalPercent']

TypeError: 'NoneType' object is not subscriptable
HouMianbaoGitHub commented 3 years ago

I got the same errors.

jeffSylvestre-Decary commented 2 years ago

Hi, was anyone able to solve this issue?