Class PredictionResult
java.lang.Object
neqsim.process.advisory.PredictionResult
- All Implemented Interfaces:
Serializable
Represents the result of a look-ahead prediction for advisory systems.
This class provides structured output for predictive simulations that support real-time advisory systems. Key features:
- Time Horizon: Predictions from minutes to days ahead
- Uncertainty Bounds: Confidence intervals for predicted values
- Constraint Checking: Which limits may be violated and when
- Explanation: Human-readable description of prediction drivers
Usage Example:
// Run look-ahead simulation
PredictionResult prediction = processSystem.predictAhead(Duration.ofHours(2));
// Check for issues
if (prediction.hasViolations()) {
System.out.println("Warning: " + prediction.getViolationSummary());
}
// Get predicted values with uncertainty
PredictedValue pressure = prediction.getValue("separator.pressure");
System.out.println("Predicted pressure: " + pressure.getMean() + " ± "
+ pressure.getStandardDeviation() + " " + pressure.getUnit());
// Use in advisory system
String advice = prediction.getAdvisoryRecommendation();
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA predicted constraint violation.static classA predicted value with uncertainty bounds.static enumStatus of the prediction calculation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate final Durationprivate doubleprivate final Map<String, PredictionResult.PredictedValue> private final Instantprivate final Stringprivate static final longprivate final List<PredictionResult.ConstraintViolation> -
Constructor Summary
ConstructorsConstructorDescriptionPredictionResult(Duration horizon) Creates a simple prediction result with default settings.PredictionResult(Duration horizon, String scenarioName) Creates a new prediction result. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssumption(String assumption) Adds an assumption used in the prediction.voidaddPredictedValue(String variableName, PredictionResult.PredictedValue value) Adds a predicted value to the result.voidaddViolation(PredictionResult.ConstraintViolation violation) Records a constraint violation prediction.private StringGets an advisory recommendation based on the prediction.doubleGets a predicted value by variable name.Gets a summary of predicted violations.booleanChecks if any constraint violations are predicted.voidsetExplanation(String explanation) voidsetOverallConfidence(double confidence) void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
predictionTime
-
horizon
-
scenarioName
-
predictedValues
-
violations
-
assumptions
-
explanation
-
overallConfidence
private double overallConfidence -
status
-
-
Constructor Details
-
PredictionResult
-
PredictionResult
Creates a simple prediction result with default settings.- Parameters:
horizon- the prediction time horizon
-
-
Method Details
-
addPredictedValue
Adds a predicted value to the result.- Parameters:
variableName- the variable name (e.g., "separator.pressure")value- the predicted value with uncertainty
-
addViolation
Records a constraint violation prediction.- Parameters:
violation- the predicted violation
-
addAssumption
Adds an assumption used in the prediction.- Parameters:
assumption- description of the assumption
-
getValue
Gets a predicted value by variable name.- Parameters:
variableName- the variable to retrieve- Returns:
- the predicted value, or null if not found
-
hasViolations
public boolean hasViolations()Checks if any constraint violations are predicted.- Returns:
- true if violations are expected
-
getViolationSummary
Gets a summary of predicted violations.- Returns:
- human-readable summary
-
getAdvisoryRecommendation
Gets an advisory recommendation based on the prediction.- Returns:
- recommendation for operators
-
formatDuration
-
getPredictionTime
-
getHorizon
-
getScenarioName
-
getAllPredictedValues
-
getViolations
-
getAssumptions
-
getExplanation
-
setExplanation
-
getOverallConfidence
public double getOverallConfidence() -
setOverallConfidence
public void setOverallConfidence(double confidence) -
getStatus
-
setStatus
-