Skip to content

Commit

Permalink
find a smarter place for market result csv export
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfmueller committed Nov 3, 2023
1 parent f78a9ab commit 73772b1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions etrago/execute/market_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ def market_optimization(self):
extra_functionality=extra_functionality(),
formulation=self.args["model_formulation"],
)

# quick and dirty csv export of market model results
path = self.args["csv_export"]
if not os.path.exists(path):
os.makedirs(path, exist_ok=True)
self.market_model.export_to_csv_folder(path + "/market")
#self.market_model.model.write('/home/ulf/file2.lp')

def build_market_model(self):
Expand Down Expand Up @@ -137,13 +143,6 @@ def build_market_model(self):

self.market_model = net


# quick and dirty csv export of market model results
path = self.args["csv_export"]
if not os.path.exists(path):
os.makedirs(path, exist_ok=True)
self.market_model.export_to_csv_folder(path + "/market")

# Todo: buses_by_country() geolocation_buses() apply on market_model does not work because no self.network?!


Expand Down

0 comments on commit 73772b1

Please sign in to comment.