Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple continuation of root in parameter space #605

Open
volkerkarle opened this issue Nov 25, 2024 · 6 comments
Open

simple continuation of root in parameter space #605

volkerkarle opened this issue Nov 25, 2024 · 6 comments

Comments

@volkerkarle
Copy link

Dear creators,

I might be a little bit dump, please forgive me, but I tried to dig through the examples and was not able to produce a simple working example of a simple root continuation problem.

  1. Assume I have some level set f(x,a)=0 with x∈ ℝⁿ, a∈ ℝᵐ for which I know some initial value (x₀,a₀) and the final value (xₜ,aₜ). We know that the root manifold is (at least) one-dimensional. What I need is something like an array [(x₀,a₀),(x₁,a₁),(x₂,a₂),...,(xₜ,aₜ)] as an output, how do I achieve that? If it's a smooth function with g(t) such that g(0) = (xₜ,aₜ), g(1)=(x₀,a₀), even better.
  2. Can we do it in such a way that once a bifurcation or something similar (a critical point, maybe) is encountered, it stops, so we can decide what do do (or maybe follow each one)?
  3. if the manifold is d-dimensional, can we somehow get the tangent space instead of the parametrization?

Thanks a lot! please let me know if you need more information.

@PBrdng
Copy link
Collaborator

PBrdng commented Nov 26, 2024

Hi,

I think what you are looking for is the code in this example.

The vector Xs in that example contains all points computed along the homotopy. This works for any number of paramaters, hence when your manifold is of the form $ M={x\in\mathbb R^n \mid x = f(y), y\in\mathbb R^m}$ for some vector of polynomials $f$ in $m$ variables, you can do the same thing. However, when you have varieties/manifolds that are not parametric things get complicated and we would have to discuss a little more for me to understand what one can do.

Hope this helps for the moment.

@volkerkarle
Copy link
Author

Thanks for the fast answer! I have to admit that I'm still confused from the example. Let's take this case of F = System([x^2 - a, x * y - a + b], [x, y], [a, b]), what would be the syntax to get the arrays x = [x₀, ... xₜ], y = [y₀, ... yₜ], a = [a₀, ... aₜ], b= [b₀, ... bₜ] such that we go from some start parameters (a₀,b₀) to some final parameters (a₀, bₜ)?

@PBrdng
Copy link
Collaborator

PBrdng commented Nov 26, 2024

That would be:

@var x a y b
F = System([x^2 - a, x * y - a + b], [x, y], [a, b])
tracker = Tracker(ParameterHomotopy(F, [1, 0], [2, 4]))
s = [1, 1]

ct = Tracker(
    ParameterHomotopy(F, [1, 0], [2, 4])
)
Xs = Vector{ComplexF64}[]
Ts = Vector{Float64}()
for (x, t) in iterator(ct, [1.0], 1.0, 0.0)
    push!(Xs, x)
    push!(Ts, t)
end

ABs = [t .* [1, 0] + (1-t) .* [2, 4] for t in Ts]

@volkerkarle
Copy link
Author

Thanks, that is clarifying. I see now that this is not exactly what I was searching for, as it assumes the parameters of the form
b(t) = b₀ (1-t) + bₜ t , however, there might not exist a solution for this path, maybe it is curved? Take for example,

image

we can start with x₀=1 and take y as parameter with y₀=0. Then, there will be a root at y>0, but only until y=1, then we have to go down. How can we track this circle?

@saschatimme
Copy link
Member

There's also https://github.com/bifurcationkit/BifurcationKit.jl which should be suited more likely better for this use case

@PBrdng
Copy link
Collaborator

PBrdng commented Nov 27, 2024

Yes, BifurcationKit.jl is probably the way to go.

Nevertheless, if you want to track the circle, it can be done but requires some work.

Parameter homotopies are always of the form $F(x, tp + (1-t)q)$, where $F(x,p)$ is a system of polynomials with variables $x$ and parameters $p$. Our implementation assumes that the parameters enter polynomially. That is why tracking a circle is not possible with ParameterHomotopy.

However, you could take the code of ParameterHomotopy and design a custom homotopy for your needs. For instance, say you wanted to use $\cos(t)p+\sin(t)q$, then I guess one would only need to update the tp! function (but I haven't checked in detail).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants