Package neqsim.util.validation.contracts
package neqsim.util.validation.contracts
Module contracts for AI-friendly validation.
This package provides contract interfaces that define preconditions and postconditions for NeqSim modules. AI agents can use these contracts to:
- Validate setup before execution
- Understand what each module requires and provides
- Self-correct when requirements are not met
Available Contracts:
ThermodynamicSystemContract- For SystemInterface implementationsStreamContract- For StreamInterface implementationsSeparatorContract- For Separator equipment
Usage Pattern:
// Before running
StreamContract contract = StreamContract.getInstance();
ValidationResult pre = contract.checkPreconditions(stream);
if (!pre.isValid()) {
System.out.println(pre.getReport());
// Fix issues based on remediation hints
}
stream.run();
// After running
ValidationResult post = contract.checkPostconditions(stream);
if (!post.isValid()) {
// Handle output issues
}
- Since:
- 1.0
-
ClassDescriptionBase interface for module contracts.Contract for process systems (flowsheets).Contract for separator equipment.Contract for process streams.Contract for thermodynamic systems.