Package org.optaplanner.examples.nurserostering.solver.move

Examples of org.optaplanner.examples.nurserostering.solver.move.EmployeeChangeMove


                            for (int rightIndex = 0; rightIndex <= rightShiftAssignmentList.size() - SWITCH_LENGTH; rightIndex++) {

                                List<Move> subMoveList = new ArrayList<Move>(SWITCH_LENGTH * 2);
                                for (ShiftAssignment leftShiftAssignment : leftShiftAssignmentList
                                        .subList(leftIndex, leftIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(leftShiftAssignment, rightEmployee));
                                }
                                for (ShiftAssignment rightShiftAssignment : rightShiftAssignmentList
                                        .subList(rightIndex, rightIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(rightShiftAssignment, leftEmployee));
                                }
                                moveList.add(CompositeMove.buildMove(subMoveList));
                            }
                        }
                    }
View Full Code Here


        List<Move> moveList = new ArrayList<Move>();
        List<Employee> employeeList = nurseRoster.getEmployeeList();
        for (ShiftAssignment shiftAssignment : nurseRoster.getShiftAssignmentList()) {
            if (filter.accept(nurseRoster, shiftAssignment)) {
                for (Employee employee : employeeList) {
                    moveList.add(new EmployeeChangeMove(shiftAssignment, employee));
                }
            }
        }
        return moveList;
    }
View Full Code Here

                            for (int rightIndex = 0; rightIndex <= rightShiftAssignmentList.size() - SWITCH_LENGTH; rightIndex++) {

                                List<Move> subMoveList = new ArrayList<Move>(SWITCH_LENGTH * 2);
                                for (ShiftAssignment leftShiftAssignment : leftShiftAssignmentList
                                        .subList(leftIndex, leftIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(leftShiftAssignment, rightEmployee));
                                }
                                for (ShiftAssignment rightShiftAssignment : rightShiftAssignmentList
                                        .subList(rightIndex, rightIndex + SWITCH_LENGTH)) {
                                    subMoveList.add(new EmployeeChangeMove(rightShiftAssignment, leftEmployee));
                                }
                                moveList.add(CompositeMove.buildMove(subMoveList));
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of org.optaplanner.examples.nurserostering.solver.move.EmployeeChangeMove

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.