Commit d90c6e8a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

code cleanup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30435 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ca536f1
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com> # Łukasz Nowak <luke@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
...@@ -32,20 +32,22 @@ from zope.interface import Interface ...@@ -32,20 +32,22 @@ from zope.interface import Interface
class IDeliverySolver(Interface): class IDeliverySolver(Interface):
"""Delivery Solver interface specification """Delivery Solver interface specification
This interface must be implemented by all delivery solvers This interface must be implemented by all delivery solvers which are
which are used to solve quantity related divergences in ERP5 simulation. used to solve quantity related divergences in ERP5 simulation.
Delivery solvers are usually built by SolverTool and invoked by target solvers. Delivery solvers are usually built by SolverTool and invoked by target
solvers.
Delivery solvers are initialised with a list of simulation movements Delivery solvers are initialised with a list of simulation movements
and provide methods (setQuantity, getQuantity) to manipulate the total and provide methods (setQuantity, getQuantity) to manipulate the total
quantity of movements. quantity of movements.
""" """
def __init__(movement_list): def __init__(movement_list):
""" """
Initialises the delivery solver. Initialises the delivery solver.
movement_list -- a list of simulation movement on which delivery solver operates movement_list -- a list of simulation movement on which delivery
solver operates
""" """
def getTotalQuantity(): def getTotalQuantity():
...@@ -56,9 +58,10 @@ class IDeliverySolver(Interface): ...@@ -56,9 +58,10 @@ class IDeliverySolver(Interface):
def setTotalQuantity(quantity): def setTotalQuantity(quantity):
""" """
Sets the total quantity of simulation movements by increasing or reducing Sets the total quantity of simulation movements by increasing or
the quantity and ratio of each simulation movement. This method reducing the quantity and ratio of each simulation movement. This
implements the solver specific algorith (ex. FIFO, LIFO, average, least cost) method implements the solver specific algorith (ex. FIFO, LIFO,
average, least cost)
NOTE: is this the right place to update delivery ratio ? NOTE: is this the right place to update delivery ratio ?
""" """
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
# Jean-Paul Smets-Solanes <jp@nexedi.com> # Jean-Paul Smets-Solanes <jp@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs # consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial # End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software # guarantees and support are strongly adviced to contract a Free Software
# Service Company # Service Company
# #
# This program is Free Software; you can redistribute it and/or # This program is Free Software; you can redistribute it and/or
...@@ -39,7 +39,7 @@ class IDeliverySolverFactory(Interface): ...@@ -39,7 +39,7 @@ class IDeliverySolverFactory(Interface):
NOTE: NOTE:
- wouldn't it be better to use ERP5 document - wouldn't it be better to use ERP5 document
classes for delivery solvers. classes for delivery solvers.
(only meaningful reason: use activities to (only meaningful reason: use activities to
setTotalQuantity on 10,000+ movements) setTotalQuantity on 10,000+ movements)
""" """
...@@ -49,7 +49,7 @@ class IDeliverySolverFactory(Interface): ...@@ -49,7 +49,7 @@ class IDeliverySolverFactory(Interface):
class_name and with appropriate parameters. class_name and with appropriate parameters.
class_name -- the class name of the delivery solver. class_name -- the class name of the delivery solver.
movement_list -- movements to initialise the instance with movement_list -- movements to initialise the instance with
""" """
...@@ -64,7 +64,7 @@ class IDeliverySolverFactory(Interface): ...@@ -64,7 +64,7 @@ class IDeliverySolverFactory(Interface):
delivery solvers. Use this method to fill listfields in user interface delivery solvers. Use this method to fill listfields in user interface
forms. forms.
class_name_list -- optionnal parameter to filter results only class_name_list -- optional parameter to filter results only
with provided class names with provided class names
""" """
...@@ -82,4 +82,4 @@ class IDeliverySolverFactory(Interface): ...@@ -82,4 +82,4 @@ class IDeliverySolverFactory(Interface):
delivery solver with given class_name delivery solver with given class_name
class_name -- the class name of a delivery solver class_name -- the class name of a delivery solver
""" """
\ 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