Skip to content

Commit adc711c

Browse files
committed
Update README with Python port section
1 parent 768e0ee commit adc711c

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
# C++SIM
2+
3+
## Python Port Now Available
4+
5+
**PySim** brings C++SIM's battle-tested discrete event simulation to Python 3.12+, preserving the API that has served researchers and engineers since 1990 while leveraging modern Python tooling.
6+
7+
### What You Get
8+
9+
- **SIMULA-style process-based simulation** - The same programming model, now with Python generators instead of OS threads
10+
- **Validated accuracy** - 77 tests verify numerical equivalence with C++SIM output
11+
- **Complete feature set**:
12+
- Process scheduling (activate, hold, passivate, interrupt)
13+
- Entity synchronization (Semaphore, TriggerQueue)
14+
- Random streams (Uniform, Exponential, Normal, Erlang, HyperExponential, Triangular)
15+
- Statistics collection (Mean, Variance, Histogram, Quantile)
16+
- SimSet linked lists
17+
- **Type hints throughout** for IDE support and static analysis
18+
- **SimPy integration** - Built on a proven simulation engine
19+
20+
### Quick Start
21+
22+
```bash
23+
cd pysim && pip install -e .
24+
```
25+
26+
```python
27+
from pysim import Process, Scheduler
28+
import simpy
29+
30+
class Job(Process):
31+
def body(self):
32+
print(f"Job started at {self.current_time()}")
33+
yield from self.hold(10.0)
34+
print(f"Job finished at {self.current_time()}")
35+
36+
env = simpy.Environment()
37+
Scheduler.scheduler(env)
38+
Job(env).activate()
39+
env.run()
40+
```
41+
42+
See [pysim/README.md](pysim/README.md) for full documentation, API reference, and migration guide.
43+
44+
---
45+
46+
## C++SIM (Original)
47+
148
C++SIM is an object-oriented simulation package which has been under development and available since 1990. It provides discrete event process-based simulation similar to SIMULA's simulation class and libraries. A complete list of the facilities provided follows:
249

350
- the core of the system gives SIMULA-like simulation routines, random number generators, queueing algorithms, and thread package interfaces.

0 commit comments

Comments
 (0)