> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axle.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Optimisation and dispatch

We'll control assets on your behalf to provide flexibility to the grid. We will always do so in a way that
protects users and earns them cash.

# Principles of dispatch

We'll operate assets within the constraints you provide us.

Typically we'll be optimizing to maximise flexibility revenue within a hierarchy of constraints:

<Steps>
  <Step title="User's intent">If we know that the user needs a certain amount of charging, or their house to be at a certain temperature, we'll ensure that need is met.</Step>

  <Step title="The user's tariff"> We always make the end user money. We'll typically avoid displacing usage into peak periods. The only exception is where we're confident we can
  earn the user far more than we're costing them: for instance, we may charge a battery before a period of extremely high prices, to ensure we can export energy back to the grid to benefit from those prices</Step>

  <Step title="Constraints you provide">The duration and extent of dispatch you're happy with. For instance, you may only want to allow us to pause charging for an hour at a time, on weekdays.</Step>
</Steps>

# Types of dispatch

## Event-based

<img src="https://mintcdn.com/fascinating-teal-alpaca/xc9fR-zImR_B1TQ1/images/charging-pause.svg?fit=max&auto=format&n=xc9fR-zImR_B1TQ1&q=85&s=294c4642b421b184fcab198f53e70b4d" alt="Event-based dispatch" width="670" height="450" data-path="images/charging-pause.svg" />

Event-based dispatch is where we receive a signal from the market operator to provide flexibility. Typically, these dispatches
will be short-lived, and for a specific amount of time. You can see an example dispatch event [here](../api-reference/examples/get-example-dispatch-event).

Common examples include:

* pausing EV charging because the local grid is strained
* exporting from a battery due to system tightness
* reducing HVAC demand during a peak period

In this case, Axle's dispatch of the asset is infrequent: it's a temporary interruption to the normal operation of the asset.

## Delegated Control

<img src="https://mintcdn.com/fascinating-teal-alpaca/xc9fR-zImR_B1TQ1/images/delegated-control.svg?fit=max&auto=format&n=xc9fR-zImR_B1TQ1&q=85&s=753bb939430155f6b42bc900ae215a41" alt="Delegated control" width="629" height="423" data-path="images/delegated-control.svg" />

Delegated control is where Axle takes responsibility for the operation of the asset over a longer period of time. This is helpful
when we have an opportunity to continuously optimize the asset, for instance in the wholesale market.

For instance, this could be:

* smart-charging of EV's, scheduling charging to take advantage of low prices
* optimising a battery to maximise self-consumption of solar and off-peak charging
* optimising heat pump operations to deliver a warm home at the lowest cost

## Price curve

<img src="https://mintcdn.com/fascinating-teal-alpaca/gOH4qSU3kDIOD2w9/images/price-curve.svg?fit=max&auto=format&n=gOH4qSU3kDIOD2w9&q=85&s=11ee5b1180bcc57f504de8b71ccd0155" alt="Price curve" width="629" height="423" data-path="images/price-curve.svg" />

In cases where you're already running an optimization, we use a price
curve dispatch. This means that for each asset, we provide a localised price curve that combines the different incentives
that we're exposed to via the market.

This can simply be added to the cost function in your existing optimization. This ensures that any constraints that are
defined in your optimization (e.g. a minimum temperature in the hot water tank) are honoured, and alleviates the need for
you to surface all of the relevant variables to us (some of which may be local or sensitive).

<Note>
  Unlike with event-based or delegated control, with price curve control we don't get any direct feedback on whether you're planning to dispatch the
  asset as we instruct. This means that we have to bid more conservatively, because our ability to compensate for non-delivery
  is lower.
</Note>

Our preference is to integrate price curve dispatch via webhook, so you'll receive updates if the price curve changes, due to
new opportunities in e.g. the intraday or frequency markets.

# Mechanics of dispatch

You can register to receive dispatch messages via our API, or we can integrate into an existing control API for your assets.

<Tabs>
  <Tab title="Via our API">
    1. Register a webhook with us that we can use to dispatch the asset
    2. We'll send you [dispatch messages](../api-reference/examples/get-example-dispatch-event) via that webhook
    3. Send us [event updates](../api-reference/entities/asset/event/post) to accept or reject the dispatch
  </Tab>

  <Tab title="Via your API">
    We'll build a custom integration to dispatch via your API. This can be schedule-based or instantaneous - [get in touch](mailto:support@axle.energy) to discuss.
  </Tab>
</Tabs>
