Adding switch gives an error in Proteus
Switches are not easy to model, particularly ideal ones. These introduce instantaneous current discontinuities. 

Circuit modeling software is just a differential equation solver with a circuit-based interface. A variable discontinuity in time is what is known as a “shock” in diffeq parlance.

Shocks require specialized algorithms to handle them.  A normal algorithm would just try to reduce the simulation time step size until it hits the resolution limit, that’s the error you are getting. 

You should be able to model it by making the switch more real, by placing a very small  capacitor (a few pF) in parallel with it. But there is no guarantee as a discontinuity in a branch current will still be present. 

The proper way would be to specify a switch model that avoids all the discontinuities altogether (e.g., a resistor whose value quickly increases), but I am not sure if Proteus allows for that.