Package org.drools.planner.core.move

Examples of org.drools.planner.core.move.CompositeMove


                }
                moveList.set(i, moveIterator.next());
            }
            // No need to clone to avoid CompositeMove corruption because subSelections's elements never change
            subSelections = moveList;
            upcomingSelection = new CompositeMove(moveList);
        }
View Full Code Here


                        throw new NoSuchElementException("The moveSelector (" + moveSelector + ") is empty.");
                    }
                }
                moveList.add(moveIterator.next());
            }
            return new CompositeMove(moveList);
        }
View Full Code Here

                            moveIterator = planningValueWalkerList.get(i).moveIterator(planningEntity);
                            moveIteratorList.set(i, moveIterator);
                            composedMoveList.set(i, moveIterator.next());
                        }
                    }
                    return new CompositeMove(new ArrayList<Move>(composedMoveList));
                }

                public void remove() {
                    throw new UnsupportedOperationException();
                }
View Full Code Here

                        moveListByPillarPartDuo.add(new EmployeeMultipleChangeMove(
                                pillarPartAssignmentSequence.getEmployee(),
                                pillarPartAssignmentSequence.getShiftAssignmentList(),
                                otherEmployee));
                    }
                    moveList.add(new CompositeMove(moveListByPillarPartDuo));
                }
            }
        }
        return moveList;
    }
View Full Code Here

                                }
                                for (ShiftAssignment rightShiftAssignment : rightShiftAssignmentList
                                        .subList(rightIndex, rightIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(rightShiftAssignment, leftEmployee));
                                }
                                moveList.add(new CompositeMove(subMoveList));
                            }
                        }
                    }
                }
            }
View Full Code Here

                                }
                                for (ShiftAssignment rightShiftAssignment : rightShiftAssignmentList
                                        .subList(rightIndex, rightIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(rightShiftAssignment, leftEmployee));
                                }
                                moveList.add(new CompositeMove(subMoveList));
                            }
                        }
                    }
                }
            }
View Full Code Here

                            otherBed = leftBed;
                            rightMinimumFirstNightIndex = Math.max(rightMinimumFirstNightIndex, lastNightIndex);
                        }
                        moveListByPillarPartDuo.add(new BedChangeMove(pillarPartBedDesignation, otherBed));
                    }
                    moveList.add(new CompositeMove(moveListByPillarPartDuo));
                }
            }
        }
        return moveList;
    }
View Full Code Here

    private static CodeAssertable convertToCodeAssertable(Object o) {
        assertNotNull(o);
        if (o instanceof CodeAssertable) {
            return (CodeAssertable) o;
        } else if (o instanceof CompositeMove) {
            CompositeMove compositeMove = (CompositeMove) o;
            StringBuilder codeBuilder = new StringBuilder(compositeMove.getMoveList().size() * 80);
            for (Move move : compositeMove.getMoveList()) {
                codeBuilder.append("+").append(convertToCodeAssertable(move).getCode());
            }
            final String code = codeBuilder.substring(1);
            return new CodeAssertable() {
                public String getCode() {
View Full Code Here

                            moveIterator = planningValueWalkerList.get(i).moveIterator(planningEntity);
                            moveIteratorList.set(i, moveIterator);
                            composedMoveList.set(i, moveIterator.next());
                        }
                    }
                    return new CompositeMove(new ArrayList<Move>(composedMoveList));
                }

                public void remove() {
                    throw new UnsupportedOperationException();
                }
View Full Code Here

                            otherBed = leftBed;
                            rightMinimumFirstNightIndex = Math.max(rightMinimumFirstNightIndex, lastNightIndex);
                        }
                        moveListByPillarPartDuo.add(new BedChangeMove(pillarPartBedDesignation, otherBed));
                    }
                    moveList.add(new CompositeMove(moveListByPillarPartDuo));
                }
            }
        }
        return moveList;
    }
View Full Code Here

TOP

Related Classes of org.drools.planner.core.move.CompositeMove

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.