Commit 5384cc5f authored by Jean-Paul Smets's avatar Jean-Paul Smets

First version of delivery_solver refactored interface. Names were chosen not...

First version of delivery_solver refactored interface. Names were chosen not to conflict with existing solvers and to show that delivery solvers are about quantity.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30379 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b4a50aa
...@@ -30,7 +30,35 @@ ...@@ -30,7 +30,35 @@
from zope.interface import Interface from zope.interface import Interface
class IDeliverySolver(Interface): class IDeliverySolver(Interface):
"""Solves quantity values between delivery line and related simulation movements""" """Delivery Solver interface specification
# placeholder to define
pass
This interface must be implemented by all delivery solvers
which are used to solve quantity related divergences in ERP5 simulation.
Delivery solvers are usually built by SolverTool and invoked by target solvers.
Delivery solvers are initialised with a list of simulation movements
and provide methods (setQuantity, getQuantity) to manipulate the total
quantity of movements.
"""
def __init__(movement_list):
"""
Initialises the delivery solver.
movement_list -- a list of simulation movement on which delivery solver operates
"""
def getTotalQuantity():
"""
Return the total quantity by summing the quantity of each simulation
movement.
"""
def setTotalQuantity(quantity):
"""
Sets the total quantity of simulation movements by increasing or reducing
the quantity and ratio of each simulation movement. This method
implements the solver specific algorith (ex. FIFO, LIFO, average, least cost)
NOTE: is this the right place to update delivery ratio ?
"""
\ 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