Skip to content

Commit

Permalink
Merge pull request #46 from urbanopt/rnm-results
Browse files Browse the repository at this point in the history
Rnm results
  • Loading branch information
kflemin authored Dec 15, 2022
2 parents 1fb3116 + 1213f20 commit c1dde91
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# URBANopt DiTTo Reader CHANGELOG

# Version 0.5.1
Date Range 11/28/2022 - 12/15/2022
- Update dependency management for DiTTo
- Generate Model.json results file for RNM to OpenDSS workflow

# Version 0.5.0
Date Range 04/13/2022 - 11/28/2022
- Fix typo in extended catalog
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

from setuptools import setup, find_packages

requirements = ["ditto.py~=0.2.3", "opendssdirect.py~=0.6.1"]
requirements = ["ditto.py[opendss]~=0.2.3", "opendssdirect.py~=0.6.1"]

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name="urbanopt-ditto-reader",
version="0.5.0",
version="0.5.1",
author="Tarek Elgindy",
author_email="[email protected]",
description="Enhancement of URBANopt GeoJSON that can be consumed by DiTTo reader",
Expand Down
6 changes: 6 additions & 0 deletions urbanopt_ditto_reader/urbanopt_ditto_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,18 @@ def run_rnm_opendss(self):
model = Store()
master_file = os.path.join(self.rnm_results, 'dss_files', 'Master.dss')
buscoordinates_file = os.path.join(self.rnm_results, 'dss_files', 'BusCoord.dss')
print(f"!!! masterFILE: {master_file}, buscoords: {buscoordinates_file}")
reader = OpenDSSReader(
master_file=master_file,
buscoordinates_file=buscoordinates_file
)
reader.parse(model)

dss_json_path = os.path.join(self.dss_analysis, 'json_files')
os.makedirs(dss_json_path, exist_ok=True)
json_writer = JSONWriter(output_path=dss_json_path)
json_writer.write(model)

# run the model through OpenDSS
self.run(master_file)

Expand Down

0 comments on commit c1dde91

Please sign in to comment.