In odeint there is no such possibility. And I think that there are no algorithms that could do this. You must somehow encode the binding in your ODE.
If you want to find a binding during the evolution of your system, use a loop like
while( t < tmax ) { stepper.do_step( ode , x , t , dt ); t += dt; if( check_bound( x , t ) ) break; }
Two side nodes, maybe this relates to your problem:
There are special algorithms for ODEs with conservation laws, where the algorithm ensures that the conservation law is fulfilled, for example, symplectic solvers.
If you are bound in some way encoded in your ODE, and the boundary is somehow reached, you should shorten the solution step.
source share