JuliaDynamics / PeriodicOrbits.jl

Interface and algorithms for finding periodic orbits (stable or unstable) in dynamical systems
https://juliadynamics.github.io/PeriodicOrbits.jl/
Other
8 stars 2 forks source link

Optimized shooting method #3

Closed JonasKoziorek closed 1 week ago

JonasKoziorek commented 2 months ago

I implemented recent paper that searches for UPOs via optimization (link). The paper also includes python implementation in the appendix.

My implementation has a few potential problems, that should be addressed:

Datseris commented 2 months ago

cc also @rveltz : if you know this algorithm, let's make sure that we aren't duplicating effort. If something like this is in BFKit, or parts of the code have been tried in BFKit, let's reuse the knowledge.

Datseris commented 2 months ago

@JonasKoziorek can you please write a brief summary of the status of this PR? Does the algorithm work, does it not? If not, when does it not work?

JonasKoziorek commented 2 months ago

@JonasKoziorek can you please write a brief summary of the status of this PR? Does the algorithm work, does it not? If not, when does it not work?

The algorithm works. I have found several UPOs of Lorenz and Roessler systems. One example can be seen in the docs. These are the issues before finishing the PR:

  1. find out which ODE solver can be used - right now I only had success with RKO65
  2. don't create a new dynamical systems in every step of the optimization process
  3. allow the user to modify the residual: The residual implicitly depends on these quantities: point in a state space x,y,z..., period T and parameters of the ds p. This residual can be changed to achieve different goals. One form of the residual is looking for optimal values of x,y,z... and T with p fixed. (we have this right now) Other form of the residual would be to look for optimal p but leave x,y,z... and T fixed. This would allow the user to find the parameters p which have a PO of period T going through point x,y,z.... In principle any of the quantities can be fixed and the others left for optimization.
JonasKoziorek commented 2 months ago

Everything works as we discussed today. true in step was causing those problems.

Datseris commented 2 months ago

perfect!

JonasKoziorek commented 1 month ago

I tried to make it faster but with no success. Even though I reduced allocations almost in half, the runtime wasn't faster. Let's try profiling together next time then!

JonasKoziorek commented 1 month ago

The minimal_period was messing up one of the tests so I disabled it for now. I will allow passing kwargs to minimal_period in a different PR to be able to affect the precision.

JonasKoziorek commented 1 week ago

I suddenly can't build the docs. I attach the stacktrace.txt here. It originates in build_docs_with_style.jl line 30. Commenting this line solves the problem. Could you help me with this @datseris?

Datseris commented 1 week ago

docbuild problem comes from Documenter.jl. We can't resolve it :( :( :( cc @Tortar , I searched throught the JuliaDynamics/doctheme repo, we don't have $todo anywhere. It has to be from Documenter.jl.