Commit 0764d781 authored by Jean-Paul Smets's avatar Jean-Paul Smets

First version of target_solver refactored interface. Names do not conflict...

First version of target_solver refactored interface. Names do not conflict with existing solvers because target solvers are now ERP5 Documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30380 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5384cc5f
...@@ -30,6 +30,46 @@ ...@@ -30,6 +30,46 @@
from zope.interface import Interface from zope.interface import Interface
class ITargetSolver(Interface): class ITargetSolver(Interface):
"""Solves changes of properties up to simulation tree with taking proper decisions""" """Target Solver interface specification
# placeholder to define
pass This interface must be implemented by all target solvers
which are used to solve divergences in ERP5 simulation. Documents
which implemet ITargetSolver provide a solve method.
Besides ITargetSolver static interface definition, target solvers
must support IDeliveryGetter to access simulation movements to solve.
TODO-XXX:
- find a way to make static interfaces inherit from
dynamic interfaces in ERP5 (ex. solver process workflow)
- IDeliveryGetter is not appropriate name / interface
- find a way to define at which level to solve divergences
(ex. line, delivery)
"""
def solve():
"""
Start the solving process (and trigger the workflow method
in solver_process_workflow). At the end the solving process,
appropriate methods of the solver_process_workflow must be invoked
(ex. succeed, fail, abort).
"""
def isSolving():
"""
Returns True if the solver processing in ongoing. False else.
"""
def isSolved():
"""
Returns True if all divergences are solved, False else.
"""
def isFailed():
"""
Returns True if divergence resolution fails. False else.
"""
def isAborted():
"""
Returns True if divergence resolution was aborted. False else.
"""
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment