Optimizing the maintenance threshold in presence of shocks: A numerical framework for systems with non-monotonic degradation | Synapse