Example #1
0
    def __init__(self,
                 cfg,
                 strategy,
                 accuracy=(100, 100),
                 risk=(0, 0),
                 imbalance_costs=1000):
        self.logger = logging.getLogger(__name__)

        self.cfg = cfg
        self.account = Account()
        self.strategy = strategy
        self.accuracy = accuracy

        self.balancing_plan = ConsumptionPlan("Balancing")
        self.intraday_plan = ConsumptionPlan("Intraday")

        # NOTE: When regular strategy no need for capacity and price data
        if strategy.__name__ != "regular":
            self.fleet_capacity = load.simulation_baseline()
            self.balancing_market = Market(load.balancing_prices())
            self.intraday_market = Market(load.intraday_prices())

        # Risk parameter set from outside, i.e. RL Agent
        self._risk = risk
        # Imbalance Costs for learning
        self.imbalance_costs = imbalance_costs

        # Reference simulation objects
        self.env = None
        self.vpp = None
Example #2
0
def intraday_prices():
    click.echo("Rebuilding intraday price data...")
    load.intraday_prices(rebuild=True)
Example #3
0
# __EPEX Intraday continous market__
#
# - Continuous trading 7 days a week, 24 hours a day, all year around
# - Hourly contracts for the next day open at 15:00 pm (d-1) for DE, FR, CH & AT
# - Hourly contracts for the next day open at 2.00 pm (d-1) for NL & BE
# - 30-min contracts for the next day open at 15:30 (d-1) for CH, DE, FR
#
#
# - **15-min contracts for the next day open at 4.00 pm (d-1)**
# - **LEAD TIME: 5 Minutes, Clearing every 15 Min**
# - Till when do we trade when we assume average clearing prices?

# In[3]:

df = load.intraday_prices()
df["hour"] = df["product_time"].dt.hour

f, (ax1, ax2) = plt.subplots(1, 2)
f.set_size_inches(18.5, 10.5)

sns.lineplot(x="hour", y="clearing_price_mwh", data=df, ax=ax1)

df["clearing_price_mwh"] = df["clearing_price_mwh"].clip(-200, 200)
sns.violinplot(x="hour", y="clearing_price_mwh", data=df, ax=ax2)

# ## Market comparison

# In[4]:

sns.set(rc={'figure.figsize': (10, 6)})