Class AIIntegrationHelper
java.lang.Object
neqsim.util.validation.AIIntegrationHelper
- All Implemented Interfaces:
Serializable
AI Integration Helper for NeqSim.
This class provides a unified entry point for AI/ML agents to interact with NeqSim, combining validation, schema discovery, and RL environment access.
Features:
- Pre-run validation to catch errors before simulation
- API schema discovery for dynamic method documentation
- RL environment creation with built-in constraint validation
- Safe execution wrappers that return structured results
Usage:
// Create AI helper
AIIntegrationHelper helper = AIIntegrationHelper.forProcess(process);
// Get API documentation for AI agent
String apiDocs = helper.getAPIDocumentation();
// Validate before running
if (helper.isReady()) {
helper.safeRun();
} else {
System.out.println(helper.getValidationReport());
}
// Create RL environment
RLEnvironment env = helper.createRLEnvironment();
- Version:
- 1.0
- Author:
- NeqSim
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResult of a safe execution. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ValidationResultprivate final ProcessSystemprivate final AISchemaDiscoveryprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an RL environment for the process.static AIIntegrationHelperforProcess(ProcessSystem process) Create helper for a ProcessSystem.Get API documentation for the process components.String[]Get structured issues for AI parsing.Get the underlying process system.Get a human-readable validation report.booleanisReady()Check if the process is ready to run.safeRun()Safely run the process with validation.validate()Validate the process system.validateEquipment(ProcessEquipmentInterface equipment) Validate a specific equipment piece.validateFluid(SystemInterface system) Validate a thermodynamic system.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
process
-
schemaDiscovery
-
lastValidation
-
-
Constructor Details
-
AIIntegrationHelper
Constructor.- Parameters:
process- process system to manage
-
-
Method Details
-
forProcess
@AIExposable(description="Create an AI integration helper for a process system", category="ai-integration", example="AIIntegrationHelper.forProcess(process)", priority=100, safe=true) public static AIIntegrationHelper forProcess(ProcessSystem process) Create helper for a ProcessSystem.- Parameters:
process- process system to wrap- Returns:
- AI integration helper
-
validate
@AIExposable(description="Validate the process system before running", category="validation", example="helper.validate()", priority=90, safe=true) public ValidationResult validate()Validate the process system.- Returns:
- validation result
-
isReady
@AIExposable(description="Check if the process is ready to run without errors", category="validation", example="if (helper.isReady()) { ... }", priority=95, safe=true) public boolean isReady()Check if the process is ready to run.- Returns:
- true if ready (no critical/major issues)
-
getValidationReport
@AIExposable(description="Get a human-readable validation report", category="validation", example="System.out.println(helper.getValidationReport())", priority=85, safe=true) public String getValidationReport()Get a human-readable validation report.- Returns:
- validation report with issues and remediation hints
-
getIssuesAsText
@AIExposable(description="Get structured validation issues for AI parsing", category="validation", example="String[] issues = helper.getIssuesAsText()", priority=80, safe=true) public String[] getIssuesAsText()Get structured issues for AI parsing.- Returns:
- array of issues as structured text
-
safeRun
@AIExposable(description="Run the process simulation with pre-validation", category="execution", example="ExecutionResult result = helper.safeRun()", priority=75, safe=false) public AIIntegrationHelper.ExecutionResult safeRun()Safely run the process with validation.- Returns:
- execution result with success/failure info
-
getAPIDocumentation
@AIExposable(description="Get API documentation for AI agent consumption", category="discovery", example="String docs = helper.getAPIDocumentation()", priority=100, safe=true) public String getAPIDocumentation()Get API documentation for the process components.- Returns:
- formatted API documentation
-
createRLEnvironment
@AIExposable(description="Create an RL training environment for the process", category="ml", example="RLEnvironment env = helper.createRLEnvironment()", priority=70, safe=true) public RLEnvironment createRLEnvironment()Create an RL environment for the process.The RL environment includes built-in validation constraints.
- Returns:
- configured RL environment
-
validateEquipment
@AIExposable(description="Validate a specific piece of equipment", category="validation", example="ValidationResult result = helper.validateEquipment(separator)", priority=75, safe=true) public ValidationResult validateEquipment(ProcessEquipmentInterface equipment) Validate a specific equipment piece.- Parameters:
equipment- equipment to validate- Returns:
- validation result
-
validateFluid
@AIExposable(description="Validate a thermodynamic system configuration", category="validation", example="ValidationResult result = helper.validateFluid(fluid)", priority=75, safe=true) public ValidationResult validateFluid(SystemInterface system) Validate a thermodynamic system.- Parameters:
system- thermodynamic system to validate- Returns:
- validation result
-
getProcess
-