Functions for finding reductions
Finding reductions
ExactODEReduction.find_reductions — Functionfind_reductions(system::ODE; overQ=true, makepositive=false, loglevel=Logging.Info)Finds reductions of the system corresponding to a Jordan-Hoelder filtration. This means that the reduction form a chain, and there are no extra intermediate reduction in this chain. In particular, if there exists at least one reduction, it will be found.
Arguments:
systemis an ODE system given asODEobject,overQtells the algorithm to search for reductions over rational numbers. Istrueby default,seedis a seed for the random number generator,makepositivetells the algorithm to search for reductions with positive coefficients.falseby default.
To enable this argument, you should have Polymake.jl imported.
loglevelis a level of logging.Logging.Infoby default.parameter_strategyprescribes the way the parameter in the resulting system will be recognized::inheritance(default) the parameters in the new system are exactly combinations of the original parameters:constantsthe parameters in the new system will be the variables with zero dynamics:none- no parameters in the result
Example:
julia> using ExactODEReduction
julia> odes = @ODEsystem(
x'(t) = x + y,
y'(t) = x - y - z,
z'(t) = 2x - z
)
julia> find_reductions(odes)
A chain of 2 reductions of dimensions 1, 2.
==================================
1. Reduction of dimension 1.
New system:
y1'(t) = 0
New variables:
y1 = x + y - z
==================================
2. Reduction of dimension 2.
New system:
y1'(t) = -y1(t) + y2(t)
y2'(t) = y1(t) - y2(t)
New variables:
y1 = x - z
y2 = yExactODEReduction.find_smallest_constrained_reduction — Functionfind_smallest_constrained_reduction(system::ODE, observables; overQ=true, makepositive=false, loglevel=Logging.Info)Finds the best linear reduction of the system. If there exists a reduction, it will be found.
Arguments:
systemis an ODE system given asODEobject,observablesis a list of linear functions of initial variables desired to be preserved by reduction,overQtells the algorithm to search for reductions over rational numbers. Istrueby default,seedis a seed for the random number generator,makepositivetells the algorithm to search for reductions with positive coefficients.falseby default.
To enable this argument, you should have Polymake.jl imported.
loglevelis a level of logging.Logging.Infoby default.parameter_strategyprescribes the way the parameter in the resulting system will be recognized::inheritance(default) the parameters in the new system are exactly combinations of the original parameters:constantsthe parameters in the new system will be the variables with zero dynamics:none- no parameters in the result
Example:
julia> using ExactODEReduction
julia> odes = @ODEsystem(
x'(t) = x + y,
y'(t) = x - y - z,
z'(t) = 2x - z
)
julia> find_smallest_constrained_reduction(odes, [x + (1//2)*z])
Reduction of dimension 2.
New system:
y1'(t) = 2*y1(t) + y2(t)
y2'(t) = -2*y1(t) - y2(t)
New variables:
y1 = x + 1//2*z
y2 = y - 3//2*zExactODEReduction.find_some_reduction — Functionfind_some_reduction(system::ODE; overQ, seed, makepositive, loglevel, parameter_strategy)Finds a nontrivial linear reduction of the system. If there exists a reduction, it will be found.
Arguments:
systemis an ODE system given asODEobject,overQtells the algorithm to search for reductions over rational numbers. Istrueby default,seedis a seed for the random number generator,makepositivetells the algorithm to search for reductions with positive coefficients.falseby default.
To enable this argument, you should have Polymake.jl imported.
loglevelis a level of logging.Logging.Infoby default.parameter_strategyprescribes the way the parameter in the resulting system will be recognized::inheritance(default) the parameters in the new system are exactly combinations of the original parameters:constantsthe parameters in the new system will be the variables with zero dynamics:none- no parameters in the result
Example:
julia> using ExactODEReduction
julia> odes = @ODEsystem(
x'(t) = x + y,
y'(t) = x - y - z,
z'(t) = 2x - z
)
julia> find_some_reduction(odes)
Reduction of dimension 1.
New system:
y1'(t) = -2*y1(t)
New variables:
y1 = x - y - zExploring found reductions
The functions find_some_reduction and find_smallest_constrained_reduction return a Reduction object.
ExactODEReduction.Reduction — TypeReductionRepresents a single reduction of some ODE system. This is returned from reduction functions.
Example:
using ExactODEReduction
odes = @ODEsystem(
x'(t) = x + y,
y'(t) = x - y - z,
z'(t) = 2x - z
)
reduction = find_some_reduction(odes)
## prints
Reduction of dimension 1.
New system:
y1'(t) = y1(t)
New variables:
y1 = x + 1//2*y - 1//4*z
new_system(reduction)
## prints
y1'(t) = y1(t)
new_vars(reduction)
## prints
Dict{Nemo.fmpq_mpoly, Nemo.fmpq_mpoly} with 1 entry:
y1 => x + 1//2*y - 1//4*zExactODEReduction.new_system — Functionnew_system(r::Reduction)Returns the ODE object that defines the reduced system.
ExactODEReduction.new_vars — Functionnew_system(r::Reduction)Returns the dictionary of new macro-variables expressed as linear combinations of the original variables.
ExactODEReduction.old_system — Functionold_system(r::Reduction)Returns the ODE object that defines the original system.
ExactODEReduction.new_initialconds — Functionnew_initialconds(r::Reduction, ics::Dict)Returns a dictionary of initial conditions for the new variables as defined by the given reduction.
ExactODEReduction.reduce_data — Functionreduce_data(data::Array{Any, 2}, r::Reduction)For a time-series data for the original system, returns the corresponding time series for the reduction
The function find_reduction returns a ChainOfReductions object, which, in practice, can be treated as Vector{Reduction}.
ExactODEReduction.ChainOfReductions — TypeReductionRepresents a chain of Reductions of some ODE system. This is returned from the find_reductions function.
Example:
using ExactODEReduction
odes = @ODEsystem(
x'(t) = x + y,
y'(t) = x - y - z,
z'(t) = 2x - z
)
reductions = find_reductions(odes)
## prints
A chain of 2 reductions of dimensions 1, 2.
==================================
1. Reduction of dimension 1.
New system:
y1'(t) = y1(t)
New variables:
y1 = x + 1//2*y - 1//4*z
==================================
2. Reduction of dimension 2.
New system:
y1'(t) = y2(t)
y2'(t) = 2*y1(t) - y2(t)
New variables:
y1 = x - 1//2*z
y2 = y + 1//2*z
reduction2 = reductions[2]
## prints
Reduction of dimension 2.
New system:
y1'(t) = y2(t)
y2'(t) = 2*y1(t) - y2(t)
New variables:
y1 = x - 1//2*z
y2 = y + 1//2*z
Base.length — Methodlength(cor::ChainOfReductions)Returns the number of reductions in the chain.
Base.getindex — Methodgetindex(cor::ChainOfReductions, i::Integer)Returns the i-th reduction in the chain. Returned object is of type Reduction.