Simulation of multiscale circuit problems using equivalence principle algorithm