Skip to content

v0.18.0 - Executors for Optimisation Loops

Choose a tag to compare

@JTyler13 JTyler13 released this 20 Apr 11:59
· 64 commits to main since this release

Release Summary: Advanced Simulation Orchestration & Executor Framework

This release introduces a redesigned execution architecture for digiqual, enabling seamless integration with diverse simulation environments while maintaining strict statistical rigor. The new Executor pattern allows the SimulationStudy class to act as a central orchestrator for complex, multi-stage reliability studies.


🚀 The Executor Framework

DigiQual now provides three distinct pathways to connect your physical solvers to the active learning engine:

  • PythonExecutor (In-Memory)
    • Designed for pure Python mathematical models or high-speed surrogate functions.
    • Executes entirely within the local memory space for maximum performance and minimal overhead.
  • CLIExecutor (Process Isolation)
    • Engineered for heavy-duty physics engines like Ansys or Abaqus.
    • Uses temporary CSV handshakes and spawns completely isolated OS processes to prevent memory leaks and ensure environment stability.
  • MatlabExecutor (Native Integration)
    • A specialized wrapper that automatically handles the complex terminal syntax required for headless MATLAB batch mode.
    • Handles the initialization and termination of the MATLAB kernel automatically, returning control to Python once the solve is complete.

🔄 Active Learning & Adaptive Refinement

The optimise() method has been upgraded to utilize these executors within a fully automated "Active Learning" lifecycle:

  1. Initialisation: Generates an initial Latin Hypercube Sample (LHS) design to ensure a broad spread across variable ranges.
  2. Execution: Dispatches batches of simulations via the chosen Executor.
  3. Diagnostics: Performs automated statistical checks for input coverage gaps and measures model uncertainty using Bootstrap Query-by-Committee.
  4. Refinement: If diagnostics fail, the engine generates targeted samples in regions of high uncertainty or empty gaps and re-runs the loop until the model reaches convergence.

🪦 The "Graveyard" Failure Tracking

To handle real-world simulation instabilities, we have introduced the Graveyard Tracker. If a solver fails to converge or crashes (returning NaN), DigiQual automatically identifies these "dead zones." The active learning engine will then logically navigate around these coordinates in future refinement iterations, ensuring the reliability study continues without manual intervention.


🛠️ Developer Usage

The API has been streamlined to make these features accessible in just a few lines of code:

from digiqual.core import SimulationStudy
from digiqual.executors import MatlabExecutor

# Define your strategy
executor = MatlabExecutor(wrapper_name="my_physics_solver")

# Initialize and execute the auto-pilot loop
study = SimulationStudy(input_cols=["Length", "Angle"], outcome_col="Signal")
study.optimise(
    executor=executor,
    ranges={"Length": (0, 10), "Angle": (-45, 45)},
    n_start=40,
    n_step=10,
    max_iter=5
)

This architecture ensures that digiqual remains a robust, production-ready tool for high-fidelity NDE reliability engineering.

What's Changed

Full Changelog: v0.17.1...v0.18.0