x3042 / ExactODEReduction.jl

Exact reduction of ODE models via linear transformations
MIT License
13 stars 3 forks source link

Parameters #24

Closed pogudingleb closed 1 year ago

pogudingleb commented 1 year ago
  1. Parameters are treated separately from the states (and this is handled during the reduction)
  2. Initial conditions and parameter values are stored inside ODE and are automatically reduced when reduction is performed
  3. Some bugfixes
  4. New version of Case Study 1
sumiya11 commented 1 year ago

We should probably export old_system, parameters(::ODE) and friends

sumiya11 commented 1 year ago

I think this is a bit mind boggling (it had been this way even before, but I found this out only while checking this pr):

s = @ODEsystem(
           x'(t) = a*x(t)*y(t),
           y'(t) = b*y(t)
       )

reds = find_reductions(s, parameter_strategy=:inheritance)

A chain of 3 reductions of dimensions 1, 2, 3.
==================================
1. Empty reduction
==================================
2. Empty reduction
==================================
3. Reduction of dimension 3.
New system:
y1'(t) = y1(t)*y3
New variables:
y1 = y
y2 = a
y3 = b

What about we mention the size of an empty system when printing it? Something along these lines:

Empty reduction
All of N new variables are constant expressions in parameters: ...)

Same goes for an empty ODE

pogudingleb commented 1 year ago

We should probably export old_system, parameters(::ODE) and friends

Agree, will do.

pogudingleb commented 1 year ago

I think this is a bit mind boggling (it had been this way even before, but I found this out only while checking this pr):

s = @ODEsystem(
           x'(t) = a*x(t)*y(t),
           y'(t) = b*y(t)
       )

reds = find_reductions(s, parameter_strategy=:inheritance)

A chain of 3 reductions of dimensions 1, 2, 3.
==================================
1. Empty reduction
==================================
2. Empty reduction
==================================
3. Reduction of dimension 3.
New system:
y1'(t) = y1(t)*y3
New variables:
y1 = y
y2 = a
y3 = b

What about we mention the size of an empty system when printing it? Something along these lines:

Empty reduction
All of N new variables are constant expressions in parameters: ...)

Same goes for an empty ODE

Good point, I will fix it