Smrity Mallik · SimulationCode on GitHub

Simulation environment · predictive maintenance

MaintenanceSimEnv: when should an engine be pulled from service?

A fleet of real run-to-failure engines (NASA C-MAPSS, simulated engines with recorded sensor histories). Each prediction comes from a model that never saw that engine. Pull early and you waste life. Run to failure and you pay the failure cost. Everything below updates live when you change a control.

Failure cost is an assumption (default 150 cycles of life). Score = 1 − cost / failure cost; the hindsight optimum pulls one cycle before failure. Fan speed and vibration in the 3D views are illustrations; the sensor traces, predictions and lives are real data.

1. Controls







2. The aircraft

Each engine is a different real record, and they age together. An engine spins faster and shakes as its predicted life shrinks, stops and burns when it fails, and glows green with a ring when it has been pulled. Fan speed N1 scales all fans.


Live chart 1. Predicted remaining life of each engine up to the current cycle. The dashed line is the policy threshold N. The chart draws itself as the cycle advances.
Live chart 2. What it would cost to pull each engine right now: the remaining life it would waste, or the failure cost if it already failed. Green = pulled, red = failed.

3. One engine up close

Pick which engine to inspect. The fan, the air through the bypass (blue-white) and through the core (heated by the real outlet-temperature sensor), and the hot section all follow the controls above.

100 %fan speed N1
0.5vibration index (illustration)
0.5hot-section heat index (real sensor T50 plus N1)
Live chart 3. The last 30 seconds of fan speed, vibration and heat index as you move the controls. Try pushing N1 above 105 %: the blade tips turn red and the vibration climbs.
Live chart 4, real data. Three sensors of the inspected engine, up to the current cycle, each scaled to its own range: LPT outlet temperature, HPC outlet pressure and the fuel-flow ratio. They drift as the engine wears.
Live chart 5, real data. The recorded fan speed sensor (rpm) of the inspected engine. It barely moves (2,387.9 to 2,388.6 in the whole data set) because all engines ran at one fixed operating point. The N1 slider above shows what would change if the speed were different.

4. Play it yourself


Live chart 6. The cost of pulling this engine at each possible cycle. The cost is the waste before the engine fails, and the failure cost afterwards. The dot is your choice; the sharp cliff is the engine's real end of life, which the agent cannot see.

5. How the policy does on all 100 engines

Live chart 7. Every engine, sorted: life wasted when the policy pulled it (blue) or a red bar at the failure cost when it failed. Moves with the policy and N.
Live chart 8. Engines that fail (of 100) as the threshold falls. The point-estimate rule is safe down to about 8 cycles. The marker shows your N.

6. Scores computed in Python

Failure cost 150 (simulation/evaluate_policies.py).

PolicyFailuresMean wasted cyclesMean score