A Generic Adaptive Simulation Algorithm for Component-based Simulation Systems