patrick-kidger / patrick-kidger/diffrax

Advice about time-based 'events'

Open
#504 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
2.1k
Forks
189
Avg merge
3d 18h
Merged PRs (30d)
1

Description

Hi, I am excited to try difftrax for my application, but am wondering about the recommended approach for the following.

I have an initial value ODE model that describes drug concentrations in various parts of the body over time. At various prescribed intervals, and for various durations, an additional amount of drug is added to a part of the body.

For example:
Dose 1: magnitude = 1, time =5, duration= 15
Dose 2: magnitude = 2, time =25, duration= 30
Dose 3: magnitude = 3, time = 100, duration = 0.1

Is there a way to specify certain 'special' time points (in the above example, these would be t = 5, 20, 25, 55, 100, 100.1) such that the integration will be sure to include them?

Alternatively, I suppose that I could break the integration into numerous pieces, each of which would include a separate dosing, or not, regigon.

Your advice would be greatly appreciated on the best way to handle the situation.

Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the existing solver API and documentation for handling prescribed time points and time-dependent dosing, then determine whether the requested six boundaries can be supported directly or require segmented integration; done means a documented, tested recommendation or implementation for these dosing intervals.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.