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 -*-
##############################################################################
#
# 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>
#
# WARNING: This program as such is intended to be used by professional
......@@ -32,20 +32,22 @@ from zope.interface import Interface
class IDeliverySolver(Interface):
"""Delivery Solver interface specification
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.
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
movement_list -- a list of simulation movement on which delivery
solver operates
"""
def getTotalQuantity():
......@@ -56,9 +58,10 @@ class IDeliverySolver(Interface):
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)
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
"""
......@@ -5,10 +5,10 @@
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# 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
# 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
#
# This program is Free Software; you can redistribute it and/or
......@@ -39,7 +39,7 @@ class IDeliverySolverFactory(Interface):
NOTE:
- wouldn't it be better to use ERP5 document
classes for delivery solvers.
(only meaningful reason: use activities to
(only meaningful reason: use activities to
setTotalQuantity on 10,000+ movements)
"""
......@@ -49,7 +49,7 @@ class IDeliverySolverFactory(Interface):
class_name and with appropriate parameters.
class_name -- the class name of the delivery solver.
movement_list -- movements to initialise the instance with
"""
......@@ -64,7 +64,7 @@ class IDeliverySolverFactory(Interface):
delivery solvers. Use this method to fill listfields in user interface
forms.
class_name_list -- optionnal parameter to filter results only
class_name_list -- optional parameter to filter results only
with provided class names
"""
......@@ -82,4 +82,4 @@ class IDeliverySolverFactory(Interface):
delivery solver with given class_name
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