x3042 / ExactODEReduction.jl

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

Add positivization at the end #5

Closed pogudingleb closed 2 years ago

pogudingleb commented 3 years ago

The resulting subspaces are now returned by their bases in the reduced echelon form. This may not be the easiest to interpret, for example, the 9-dimensional reduction of e2 contains:

S1 + S10 + S11 + S12 + S14 + S15 + S16 + 2*S17
-2*S0 - S1 + S10 + S11 - S12 + 2*S13 - S14 + S15 + S16 + 2*S2 - 2*S5 + 2*S6 + 2*S7
S0 + S12 + S14 + S3 + S4 + 2*S5 + S8 + S9

However, one may take their linear combination to get

S1 + S10 + S11 + S12 + S14 + S15 + S16 + 2*S17
S0 + S12 + S14 + S3 + S4 + 2*S5 + S8 + S9
S2 + S3 + ... + S17

which makes much more sense.

Such a transformation can be preformed by using the algorithm by Xingjian Zhang implemented in https://github.com/xjzhaang/LumpingPostiviser It would be great to add that implementation here.

pogudingleb commented 2 years ago

Done