Skip to content

Commit 4353f11

Browse files
committed
Document all simulation interfaces: Command Line, GUI, and Python
- Restructured Quick Start with separate RAMSES and PFC sections - Added RAMSES CLI: -t (command file), -v (version), interactive prompts - Added PFC CLI: -t, -o, -c, -v flags and full menu commands (P/D/M/RI/CA/CL/O/DF/VT/S/E) - Added Simulation Interfaces table to Overview page - Clarified: RAMSES = CLI + GUI + Python; PFC = CLI + GUI
1 parent f6946dc commit 4353f11

File tree

2 files changed

+192
-53
lines changed

2 files changed

+192
-53
lines changed

src/content/docs/getting-started/overview.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,24 @@ Four types of user-defined models are supported:
8484

8585
The user model is **compiled, not interpreted** — resulting in efficient number-crunching code. While the solver code is proprietary, the models are designed to be freely shared, making STEPSS an **open-source simulation software** for the modeling part.
8686

87+
## Simulation Interfaces
88+
89+
STEPSS modules can be run through three interfaces:
90+
91+
| Interface | RAMSES (Dynamic) | PFC (Static) | CODEGEN |
92+
|-----------|:----------------:|:------------:|:-------:|
93+
| **Command Line** | `ramses.exe -t cmd.txt` | `pfc.exe -t cmd.txt` | Via STEPSS GUI |
94+
| **GUI (Java)** | Full support | Full support | Full support |
95+
| **Python (PyRAMSES)** | Full support |||
96+
97+
See the [Quick Start](/stepss-docs/getting-started/quickstart/) for details on each interface.
98+
8799
## Platform Support
88100

89101
| Feature | Details |
90102
|---------|---------|
91103
| **STEPSS GUI** | Windows 64-bit, Java 20 |
92104
| **PyRAMSES** | Windows and Linux, Python 3.x |
105+
| **Command-line executables** | Windows 64-bit (ramses.exe, pfc.exe) |
93106
| **CODEGEN compilation** | Visual Studio 2022 + Intel oneAPI Fortran |
94107
| **Free version limits** | 1000 buses max, 2 OpenMP cores |

src/content/docs/getting-started/quickstart.mdx

Lines changed: 179 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,86 @@ description: Run your first STEPSS simulation
55

66
import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
77

8-
This guide walks through running a basic power system simulation using either the STEPSS GUI or PyRAMSES.
8+
STEPSS provides three ways to run simulations:
9+
10+
| Interface | Dynamic Simulator (RAMSES) | Static Simulator (PFC) |
11+
|-----------|:-------------------------:|:----------------------:|
12+
| **Command Line** | `ramses.exe -t cmd.txt` | `pfc.exe -t cmd.txt` |
13+
| **GUI (Java)** | Via STEPSS GUI | Via STEPSS GUI |
14+
| **Python** | Via PyRAMSES ||
15+
16+
---
17+
18+
## Dynamic Simulation (RAMSES)
919

1020
<Tabs>
11-
<TabItem label="GUI">
21+
<TabItem label="Command Line">
22+
23+
### RAMSES Command-Line Interface
24+
25+
The RAMSES executable accepts the following arguments:
26+
27+
```bash
28+
ramses.exe [-t command_file] [-v]
29+
```
30+
31+
| Flag | Description |
32+
|------|-------------|
33+
| `-t command_file` | Read inputs from a command file (non-interactive mode) |
34+
| `-v` | Print version information and exit |
35+
36+
**Interactive mode** (no `-t` flag): RAMSES prompts for each input sequentially:
37+
38+
```
39+
Dump settings, comments and initialization data in file [press enter to skip] :
40+
Disturbance file name [compulsory] :
41+
Dump system trajectory in file [press enter to skip] :
42+
Observable file name [compulsory] :
43+
Dump continuous simulation trace in file [press enter to skip] :
44+
Dump discrete simulation trace in file [press enter to skip] :
45+
```
46+
47+
**Non-interactive mode** (`-t` flag): The command file provides the same inputs as lines, in order:
48+
49+
<Steps>
50+
51+
1. **Prepare data files**: Network data, dynamic data, solver settings, LFRESV (power flow solution)
52+
53+
2. **Create a command file** (`cmd.txt`):
54+
```
55+
data.dat volt_rat.dat settings.dat
56+
57+
disturbance.dst
58+
result.rtrj
59+
obs.obs
60+
cont.trace
61+
disc.trace
62+
```
63+
64+
The command file contains, in order:
65+
- **Data files** (one or more, space- or newline-separated) — read until a blank line
66+
- **Initialization dump file** (blank line to skip)
67+
- **Disturbance file** (required)
68+
- **Trajectory file** (blank line to skip)
69+
- **Observables file** (required if trajectory file is given)
70+
- **Continuous trace file** (blank line to skip)
71+
- **Discrete trace file** (blank line to skip)
72+
73+
3. **Run the simulation**:
74+
```bash
75+
ramses.exe -tcmd.txt
76+
```
77+
78+
4. **Process results**: Use PyRAMSES extractor, MATLAB, or other tools to read the trajectory file
79+
80+
</Steps>
81+
82+
:::note
83+
Lines starting with `#` in the command file are treated as comments and skipped.
84+
:::
85+
86+
</TabItem>
87+
<TabItem label="GUI (Java)">
1288

