On The Maintenance Modeling And Optimization Of Repairable Systems: Two Different Scenarios