1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # qsim
//!
//! A Rust library for power grid modeling and simulation.
//!
//! ## Features
//!
//! - **Power Flow Analysis** — DC and AC power flow solvers
//! - **Modular Architecture** — Pluggable solvers and elements
//! - **High Performance** — Pure Rust, parallel computation with Rayon
//! - **Graph-Based Topology** — Flexible network representation
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use qsim::prelude::*;
//!
//! // Create a simple 3-bus network
//! let mut network = NetworkData::new("Example");
//!
//! // Add buses
//! network.buses.push(Bus::slack(1.0));
//! network.buses.push(Bus::pv(1.0, 50.0));
//! network.buses.push(Bus::pq(-100.0, -30.0));
//!
//! // Add branches
//! network.branches.push(Branch::line(0, 1, 0.01, 0.1));
//! network.branches.push(Branch::line(1, 2, 0.02, 0.15));
//!
//! // Save to JSON
//! network.to_file("network.json")?;
//! ```
//!
//! ## Crate Structure
//!
//! - `qsim-core` — Core engine, traits, state management
//! - `qsim-elements` — Grid elements (Bus, Branch, Generator, Load)
//! - `qsim-solvers` — Power flow solvers (DC, AC)
//! - `qsim-io` — JSON I/O, serialization, persistence
// Re-export all public APIs
pub use qsim_core as core;
pub use qsim_elements as elements;
pub use qsim_solvers as solvers;
pub use qsim_io as io;
/// Prelude for convenient imports