intermediate backup

This commit is contained in:
2025-05-03 20:46:14 +02:00
parent 2b0a5728d4
commit 6542caf48f
38 changed files with 4513 additions and 1067 deletions

View File

@ -0,0 +1,41 @@
## Optimizer Definition for a constraint n-forecast Trading-Problem
We want to optimize the performance of an energy trader given the forecast for n steps.
The battery:
- holds 1MWh
- charges/discharges at max. 1MW per hour (we can add/loose x*1MW, x \in R )
Prices are stable for the given hour (t) and we sell and buy for the same price.
### Considerations:
- Single variable, P (=x), for each hour t from 0 to n-1.
- If P > 0, it represents discharging (selling power) with a magnitude of P.
- If P < 0, it represents charging (buying power) with a magnitude of -P.
- If P = 0, it represents holding (doing nothing).
- if we have forecasts for t_n, t_n+m we might have to **interpolate** between n .. m
- or... we work with the gaps and dt as charge time .... no
#### Variables:
- price_t = price per MWH at t (eq)
- B (t=0..n) = State of Battery in MWH
- P (t=0..n) = Charge/Discharge factor given the possible base rate of 1MW/h
- max_p = 1 (charge/discharge limits) & and battery capacity limits (both=1)
- SoB_initial = 0
- h = horizon \in N^+
### Objective
- We **Maximize**: Sum_{t=0}^{n-1} (price_t * P)
### Constraints
- Fixed starting state: SoB_0 = SoB_initial
- Charge/Discharge Limit: (-max_p <= P <= max_p) for all t = 0, ..., n-1
- Storage Limit: (0 <= B+(1*P) <= max_p) for all t = 0, ..., n-1
- Future B State: SoB_{t+1} = (B + P) for t = 0 to n-1