I had an almost identical question (1st one) a couple weeks ago. I am copy/paste my answer below. It has an extra timing challenge, but the maintenance avoidance piece is same.
Depending on when one wants to start maintenance after delay the planned one, it may be possible to craft a RSS. I attach a partially finished diagram. We named components Boilers. I will attach a partial example showing the logic. I only made changes to Boiler1, similar changes need to be done on Boiler2. I am not able to give the complete logic because the description is not clear to me.
The example that was given to me has preventive maintenance completion time triangularly distributed between 0.5 and 5, so the max is 5.
Also the example scheduled preventive maintenance at 22, 22+24, 22+24*2, ....
Now let’s make scheduling at 22, 22+24, etc.
- Add 1 Scheduled event, with Recurring Interval = 22, and Max Occurrence = 1. So it only run once, at 22.
- Link it to three actions, all triggered at time 22:
- Check and if Boiler2 is NOT ok. This link to an Schedule ACTION with Max Occurrence = 1 and Completion Time = 5, so it will fire up 5 hours later. Notice after 5 hours, Boiler 2 must be up, due to maintenance completion setting. The Schedule Action links to a minimal repair action.
- Check and if Boiler2 IS ok. Then links to a minimal repair action.
- Start a new Schedule ACTION with Max Occurrence MISSING, and completing time = 24. So this guy will fire up every 24 hours after 22. And this node links to nodes same as (a) and (b) above.
- Boiler 2 should do similar things, but conditioning on Boiler 1.
If one wants to start Boiler 1 precisely when Boiler 2 is fixed and back on, it is impossible now.
I don't understand the second question, but I believe that the solution will be about how to weave either Scheduled event or Schedule actions, or both, with desired events.