An applied mathematics project for modeling and optimizing the scheduling of energy storage, electricity consumption, renewable generation, and flexible compute workloads under operational constraints and uncertainty.
This project develops an optimization platform that will:
- Schedule grid electricity, renewable generation, battery charging, and battery discharging.
- Schedule flexible compute workloads subject to timing, energy, and operational constraints.
- Formulate the scheduling problem using linear programming (LP) and mixed-integer linear programming (MILP).
- Compare deterministic, stochastic, and robust optimization strategies.
- Evaluate strategies using simulated demand, electricity prices, renewable generation, and uncertainty.
- Visualize system behavior, optimization decisions, costs, and tradeoffs.
The project is intended as an applied study of:
- Linear programming
- Mixed-integer linear programming
- Constrained optimization
- Probability and uncertainty
- Numerical optimization
- Operations research
- Dynamic resource allocation
- Quantitative decision-making
A central structure throughout the project is:
[ \min_x C(x) ]
subject to system dynamics and operational constraints.
For the energy-storage system, the battery state evolves over time according to a discrete-time relationship of the general form
\frac{P_t^{discharge}\Delta t}{\eta_d}. ]
This provides a useful introduction to optimization over dynamic systems.
| # | Investigation | Purpose |
|---|---|---|
| 01 | Problem Formulation | Develop optimization fundamentals and formulate small constrained problems |
| 02 | Deterministic Optimization | Build the baseline energy and battery scheduling model |
| 03 | Stochastic Optimization | Incorporate uncertain demand, prices, and renewable generation |
| 04 | Robust Optimization | Optimize against bounded uncertainty and adverse scenarios |
| 05 | Strategy Comparison | Compare cost, risk, reliability, and robustness across approaches |
Additional investigations may be added as the project develops.
Energy-and-Compute-Optimization-Engine/
│
├── README.md
├── LICENSE
├── requirements.txt
├── .gitignore
│
├── docs/
│ ├── mathematical_model.md
│ ├── assumptions.md
│ └── results.md
│
├── notebooks/
│ └── README.md
│
├── src/
│ ├── __init__.py
│ ├── data.py
│ ├── model.py
│ ├── scenarios.py
│ ├── solve.py
│ └── visualization.py
│
├── data/
│ └── README.md
│
├── results/
│ ├── deterministic/
│ ├── stochastic/
│ └── robust/
│
└── tests/
├── __init__.py
├── test_constraints.py
└── test_energy_balance.py
The initial implementation uses:
- Python
- Pyomo
- HiGHS
- NumPy
- pandas
- Matplotlib
- SciPy
- JupyterLab
- pytest
Create and activate a Python virtual environment, then install the dependencies:
python -m venv .venvWindows:
.venv\Scripts\activatemacOS/Linux:
source .venv/bin/activateInstall:
python -m pip install --upgrade pip
pip install -r requirements.txtLaunch JupyterLab:
jupyter labThe mathematical formulation comes before implementation.
Each major investigation proceeds through:
- Define the physical or operational problem.
- Identify parameters and assumptions.
- Define decision variables.
- Construct the objective function.
- Derive constraints.
- Predict expected optimizer behavior.
- Implement the model.
- Verify the solution.
- Visualize and interpret results.
- Document conclusions and limitations.
The objective is not merely to call an optimization solver, but to understand and justify the mathematical model being solved.