Declarative Differential Models (DDM) refer to a modeling approach where the entire system's behavior—states, transitions, constraints, and objectives—is described declaratively and encoded directly within a set of differential equations or differential-algebraic equations (DAEs).
Declarative: We specify what the system's relationships and constraints are, not how to compute them. The system is described by its rules and relationships, not step-by-step instructions.
Differential / DAE-based: The model is encoded as systems of differential equations (continuous or hybrid dynamics). These equations govern how the system evolves over time.
Constraint Embedding: Physical or logical constraints (e.g., conservation laws, capacity limits) are baked directly into the equations. The system operates within valid bounds without requiring external enforcement.
Optimization-Ready: DDMs naturally integrate with optimization techniques, allowing parameters to be learned or fine-tuned directly within the model.
A Petri net can be converted to an ODE system using mass-action kinetics:
For each place in the net:
dM(p)/dt = Σ(incoming flow) - Σ(outgoing flow)
Where the flow through each transition follows:
rate(T) = k × M(P1)^w1 × M(P2)^w2 × ...
k = rate constant for the transitionM(P) = marking (tokens) in place Pw = arc weightThis transforms discrete token dynamics into continuous flow—tokens become concentrations, firing becomes flux.
| Discrete Simulation | ODE Simulation |
|---|---|
| Track individual events | Track population-level dynamics |
| "Patient 1 arrives at 8:15" | "Patients arrive at rate 10/hour" |
| Slow: must process every event | Fast: solves continuous equations |
| Scales with event count | Scales with equation count |
Advantages of the continuous approach:
pflow.xyz provides a browser-based environment for DDM:
The model exports as JSON-LD, making it portable and composable.
In a knapsack model:
One powerful technique: disable transitions to measure contribution.
By setting a transition's rate to zero, we can observe:
This replaces combinatorial search with targeted simulation.
DDM works best when:
DDM is less suited when: