Skip to main content

oxigrid/
lib.rs

1//! OxiGrid — Pure Rust Energy Systems Simulation & Optimization Library.
2//!
3//! # Feature Flags
4//!
5//! | Feature | Description | Enables |
6//! |---------|-------------|---------|
7//! | `std` (default) | Standard library support | — |
8//! | `powerflow` (default) | AC/DC power flow solvers | `network`, `powerflow` modules |
9//! | `stability` | Transient and small-signal stability | requires `powerflow` |
10//! | `battery` (default) | Battery ECM, SoC, thermal, aging | `battery` module |
11//! | `battery-p2d` | Pseudo-2D / DFN electrochemical model | requires `battery` |
12//! | `renewable` | Solar PV, wind, forecasting | `renewable` module |
13//! | `optimize` | OPF, economic dispatch, microgrid EMS | requires `powerflow` |
14//! | `harmonics` | Harmonic analysis, IEEE 519, passive filters | `harmonics` module |
15//! | `protection` | Fault analysis, relay coordination | requires `powerflow` |
16//! | `io-matpower` | MATPOWER `.m` file parser | included in `powerflow` |
17//! | `parallel` | rayon-based parallelisation (future) | requires `std` |
18
19pub mod error;
20pub mod io;
21pub mod units;
22
23#[cfg(feature = "powerflow")]
24pub mod network;
25
26#[cfg(feature = "powerflow")]
27pub mod powerflow;
28
29#[cfg(feature = "stability")]
30pub mod stability;
31
32#[cfg(any(feature = "battery", feature = "battery-p2d"))]
33pub mod battery;
34
35#[cfg(feature = "renewable")]
36pub mod renewable;
37
38#[cfg(feature = "optimize")]
39pub mod optimize;
40
41#[cfg(feature = "optimize")]
42pub mod planning;
43
44#[cfg(feature = "harmonics")]
45pub mod harmonics;
46
47#[cfg(feature = "protection")]
48pub mod protection;
49
50#[cfg(feature = "powerelectronics")]
51pub mod powerelectronics;
52
53#[cfg(feature = "powerflow")]
54pub mod digitaltwin;
55
56pub mod analytics;
57pub mod monitoring;
58pub mod powerquality;
59pub mod security;
60pub mod simulation;
61
62#[cfg(feature = "powerflow")]
63pub mod testcases;
64
65#[cfg(feature = "powerflow")]
66pub mod prelude;