Commit 8aee3f96 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use the same solver for accepting and adopting start date divergence.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31749 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 22fb3b72
......@@ -366,6 +366,27 @@ class TestERP5SimulationPackingList(TestERP5SimulationMixin, TestPackingList):
solver_process.contentValues()):
# use StartDate Replacement Solver.
start_date_solver_decision.setSolverValue(self.portal.portal_types['Start Date Replacement Solver'])
# configure for Quantity Split Solver.
kw = {'value':packing_list.getStartDate()}
start_date_solver_decision.updateConfiguration(**kw)
solver_process.buildTargetSolverList()
solver_process.solve()
def stepUnifyStartDateWithPrevision(self,sequence=None, sequence_list=None, **kw):
"""
Check if simulation movement are disconnected
"""
packing_list = sequence.get('packing_list')
solver_tool = self.portal.portal_solvers
solver_process = solver_tool.newSolverProcess(packing_list)
for start_date_solver_decision in filter(
lambda x:x.getCausalityValue().getTestedProperty()=='start_date',
solver_process.contentValues()):
# use StartDate Replacement Solver.
start_date_solver_decision.setSolverValue(self.portal.portal_types['Start Date Replacement Solver'])
# configure for Quantity Split Solver.
kw = {'value':packing_list.contentValues()[-1].getDeliveryRelatedValue().getStartDate()}
start_date_solver_decision.updateConfiguration(**kw)
solver_process.buildTargetSolverList()
solver_process.solve()
......
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