Add RegulatoryNetwork behavior with Boost ODE integration#471
Open
sportokalidis wants to merge 16 commits into
Open
Add RegulatoryNetwork behavior with Boost ODE integration#471sportokalidis wants to merge 16 commits into
sportokalidis wants to merge 16 commits into
Conversation
Add libboost-dev (Ubuntu) and boost (macOS) to package lists to support Boost-based behaviors such as RegulatoryNetwork.
Introduce a 'boost' CMake option (ON by default) that finds Boost and defines USE_BOOST. If Boost is not installed the option is silently disabled with a warning, keeping the build fully backward-compatible.
Add an empty RegulatoryNetwork behavior class (stub) that subclasses Behavior. The header is included in biodynamo.h only when USE_BOOST is defined. Implementation of Run() is left for follow-up work.
rootcling (ROOT's dictionary generator) compiles headers independently of the normal build, bypassing the USE_BOOST guard in biodynamo.h. Wrapping the entire header content in #ifdef USE_BOOST makes the file safe to process in any context when Boost is not present.
Add libboost-dev (Ubuntu) and boost (macOS) to the CI dependency installation steps so RegulatoryNetwork builds correctly in CI.
__ROOTCLING__ is defined by both rootcling at compile time and by Cling at runtime when it re-parses dictionary payloads. Boost headers (odeint, phoenix) contain template machinery that breaks Cling's JIT interpreter, corrupting the whole dictionary and causing unrelated classes to fail. Guarding with #ifndef __ROOTCLING__ keeps the class declaration visible for dictionary generation while hiding the problematic Boost includes.
The header pulls in Boost includes which Cling (ROOT's JIT interpreter) cannot resolve at runtime on macOS, breaking unrelated tests. As an optional Boost-based behavior, it should not be auto-included. Users include core/behavior/regulatory_network.h explicitly in their simulation code when needed.
Exclude simulation output artifacts (CSV files and output directories) from version control. These are generated at runtime and should not be committed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new behavior class called RegulatoryNetwork that allows agents in a simulation to carry and evolve a system of ordinary differential equations (ODEs). The ODE integration is handled by the Boost.Numeric.Odeint library, which supports multiple numerical solvers including explicit Euler, Runge-Kutta, and Rosenbrock methods.
Boost is added as an optional dependency. If Boost is not found on the system, the build continues normally and the RegulatoryNetwork behavior is simply not available. The CI pipelines for Ubuntu and macOS are updated to install Boost so the feature is exercised during automated testing.
A demo called regulatory_networks is included and is accessible via: