Skip to content

Commit 2889db0

Browse files
Add simulation extension methods for event handling
- Introduced `SimulationExtensions` class with an `Execute` method to streamline simulation execution and event invocation. - Updated documentation in `intro.md` and `meas.md` to utilize the new `Execute` method, simplifying the simulation workflow.
1 parent 05e708d commit 2889db0

478 files changed

Lines changed: 25 additions & 165751 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ var model = reader.Read(parseResult.FinalModel);
5555
var simulation = model.Simulations.Single();
5656
var export = model.Exports.Find(e => e.Name == "i(V1)");
5757
simulation.EventExportData += (sender, args) => Console.WriteLine(export.Extract());
58-
var codes = simulation.Run(model.Circuit, -1);
59-
codes = simulation.InvokeEvents(codes);
60-
codes.ToArray();
58+
simulation.Execute(model.Circuit);
6159
```
6260

6361
### How It Works
@@ -66,7 +64,7 @@ codes.ToArray();
6664
|------|-----|--------|
6765
| **Parse** | `SpiceNetlistParser.ParseNetlist()` | Parse-tree model of the netlist |
6866
| **Read** | `SpiceSharpReader.Read()` | `SpiceSharpModel` with Circuit, Simulations, Exports, Measurements |
69-
| **Simulate** | `simulation.Run()` / `InvokeEvents()` | Data available via exports and event callbacks |
67+
| **Simulate** | `simulation.Execute()` | Data available via exports and event callbacks |
7068

7169
## Compatibility
7270

docs/api/SpiceSharpParser.Common.Evaluation.CustomVariable-1.html

Lines changed: 0 additions & 334 deletions
This file was deleted.

0 commit comments

Comments
 (0)