Maintenance Deferral & Run-Until-Repair Decision Framework - #2086
Open
EvenSol wants to merge 1 commit into
Open
Conversation
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Maintenance Deferral & Run-Until-Repair Decision Framework
Summary
Adds a new
neqsim.process.maintenancepackage that enables AI agents andengineers to assess whether scheduled maintenance on process equipment can be
safely deferred. The framework wires equipment degradation physics (fouling,
efficiency loss) into the existing simulation engine, then layers health
assessment and a rule-based decision engine on top.
Motivation
Maintenance deferral is a common operational decision in oil & gas facilities.
Operators frequently ask: "Can we delay this compressor overhaul by 30 days
until the next planned shutdown?" Answering this rigorously requires:
NeqSim already had
degradationFactor,foulingFactor, andCompressorWashingclasses, but none of these were connected to the actual simulation calculations.
This PR wires them in and builds the decision-support layer on top.
Changes
Phase 1 — Equipment Degradation Wiring
Compressor.java(modified)degradationFactorandfoulingFactoracross all 6 calculationpaths in
run():applyWashing(CompressorWashing.WashingMethod)— reduces foulingFactorby the method's recovery effectiveness
incrementOperatingHours(double hours, double foulingRatePerHour)—increments hours counter and applies linear fouling model
incrementOperatingHours(double hours)— hours-only overloadHeatExchanger.java(modified)FoulingModelfield with getter/setterrun(): computes effective UA as1 / (1/UA_clean + R_fouling)when a fouling model is attachedgetEffectiveUA()methodPhase 2 — Health Assessment
EquipmentHealthAssessment.java(new)indicators (50%)
ConditionIndicatorinner class for vibration, temperature, etc.Phase 3 — Decision Engine
MaintenanceDeferralAssessment.java(new)DeferralDecision.java(new)TemporaryOperatingEnvelope.java(new)isWithinEnvelope()bounds checkingPhase 4 — Plant-Wide Coordination
PlantDeferralCoordinator.java(new)ProcessSystemautoAssessCompressors()reads degradation/fouling from live compressor objectsDocumentation
docs/process/maintenance-deferral-framework.md— Full user guide witharchitecture diagram, code examples, and class reference
docs/REFERENCE_MANUAL_INDEX.mdwith new entryTests
MaintenanceDeferralTest.java— 15 JUnit 5 tests:applyWashing()reduces fouling factorincrementOperatingHours()tracks hours and foulingFiles Changed
src/main/java/neqsim/process/equipment/compressor/Compressor.javasrc/main/java/neqsim/process/equipment/heatexchanger/HeatExchanger.javasrc/main/java/neqsim/process/maintenance/package-info.javasrc/main/java/neqsim/process/maintenance/EquipmentHealthAssessment.javasrc/main/java/neqsim/process/maintenance/MaintenanceDeferralAssessment.javasrc/main/java/neqsim/process/maintenance/DeferralDecision.javasrc/main/java/neqsim/process/maintenance/TemporaryOperatingEnvelope.javasrc/main/java/neqsim/process/maintenance/PlantDeferralCoordinator.javasrc/test/java/neqsim/process/maintenance/MaintenanceDeferralTest.javadocs/process/maintenance-deferral-framework.mddocs/REFERENCE_MANUAL_INDEX.mdTesting
Java 8 Compatibility
All new code uses Java 8 features only. No
var,List.of(),Map.of(),String.repeat(), or other Java 9+ constructs.Future Work (not in this PR)
predict future performance and production impact
ProcessAutomationfor string-addressable health queries