Class ProcessSystemContract
java.lang.Object
neqsim.util.validation.contracts.ProcessSystemContract
- All Implemented Interfaces:
ModuleContract<ProcessSystem>
Contract for process systems (flowsheets).
Defines requirements and guarantees for ProcessSystem implementations. AI agents can use
this contract to validate entire process flowsheets before running simulations.
Preconditions (what the process system needs):
- At least one unit operation
- All equipment properly connected
- Feed streams defined
- No circular dependencies without recycle blocks
Postconditions (what run() provides):
- All equipment calculated
- Recycles converged (if any)
- Material/energy balances satisfied
- Version:
- 1.0
- Author:
- NeqSim
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckPostconditions(ProcessSystem processSystem) Check postconditions after execution.checkPreconditions(ProcessSystem processSystem) Check preconditions before execution.Get the name of this contract.static ProcessSystemContractGet the singleton instance.Get a description of what this module provides.Get a description of what this module requires.validateConnectivity(ProcessSystem processSystem) Validate equipment connectivity.
-
Field Details
-
INSTANCE
Singleton instance.
-
-
Constructor Details
-
ProcessSystemContract
private ProcessSystemContract()
-
-
Method Details
-
getInstance
Get the singleton instance.- Returns:
- contract instance
-
getContractName
Description copied from interface:ModuleContractGet the name of this contract.- Specified by:
getContractNamein interfaceModuleContract<ProcessSystem>- Returns:
- contract name for logging/debugging
-
checkPreconditions
Description copied from interface:ModuleContractCheck preconditions before execution.Validates that all requirements are met before running the module.
- Specified by:
checkPreconditionsin interfaceModuleContract<ProcessSystem>- Parameters:
processSystem- object to validate- Returns:
- validation result with any precondition failures
-
checkPostconditions
Description copied from interface:ModuleContractCheck postconditions after execution.Validates that the module produced valid output.
- Specified by:
checkPostconditionsin interfaceModuleContract<ProcessSystem>- Parameters:
processSystem- object to validate- Returns:
- validation result with any postcondition failures
-
getRequirementsDescription
Description copied from interface:ModuleContractGet a description of what this module requires.AI agents can use this to understand setup requirements.
- Specified by:
getRequirementsDescriptionin interfaceModuleContract<ProcessSystem>- Returns:
- human-readable requirements description
-
getProvidesDescription
Description copied from interface:ModuleContractGet a description of what this module provides.AI agents can use this to understand available outputs.
- Specified by:
getProvidesDescriptionin interfaceModuleContract<ProcessSystem>- Returns:
- human-readable outputs description
-
validateConnectivity
Validate equipment connectivity.Checks that equipment is properly connected via streams.
- Parameters:
processSystem- the process system to validate- Returns:
- validation result
-