Portfolio

A Portfolio or BrokerPortfolio is the Server's representation of the portfolio of a Broker. It aggregates the Customers along with their Contracts and Tariffs for the purpose of generating actual consumption and production during an Execution phase. An instance is created for each Broker by the Controller at the end of a Contracting phase, by aggregating the tariff and contract customers for that Broker.

During Execution, the Broker can access the current net load (presumably it already has forecasts, which it gets from the Market Intelligence Service), and it may attempt to influence its load by making price changes in accordance with the rules specified in its contract and tariff agreements.

The Distribution Utility may access the current net load and the available balancing capacity for each broker, and it may adjust balance using the available balancing capacity. The rules controlling this action are described under the Distribution Utility section.

Computing net load
Net load is the sum of all loads from contracted customers, less the sum of all production from contracted customers, within a given timeslot. Demand and supply is summed across contract/customer pairs, and tariff/customer-population pairs.


 * For a Tariff - Customer Population pair, we have to take the demand and supply generated by it's internal process (presumably that's affected by the broker's current price), from the portion of the Customer Population that has subscribed to that tariff.

In both cases, the result includes all "balancing" demand and supply. It will be up to the Distribution Utility to "throttle" the balancing capacity if necessary.
 * For a Contract - Customer pair, we similarly have to take the demand and suppy generated by the Customer model, possibly modified by current broker pricing.

Processing price changes
Tariffs and Contracts can specify a number of different pricing schemes. They generally fall into two categories in terms of their effects on demand and supply: During each timeslot, price changes must be propagated to the customer models before demand and supply data are retrieved.
 * Fixed or time-of-day prices are part of the tariff or contract, and so are not subject to dynamic control during an Execution phase. Time-of-day pricing will impact demand and supply by increasing, decreasing, or time-shifting the load. We assume the respective Customer models will take care of this.
 * Dynamic prices can be changed at any time, but contract/tariff terms may constrain the time interval between a price-change announcement and the application of the price change to the model. Of course, a scheduled price change is expected to influence model behavior.

Computing balancing capacity
Contract and tariff terms must be able to distinguish two types of balancing capacity: When the Distribution Utility queries for balancing capacity, it will always query for either production capacity or load capacity.
 * 1) Simple balancing capacity is always available. (Are there any examples of this?)
 * 2) Constrained balancing capacity is available only while constraints are met. Examples include:
 * 3) *A battery can be charged to its capacity or discharged to some minimum charge level, and no more.
 * 4) *A water heater can be shut off if the water is above some temperature threshold.
 * 5) *A CHP plant can be turned on if heat can be used (a greenhouse is below its maximum temperature), or turned off if the heat is not needed.


 * A query for production capacity must return the sum, without violating capacity constraints, of sources that can produce additional output, and loads that can be reduced.


 * A query for load capacity must return the sum, without violating capacity constraints, of sources that can reduce output, and loads than can be increased.

Processing balancing controls
We assume that some balancing resources are more expensive or more valuable to the broker, based on contract/tariff terms. The Portfolio's task, when asked to make a balancing adjustment, is to maximize the value (or minimize the cost) to the broker to make the required adjustment.