Package org.drools.planner.examples.tsp.solver.move

Examples of org.drools.planner.examples.tsp.solver.move.SubTourChangeMove


        List<Move> moveList = new ArrayList<Move>();
        List<CityAssignment> cityAssignmentList = travelingSalesmanTour.getCityAssignmentList();
        for (CityAssignment startCityAssignment : cityAssignmentList) {
            for (CityAssignment endCityAssignment : cityAssignmentList) {
                for (CityAssignment toAfterCityAssignment : cityAssignmentList) {
                    moveList.add(new SubTourChangeMove(startCityAssignment, endCityAssignment, toAfterCityAssignment));
                }
            }
        }
        return moveList;
    }
View Full Code Here


            listFieldsPanel.add(afterCityAssignmentListField);
            int result = JOptionPane.showConfirmDialog(TspListPanel.this.getRootPane(), listFieldsPanel,
                    "Select to move after city", JOptionPane.OK_CANCEL_OPTION);
            if (result == JOptionPane.OK_OPTION) {
                CityAssignment toAfterCityAssignment = (CityAssignment) afterCityAssignmentListField.getSelectedItem();
                tspPanel.doMove(new SubTourChangeMove(cityAssignment, cityAssignment, toAfterCityAssignment));
                tspPanel.getWorkflowFrame().updateScreen();
            }
        }
View Full Code Here

TOP

Related Classes of org.drools.planner.examples.tsp.solver.move.SubTourChangeMove

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.