I have a system with two parameters (par1, par2).
After having detected e.g. HB and SN points when continuing as function of par1, I know how to follow these special points as function of par1 and par2.
However, when following the same logic to find TR points, I obtain an error message. Is the followed method correct?
% run1: continuation as functin of par1
...
% get TR label
TR1 = coco_bd_labs('run1', 'TR');
% run2: follow the TR point as function of par1 and par2
coco(prob, 'run2', 'ode', 'TR', 'TR', 'run1', TR1(1), {'par1' 'par2'} {[0 1] [0 1]})
% get last label
TR2 = max(coco_bd_labs('run2'));
% run3: continue to follow the TR point as function of par1 and par2
coco(prob, 'run3', 'ode', 'TR', 'TR', 'run2', TR2(1), {'par1' 'par2'} {[0 10] [0 10]})
Error message:
Index exceeds the number of array elements. Index must not exceed 10.
Error in po_TR_construct_eqn>FDF (line 59)
v2 = u(tr.v2_idx);
Error in efunc_call_F (line 11)
[data, F] = func.F(opts, data, x);
Error in coco_add_func (line 466)
efunc_call_F(prob, func.data, efunc.chart, func, x0);
Error in po_TR_construct_eqn (line 14)
prob = coco_add_func(prob, fid, @FDF, data, 'zero', 'uidx', uidx, ...
Error in po_add_TR (line 80)
[prob, data] = po_TR_construct_eqn(prob, data, sol);
Error in ode_po2TR (line 59)
prob = po_add_TR(prob, data, sol);
Error in ode_TR2TR (line 45)
prob = ctor(prob, oid, str.put(args.run, args.soid, args.lab));
Error in coco (line 166)
prob = run.tbxctor(prob, '', p);
I verified that TR2 (number of the last run stored by run2) is bigger than 10.
Hi Marc,
The
tordemo in thepotoolbox folder shows the continuation of families of saddle-node, period-doubling, and torus bifurcations of periodic orbits. The script syntax you have shown above seems correct, so I am inclined to assume a coding error. Feel free to share your full set of files for debugging, or consider comparing your code against the demo (which I hope runs without difficulty for you).Best,
Harry
Hello, thank you for your answer.
I could not find a coding error so far. However, I was able to reproduce the error by modifing the file
demo.min thetorfolder.1. PD
The figure confirms that an additional part of the PD branch was calculated, starting at its former endpoint with label
Nmax.2. TR
The same error is raised by
bd5b(withNmax=18):I suppose that this would mean that somewhere, the n-th element (n>8) from a vector with length 8 is asked.
Thank you, Marc. I very much appreciate you bringing this to my attention. You have attempted to do something very logical, namely restart continuation of torus bifurcations from a point on a previously computed branch of torus bifurcations. As you note, the same functionality appears to work for period-doubling bifurcations, and it seems very reasonable that
poconstructors should support this. Indeed, I see no reason why they shouldn't. Obviously, I did not test this functionality or else I would have found the culprit:Please replace line 254 in
po_read_solution.mwithPlease let me know if this solves the problem for you.
Best,
Harry
Hello Harry
This works perfectly, thank you!!
Marc