Fault-modeling algorithm