SIMIT As-Fast-As-Possible (AFAP) Multi-Core CPU Utilization and Parallel Batch Simulation
In SIMIT Simulation Framework, low CPU utilization (e.g., 6% on a quad-core workstation) during As Fast As Possible (AFAP) simulation occurs because the SIMIT calculation engine assigns each simulation diagram and time slice to a single execution thread. On a multi-core processor, an uncoupled simulation executes so rapidly on a single core that total system utilization remains low while the operating system throttles thread transitions to maintain desktop responsiveness. To fully utilize multi-core host hardware and evaluate large scenario matrices, engineers execute parallel SIMIT instances simultaneously via the command line or SIMIT Remote Control .NET API, allocating separate simulation projects to independent CPU cores.
Table of Contents
- SIMIT Calculation Engine Threading Architecture
- Why Single AFAP Simulations Do Not Saturate Multi-Core CPUs
- Executing Parallel Simulation Batches via Command Line and API
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SIMIT Calculation Engine Threading Architecture
The SIMIT calculation kernel executes simulation components cyclically across defined time slices (typically 8 slices: 1 to 8). Each time slice executes synchronously in its own dedicated worker thread. However, within an individual time slice, interconnected components on a single diagram must be computed sequentially to resolve algebraic loops and input-output dependencies.
When running in AFAP mode without hardware couplings, the solver computes each time slice as fast as the single thread allows, then immediately cycles. Because standard modern CPUs feature 4, 8, or 16 logical cores, a single-threaded simulation can never consume more than $\frac{100}{\text{Cores}}\%$ of total CPU capacity (e.g., 25% on a quad-core, or 12.5% on an 8-core CPU).
Why Single AFAP Simulations Do Not Saturate Multi-Core CPUs
The table below details factors influencing CPU reporting during AFAP execution:
Executing Parallel Simulation Batches via Command Line and API
To fully exploit multi-core CPU architectures for design-of-experiment (DOE) parameter sweeps or multi-scenario verification:
Method 1: Headless Command-Line Multi-Instance Launch
Engineers can launch multiple independent SIMIT simulation instances concurrently using PowerShell or batch scripts:
# Launch 4 concurrent SIMIT simulation instances across separate CPU cores
$simitExe = "C:\Program Files (x86)\Siemens\Automation\SIMIT\SIMIT SF\bin\Simit.exe"
for ($i = 1; $i -le 4; $i++) {
$project = "C:\Simulations\BatchProject_$i.simit"
Start-Process -FilePath $simitExe -ArgumentList "-open `"$project`" -start -afap -headless"
}
Method 2: SIMIT Remote Control Interface (.NET API)
Using the SIMIT Remote Control API (COM / .NET), custom C# or Python scripts can programmatically open project clones, assign unique parameter tables, trigger AFAP execution, and extract results to SQL or CSV upon completion.
Verification
To verify effective multi-core parallel simulation execution:
- Launch multiple simulation instances using the batch script.
- Open Windows Task Manager -> navigate to the Performance tab -> click CPU.
- Right-click the CPU graph -> select Change graph to -> Logical processors.
- Confirm that all CPU cores (Core 0, Core 1, Core 2, Core 3) exhibit high, balanced utilization (85% to 100%).
- Verify that each independent SIMIT instance outputs completed scenario datasets without memory collisions.
Limitations and Operational Precautions
Operational boundaries when executing parallel simulations:
- Coupling Conflicts: Multiple SIMIT instances cannot connect to the same S7-PLCSIM or Virtual Controller instance simultaneously; parallelization requires independent virtual controllers or standalone models.
- RAM Allocation: Each active SIMIT instance allocates memory for its own model database and graphic cache. Ensure host workstation RAM is sized appropriately (minimum 4 GB per concurrent instance).
- Disk I/O Bottlenecks: Writing high-speed historical trend data from multiple AFAP instances simultaneously can saturate SATA hard drives; utilize NVMe SSD storage for parallel logging.
Engineer FAQ
Why does Task Manager show only 6% CPU usage when SIMIT is running AFAP?
A single simulation diagram executes in a single worker thread on one CPU core. On an 8-core or quad-core hyperthreaded CPU, one saturated thread represents only 6% to 12% of total multi-core capacity.
Can SIMIT automatically distribute a single diagram across multiple CPU cores?
No. A single simulation diagram contains sequential signal flow loops that cannot be split across threads without risking non-deterministic calculation race conditions.
Can I run multiple SIMIT projects at the same time on the same PC?
Yes. Multiple SIMIT processes can run concurrently on a single workstation, provided the system has sufficient RAM and licensing.
Why does the SIMIT internal load display 0% during AFAP?
SIMIT internal load measures the percentage of the real-time budget consumed. In AFAP mode, real-time targets are disabled, so internal load is reported as 0%.
Technical References
- Siemens SIMATIC SIMIT Simulation Framework Operating Manual (A5E40871141)
- Siemens SIMIT Remote Control Interface and API Programming Guide
- Siemens Industry Online Support Entry ID 109756881: High-Performance SIMIT Simulation
Related Articles
- SIMIT Scripting Modes (Synchronous vs Asynchronous) and Password-Protected Library Components
- Modifying SIMIT Component Type Editor (CTE) FLOWNET Components and Scaling Warnings
- Simulating SIMATIC FM 458-1 DP High-Speed Controllers in SIMIT V9.1
Related Tags
- SIMIT
- AFAP
- Multi-Core-CPU
- Parallel-Simulation
- Remote-Control-API
- Virtual-Commissioning