Transient model - #27
Open
mrke wants to merge 1 commit into
Open
Conversation
Member
|
@mrke there are 10k lines of old code mixed into this, the git history is broken probably from the other branches being squashed. I suggest you merge in main, then get claude to squash everything you changed down to one commit on top of the current main. Make a backup branch first! |
…ms and endotherms Event-driven ODE model (simulate_transient_behavior/simulate_endotherm_activity_cycle) alongside the existing steady-state hourly loop: seven ectotherm behavioral phases (sleep/bask/forage/cool/climb/burrow/refuge) and endotherm active/resting cycling, driven by EnvironmentForcing time series and OrdinaryDiffEqTsit5. Includes a user-extensible phase interface (phase_forcing/phase_posture/phase_state/phase_key/ phase_condition/next_phase), per-phase metabolic rate multipliers, configurable cool-resume thresholds, and validation against the shared ectotherm threshold ordering. Ported against and compared to NicheMapR's trans_behav.R reference output.
Contributor
Author
|
it was actually mainly a big csv file used as a test that didn't need to be there - smaller now! |
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.
Adds new transient (accounting for lags due to thermal inertia) behavioural algorithms, building on the addition of transient heat transfer calculations in HeatExchange.jl (currently a parallel PR for transient-model branch). It imports the 'trans_behav.R' functionality from the NicheMapR package and extends it to a more diverse range of behaviours, notably burrowing and climbing and nocturnal activity.
The general approach is to integrate with callbacks following the pattern in DEBtool_J.jl, with an extendable suite of conditions for the callbacks, allowing shuttling between sun and shade, retreating to a burrow or the surface or a tree when resting, escaping to a burrow in an overheating emergency, etc.
A preliminary application to endotherms is included where the gradual change in body temperature after a sudden transition to a new metabolic rate (active vs. resting metabolic rates) can be modelled to compute how heat load drives intermittent locomotion.
The steady state model has been extended to allow only climbing (arboreal habit) or only burrowing (fossorial habit). The terms 'critical_thermal_minimim/maximum' have been replaced with 'escape_temperature_min/max' to better reflect what these thresholds do in the code (the former have a specific physiological meaning - loss of righting response).