33 lines
927 B
Python
33 lines
927 B
Python
|
|
"""
|
||
|
|
Atomizer Plugin System
|
||
|
|
|
||
|
|
Enables extensibility through hooks at various stages of the optimization lifecycle.
|
||
|
|
|
||
|
|
Hook Points:
|
||
|
|
- pre_mesh: Before meshing operations
|
||
|
|
- post_mesh: After meshing, before solve
|
||
|
|
- pre_solve: Before solver execution
|
||
|
|
- post_solve: After solve, before result extraction
|
||
|
|
- post_extraction: After result extraction, before objective calculation
|
||
|
|
- custom_objectives: Custom objective/constraint functions
|
||
|
|
|
||
|
|
Usage:
|
||
|
|
from optimization_engine.plugins import HookManager
|
||
|
|
|
||
|
|
hook_manager = HookManager()
|
||
|
|
hook_manager.register_hook('pre_solve', my_custom_function)
|
||
|
|
hook_manager.execute_hooks('pre_solve', context={'trial_number': 5})
|
||
|
|
"""
|
||
|
|
|
||
|
|
from .hooks import Hook, HookPoint
|
||
|
|
from .hook_manager import HookManager
|
||
|
|
from .validators import validate_plugin_code, PluginValidationError
|
||
|
|
|
||
|
|
__all__ = [
|
||
|
|
'Hook',
|
||
|
|
'HookPoint',
|
||
|
|
'HookManager',
|
||
|
|
'validate_plugin_code',
|
||
|
|
'PluginValidationError'
|
||
|
|
]
|