Energy Trader Mechanics
Vocabulary
Power grid: power plants, power connections, cities
Market: bid/ask-based market for trading resources and power
Order: bid/ask order to buy/sell resources or power
Merit order: a special kind of order created every tick for every power plant to resolve grid balancing and spot price
Spot price: the highest price offered by merit orders, which were used to satisfy demand
Power Grid
Every city has its own power demand based on its population and percentage of people connected to power. Power demand is calculated for every tick.
Merit orders are created for every production power plant in the city as candidates to satisfy power demand. These are currently created automatically based on the last tick spot price, but we plan to allow players to adjust them.
Example:
City power demand is 10 MWh.
Merit order created to sell solar plant production is 4MWh@$150
Result: Solar power plant will produce 4MWh if weather is sunny and sell energy on market at $150 per MWh which is also spot price for this city for current tick. City is missing 6MWh so it will reduce its population and demand in future ticks.
Example 2:
City power demand is 10 MWh.
Merit order created to sell solar plant production is 4MWh@$150
Merit order created to sell coal plant production is 8MWh@$230
Merit order created to sell gas plant production is 8MWh@$240
Result: Solar power plant will produce 4MWh, coal power plant will produce 6 MWh. Tick algorithm will favor offer from Solar power plant because its cheaper. Spot price will by $230 because merit order from coal power plant was at least partially used so maximum price from used orders is $230.
Solar plant owner will receive 4 * 230 = $920
Coal plant owner will receive 6 * 230 = $1380 (and even thou it did not run at full capacity there is no damage incurred, the coal plan has dynamic output)
Gas plant will not run, not deliver power. The merit order was priced too high.
City will grow in future ticks because demand was satisfied.
DEV note: Merit orders are created automatically for each power plant. We are planning to implement market feature which will enable players to override preset merit orders.
Market
Market orders are different from merit orders. You can offer “unlimited“(limited by market credit) quantity of power on market without having any power plants. You will immediately receive money from market if someone trades against your offer. In next tick you should deliver this amount of power or it will be automatically bought from market at spot price.
Example:
Player1 creates limit order to sell 100MWh@$200 without having any power plant. Player 1 speculates, that the next spot price will be less than $200, which woudl mean profit
Player2 trades against this order, purchases 100MWh@$200. Player2 is of a different opinion, that the spot price will be more than $200 and having power purchased for less will mean profit.
Resulting situation: Player1 has negative inventory of -100MWh, Player2 has positive inventory of 100MWh (note: these MWh were not produced, and are not stored anywhere, they just traded)
During next tick: Spot price is calculated based on merit orders and demand (see previous chapter). For example, consider spot price of $300. Note: The previous market trade had no impact on the spot price, or amount of power produced.
Player1 has negative inventory so has to purchase 100MWh to be at zero. This is done automatically at spot price.
Player2 has positive inventory, so has to sell 100MWh to be at zero. This is done automatically as spot price.
Result:
Player1 received $200,000 from Player2 when they traded, but paid $300,000 to buy power he owned from market. The loss is: $100,000
Player2 paid $200,000 to Player1, but his 100MWh were sold back to the market at spot price of $300. So player 2 made overall profit of: $100,000
Example 2 (with production):
Player1 has negative inventory of -10 MWh, as he already sold 10MWh for $100. This trade got him $1,000.
Player1 also operates a coal plant with output capacity of 6MWh.
During the next tick, the spot price is calculated to be $80, and the coal plant end up being used fully.
Player1 has negative inventory of -4MWh (-10MWh to start with +6MWh from the plant production). So, he has to purchase 4MWh to be at zero. This is done automatically at spot price. So the player pays: 4*80 = $320.
Summary, player1 made profit $1,000 - $320 = $680
Note: If the player1 did an alternative approach and did not sell power upfront for $100. His profit would have been: 6*80 = $480. (Positive inventory of +6MWh from produciton, sold to the market at spot price to be at zero)