1389
<Steps>
1490

@@ -21,6 +97,8 @@ This guide walks through running a basic power system simulation using either th
2197

2298
</Steps>
2399

100+
The GUI coordinates PFC and RAMSES through lock files (`.lock_RAMSES`, `.kill_RAMSES`) for graceful process management.
101+
24102
For detailed GUI usage, visit the [STEPSS website](https://sps-lab.org/project/stepss/).
25103

26104
</TabItem>
@@ -33,96 +111,144 @@ For detailed GUI usage, visit the [STEPSS website](https://sps-lab.org/project/s
33111
pip install pyramses
34112
```
35113

36-
2. **Create a command file** (`cmd.txt`):
37-
```
38-
data.dat
39-
40-
init.trace
41-
dst.dst
42-
result.rtrj
43-
obs.obs
44-
cont.trace
45-
disc.trace
46-
```
47-
48-
3. **Run a simulation**:
114+
2. **Run a simulation**:
49115
```python
50116
import pyramses
51-
52-
# Initialize simulator
117+
118+
# Configure the case
119+
case = pyramses.cfg()
120+
case.addData("data.dat")
121+
case.addData("volt_rat.dat")
122+
case.addData("settings.dat")
123+
case.addObs("obs.obs")
124+
case.addDst("disturbance.dst")
125+
126+
# Run
53127
ram = pyramses.sim()
54-
55-
# Load test case from command file
56-
case = pyramses.cfg("cmd.txt")
57-
58-
# Run full simulation
59-
ram.execSim(case)
128+
ram.execSim(case, 150.0)
60129
```
61130

62-
4. **Extract and plot results**:
131+
3. **Extract and plot results**:
63132
```python
64-
# Extract trajectory data
65133
ext = pyramses.extractor(case.getTrj())
66-
134+
67135
# Plot bus voltage magnitude
68136
ext.getBus('1041').mag.plot()
69-
137+
70138
# Plot synchronous machine speed
71139
ext.getSync('g1').speed.plot()
72140
```
73141

74142
</Steps>
75143

144+
See the [PyRAMSES API Reference](/stepss-docs/pyramses/api-reference/) for the complete interface.
145+
76146
</TabItem>
77-
<TabItem label="CLI">
147+
</Tabs>
148+
149+
---
150+
151+
## Static Simulation (PFC)
152+
153+
<Tabs>
154+
<TabItem label="Command Line">
155+
156+
### PFC Command-Line Interface
157+
158+
The PFC executable accepts the following arguments:
159+
160+
```bash
161+
pfc.exe [-t command_file] [-o output_file] [-c trigger_file] [-v verbosity]
162+
```
163+
164+
| Flag | Description |
165+
|------|-------------|
166+
| `-t command_file` | Read inputs from a command file (non-interactive mode) |
167+
| `-o output_file` | Redirect output to a file instead of the console |
168+
| `-c trigger_file` | Cycle mode — wait for trigger file to start/proceed |
169+
| `-v N` | Verbosity level (0 = silent, 1 = normal) |
170+
171+
**Interactive mode** (no `-t` flag): PFC prompts for data files, then presents a command menu.
172+
173+
**Non-interactive mode** (`-t` flag): The command file provides data file names (one per line, blank line to end), followed by menu commands.
78174

79175
<Steps>
80176

81-
1. **Prepare data files**: Create network data, dynamic data, disturbance, and solver settings files
177+
1. **Prepare data files**: Network data, PFC-specific data (generators, loads, SVC, LTC-V, PSHIFT-P)
82178

83-
2. **Run simulation via RAMSES executable**:
84-
```bash
85-
dynsim.exe cmd.txt
179+
2. **Create a command file** (`pfc_cmd.txt`):
180+
```
181+
network.dat
182+
pfc_data.dat
183+
184+
VT
185+
volt_rat.dat
186+
E
86187
```
87188

88-
3. **Process results** using MATLAB, Python, or other tools
189+
3. **Run the power flow**:
190+
```bash
191+
pfc.exe -tpfc_cmd.txt -ooutput.txt
192+
```
89193

90194
</Steps>
91195

196+
### PFC Menu Commands
197+
198+
After loading data and solving, PFC presents these commands:
199+
200+
| Command | Description |
201+
|---------|-------------|
202+
| `P` | Take new control parameters from file |
203+
| `D` | Display output values |
204+
| `1` | Display outputs on 1-line diagram (SVG) |
205+
| `M` | Modify system (change loads, generators, topology) |
206+
| `RI` | Reset system to initial configuration |
207+
| `CA` | Perform contingency analysis |
208+
| `CL` | Check operating limits (voltage bounds, branch overloads) |
209+
| `O` | Change output file |
210+
| `DF` | Update all records and dump them to a file |
211+
| `VT` | Generate a file with voltages and adjustable transformer ratios (LFRESV format) |
212+
| `S` | Save operating point and Y matrix to MATLAB file |
213+
| `E` | Exit |
214+
215+
The `VT` command produces the LFRESV file needed to initialize RAMSES.
216+
92217
</TabItem>
93-
</Tabs>
218+
<TabItem label="GUI (Java)">
94219

95-
## Command File Structure
220+
<Steps>
96221

97-
The command file (`cmd.txt`) lists the input files for a simulation, separated by blank lines:
222+
1. **Launch STEPSS** by double-clicking `stepss.jar`
223+
2. **Load data files**: Use File → Open to load network and PFC data files
224+
3. **Run Power Flow**: Click the PFC button to compute the power flow
225+
4. **Inspect results**: View bus voltages, branch flows, generator outputs, and reactive power limits
226+
5. **Export LFRESV**: Save the power flow solution for use with RAMSES
98227

99-
```
100-
datafile1.dat # Network + dynamic data files
101-
datafile2.dat # (one or more)
102-
103-
init.trace # Initialization output (optional)
104-
disturbance.dst # Disturbance scenario
105-
result.rtrj # Trajectory output (optional)
106-
obs.obs # Observables definition (required if trajectory given)
107-
cont.trace # Continuous trace output (optional)
108-
disc.trace # Discrete trace output (optional)
109-
```
228+
</Steps>
110229

111-
Records can be distributed across an arbitrary number of data files, read sequentially. The order of records and files does not matter.
230+
For detailed GUI usage, visit the [STEPSS website](https://sps-lab.org/project/stepss/).
231+
232+
</TabItem>
233+
</Tabs>
234+
235+
---
112236

113237
## Typical Workflow
114238

115239
1. **Define the network**: Specify buses, lines, transformers, and shunts
116240
2. **Set up power flow data**: Define generators, loads, and the slack bus
117-
3. **Add dynamic models**: Specify synchronous machines, excitation systems, speed governors, loads, and controllers
118-
4. **Configure solver**: Set integration method, time steps, and tolerances
119-
5. **Define disturbances**: Specify faults, line trips, parameter changes, etc.
120-
6. **Run simulation**: Execute PFC for initialization, then RAMSES for dynamics
121-
7. **Analyze results**: Extract and visualize trajectories of voltages, frequencies, and powers
241+
3. **Run PFC**: Compute the initial operating point and export LFRESV
242+
4. **Add dynamic models**: Specify synchronous machines, excitation systems, speed governors, loads, and controllers
243+
5. **Configure solver**: Set integration method, time steps, and tolerances
244+
6. **Define disturbances**: Specify faults, line trips, parameter changes, etc.
245+
7. **Run RAMSES**: Execute the dynamic simulation
246+
8. **Analyze results**: Extract and visualize trajectories of voltages, frequencies, and powers
122247

123248
## Next Steps
124249

125250
- [File Formats](/stepss-docs/user-guide/file-formats/) — Learn about data file syntax
126251
- [Network Modeling](/stepss-docs/user-guide/network/) — Define your power system network
252+
- [Power Flow (PFC)](/stepss-docs/user-guide/pfc/) — PFC data and control parameters
127253
- [Dynamic Models](/stepss-docs/user-guide/dynamic-models/) — Add generators, loads, and controllers
128254
- [PyRAMSES API](/stepss-docs/pyramses/api-reference/) — Full Python API documentation

0 commit comments

Comments
 (0)