Skip to content

Replace C++ identification with Python workflow#87

Open
chemiskyy wants to merge 4 commits intomasterfrom
update/migrate-identification
Open

Replace C++ identification with Python workflow#87
chemiskyy wants to merge 4 commits intomasterfrom
update/migrate-identification

Conversation

@chemiskyy
Copy link
Copy Markdown
Member

Migrate parameter-identification functionality from the old C++ genetic-algorithm subsystem to a Python key-based workflow using scipy.optimize. This removes the C++ Identification he
This pull request removes the legacy C++-based parameter identification framework from Simcoon and updates the documentation to reflect a new, Python-based identification workflow. The new workflow leverages Python's scipy.optimize and a flexible key-based templating system, allowing users to perform parameter identification with any optimizer or simulation tool. Documentation throughout the project is updated to describe this new approach and to remove references to the old C++ identification API and algorithms.

Major documentation and codebase updates:

1. Removal of C++ Identification Tools and References

  • The C++ identification executable and all related documentation, including API references and workflow descriptions, have been removed from the build system and documentation (CMakeLists.txt, docs/cpp_api/index.rst, docs/cpp_api/simulation/index.rst, docs/cpp_api/simulation_overview.md, README.md, docs/index.rst). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

2. Addition of Python-Based Identification Workflow Documentation

  • New documentation (docs/simulation/identification.rst) describes the Python-based parameter identification workflow using the key system and scipy.optimize. It includes example code, recommended optimizers, and integration with external solvers.
  • The new documentation is linked in the simulation module's index.

3. Cleanup of Legacy and Redundant Documentation

  • Old documentation files and references related to the C++ identification library have been removed (docs/cpp_api/simulation/identification.rst, docs_old/Cpp/Simulation/Identification/identification.rst, docs_old/Cpp/Simulation/Identification/index.rst). [1] [2] [3]

These changes modernize the parameter identification workflow in Simcoon, making it more flexible and user-friendly by leveraging widely-used Python optimization tools and decoupling the workflow from the core C++ library.aders/sources, related tests and legacy python-wrapper files, and stops building the identification executable in CMakeLists. Documentation and APIs were updated to remove the C++ identification entry and to add a new docs/simulation/identification.rst describing the key-system + scipy workflow. An example (examples/heterogeneous/composite_parameter_identification.py) and a template keys file were added, and README/docs index text was updated to advertise the Python-based identification approach.

Migrate parameter-identification functionality from the old C++ genetic-algorithm subsystem to a Python key-based workflow using scipy.optimize. This removes the C++ Identification headers/sources, related tests and legacy python-wrapper files, and stops building the identification executable in CMakeLists. Documentation and APIs were updated to remove the C++ identification entry and to add a new docs/simulation/identification.rst describing the key-system + scipy workflow. An example (examples/heterogeneous/composite_parameter_identification.py) and a template keys file were added, and README/docs index text was updated to advertise the Python-based identification approach.
@ylgrst
Copy link
Copy Markdown
Collaborator

ylgrst commented Mar 31, 2026

This PR removes a public executable and public C++/Python identification APIs, so it looks like a breaking change. Maybe we should version/document it as a bigger release instead of shipping it as 1.11.1? Package metadata in yaml file still says 1.11.1.
Also, maybe add compatibility stubs for the moment to warn users the old identification workflow is gone.

I have also found that the new parameter test does not actually cover the migrated identification workflow it is supposed to protect.

There's also issues with how the new docs present Parameter/Constant as a Python-based generic workflow, but those imports still require the compiled extension first. The docs tell users to import from simcoon.parameter and simcoon.constant but simcoon's __init__.py imports simcoon._core, so the 2 previously mentioned imports fail with error ModuleNotFoundError: simcoon._core. So unless _core has already been built, the new described workflow can't be used

…s CI

- Bump version to 2.0.0 (breaking change: removal of C++ identification API)
- Add deprecation stubs for identification() and calc_cost() with migration
  messages pointing to scipy.optimize and the new key-based workflow
- Add 4 workflow integration tests: full template->apply cycle, fresh copy
  per iteration, bounds for optimizer, and deprecation stub behavior
- Fix Windows CI: align environment_win.yml with conda build (netlib for
  build, mkl substituted at runtime) and remove broken BLA_PREFER_PKGCONFIG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants