Wangkun Xu
  • Home
  • Research
  • Software
  • Teaching
  • Supervision
  • News
  • Blog
  • About

On this page

  • Scientific packages
  • Research code
  • Academic utilities
  • Project tools
  • Teaching tutorials

Software

Scientific packages, research code, project tools, and teaching tutorials.

This page collects all reusable scientific packages, research code, academic utilities, project tools, and open teaching tutorials.

Scientific packages

Installable and documented tools for power-system modelling, differentiable optimisation, and optimisation diagnostics.

NCET

NCET (Neural-network Constraint Embedding Toolkit) converts supported PyTorch neural networks into exact mixed-integer linear constraints compiled by CVXPY.

Neural stability surrogates · Stability-constrained optimization
GitHub Documentation Install Application

DiffAPQP

Differentiable PyTorch layers for affine-parametric quadratic and linear programs expressed directly in CVXPY.

Differentiable optimisation · Decision-focused learning
GitHub Documentation Install Application

GridForge

Build optimisation-ready power-system cases with profile dataset from PYPOWER or MATPOWER grids, YAML configurations, and bus-level time-series data.

Power-system testbeds · Data pipelines · CVXPY
GitHub Documentation Install

CVXPY Summary

Inspect and debug CVXPY models through compact summaries of variables, constraints, parameters, compliance, and solver statistics.

Optimisation diagnostics · Model inspection
GitHub Install
No matching items

Research code

Implementations connected to publications in learning-augmented optimisation, decision-focused learning, stability, cybersecurity, and multi-agent control.

DiffAPQP power-system experiments

Reproducible IEEE 118-bus experiments comparing DiffAPQP and CvxpyLayers for closed-loop and counterfactual decision-focused learning with economic dispatch and redispatch.

Decision-focused learning · Economic dispatch · IEEE 118-bus
GitHub Related paper

ICNN constraint learning

Input-convex neural-network surrogates for small-signal stability constraints in unit commitment on IEEE 14- and 118-bus systems.

Stability-constrained optimisation · IBR-dominated systems
GitHub Related paper

LAPSO experimental framework

Experiments for studying learning-augmented power-system operations through a unified optimisation view.

Learning-augmented optimisation · Paper-linked
GitHub Related paper

Task-aware machine unlearning

Implementation accompanying task-aware machine unlearning for load forecasting and downstream decision quality.

Machine unlearning · Load forecasting
GitHub Related paper

E2E-AT

Code for the task-aware end-to-end learning framework designed to tackle uncertainty in downstream decisions.

Decision-focused learning · Uncertainty
GitHub Related paper

Frequency stability sampling with forward-mode AD

Efficient sampling tools for learning frequency-stability constraints using forward-mode automatic differentiation.

Stability constraints · Automatic differentiation
GitHub Related paper

DDET-MTD

Implementation of event-triggered moving target defence that blends grid data and physical models.

Power-grid cybersecurity · Moving target defence
GitHub Related paper

Robust MTD

Code accompanying robust moving target defence against false-data injection attacks in power grids.

Robust control · Power-grid cybersecurity
GitHub Related paper

MAPDN

Multi-agent reinforcement-learning environment and methods for active voltage control on power distribution networks.

Multi-agent RL · Distribution networks
GitHub Related paper

Visual Power Grid

Interactive Python visualisation of optimal power flow, state estimation, false-data injection attacks, and moving-target defence.

Power-system cybersecurity · Interactive simulation
GitHub Related paper
No matching items

Academic utilities

Small packages that make computational research and project planning easier.

Finalert

Send progress, completion, and failure notifications for long-running Python jobs through messaging, email, or webhooks.

Experiment monitoring · Python workflows
GitHub Install
No matching items

Project tools

Standalone interactive tools and explorers developed alongside research and teaching projects.

Edge AI Inference Explorer

Browser-based explorer for reasoning about uncertainty in end-user edge-AI inference. This is part of the DESNZ project EdgeAI at Inference

Edge AI · Uncertainty · Interactive learning
GitHub Live demo
No matching items

Teaching tutorials

Open coding tutorials and exercises designed for hands-on learning.

Small-signal stability-constrained unit commitment tutorial

Hands-on workflow for learning a small-signal stability surrogate and embedding it as mixed-integer constraints in a one-period unit commitment problem.

3rd IBR summer school · Neural stability surrogates
GitHub Related course

Introduction to ML coding tutorial

Hands-on examples covering SVMs, PCA, k-means, and zero-shot energy-price forecasting with Amazon Chronos.

Python tutorial · MSc teaching
GitHub Related course
No matching items
Back to top

© 2026 Wangkun Xu ·

 

Built with Quarto