Skip to content

Commit

Permalink
Merge remote-tracking branch 'vp/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nworbmot committed Jan 19, 2016
2 parents 60968b6 + dac9299 commit 345a74f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from .pf import calculate_dependent_values, find_slack_bus

from itertools import chain
from distutils.version import StrictVersion

import pandas as pd

Expand Down Expand Up @@ -412,6 +413,9 @@ def define_linear_objective(network,snapshots):


def extract_optimisation_results(network,snapshots):
if isinstance(snapshots, pd.DatetimeIndex) and StrictVersion(pd.version.version) < '0.18.0':
# Work around pandas bug #12050 (https://github.com/pydata/pandas/issues/12050)
snapshots = list(snapshots)

#get value of objective function
network.objective = network.results["Problem"][0]["Lower bound"]
Expand Down

0 comments on commit 345a74f

Please sign in to comment.