Skip to content

Support probabilistic branching transitions in the model generator #1555

@HenrZu

Description

@HenrZu

Motivation / Current Behaviour

The model generator currently supports linear transitions of the form

X -> Y: X / TimeX

This works for simple sequential models, but it does not directly support branching transitions where one source compartment can move to multiple target compartments according to probabilities.

Example: In a generated SEIRD model, transitions from Infected should ideally be split into recovery and death:

Infected -> Recovered: (1 - DeathProbability) * Infected / TimeInfected
Infected -> Dead:       DeathProbability * Infected / TimeInfected

At the moment this has to be represented with a custom transition or manual edits in the generated C++ code. This is error-prone and also makes the generated model less useful as a directly compilable baseline.

Enhancement description

A possible extension would be to add support for probabilistic linear transitions, for example with fields such as:

  • from: Infected
    to: Dead
    type: linear
    parameter: TimeInfected
    probability: DeathProbability

  • from: Infected
    to: Recovered
    type: linear
    parameter: TimeInfected
    probability_complement: DeathProbability

Additional context

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

Labels

class::improvementCleanup that doesn't affect functionalitymodel::odeThis issue concerns any kind of ODE-based model.

Type

No type

Projects

Status

Product Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions