I telecharged your worksheet and it is very optimized. Thank you.
Although, the problem of range and singularity exist when I change the parameter C and range. Variables of the model should be null when C<40e-6 and can be not null when C>40e-6 with imposing high range.
I read Maple help and I found that the DAE can solve systems of ODE for high range without writing the system as dy/dt = f.
The problem is how to re-write the system with the existing of piecewise functions, add them as niew variables and solve the system of ODE using DAE.
I don't know if DAE is a good idea, but I think it is the only solution for problem of range and singularity.
I posted a simplified example of the system with less piecewise functions if it can be re-written as DAE. dae.mw