07p/demos/python/demo2.auto
raw| 1 | demo('bvp') |
| 2 | |
| 3 | bvp = run('bvp') |
| 4 | branchpoints = bvp("BP") |
| 5 | for solution in branchpoints: |
| 6 | bp = load(solution, ISW=-1, NTST=50) |
| 7 | # Compute forwards |
| 8 | print "Solution label", bp["LAB"], "forwards" |
| 9 | fw = run(bp) |
| 10 | # Compute backwards |
| 11 | print "Solution label", bp["LAB"], "backwards" |
| 12 | bw = run(bp,DS='-') |
| 13 | both = fw + bw |
| 14 | merged = merge(both) |
| 15 | bvp = bvp + merged |
| 16 | |
| 17 | bvp=relabel(bvp) |
| 18 | save(bvp, 'bvp') |
| 19 | plot(bvp) |
| 20 | wait() |