Skip to content

v0.35

Pre-release
Pre-release

Choose a tag to compare

@MAGALA-RICHARD MAGALA-RICHARD released this 02 May 20:19
· 3521 commits to main since this release

apsimNGpy version: v0.35 – April 2025

APSIMNGpy is a Python interface for APSIM Next Generation (.apsimx) models. It enables seamless model inspection, execution, batch simulation, optimization, and diagnostic reporting—directly from Python. Designed for reproducible research and integration with scientific workflows. Please take a look at the new improvements below.

✨ New Features

Model Introspection: inspect_model_inputs() enables inspection of internal parameters (Weather, Clock, Soil, Report, etc.).

Model Actions: Support for get, delete, and check operations on models within simulations via get_or_check_model().

Flexible Model Lookup: Added _eval_model() and find_model() utilities for robust model resolution by name or namespace.

Batch Simulation Support: Functions for handling multiple simulations and reports concurrently.

Model editing: Model editing has been streamlined by introducing a unified method, edit_model, which allows users to specify the model type, name, and target simulation in a single call.

Model inspection: Model inspection has been enhanced with the inspect_model_parameters method, enabling users to retrieve parameter values by specifying the model type, name, and simulation. Additionally, the inspect_model method can be used to explore available model names and their paths within simulations.

Cultivar Modification: Access and manipulation of PMF.Cultivar parameters, including dynamic cultivar switching.

More CLI model edits and interactions

🛠 Improvements

Refactored internal utilities for better maintainability and reuse.

Improved error handling and descriptive exceptions.

Memory-safe operations with explicit use of garbage collection to clear memory after expensive recursions.

Logging minimization inside event loops for improved performance.

🐛 Bug Fixes

Fixed incorrect type handling in soil model inspection.

Resolved missing models from deeply nested namespaces like Models.Factorial.

📚 Documentation

Enhanced docstrings and type hints across all public APIs.

Added inline usage instructions for key functions.