Package org.optaplanner.examples.travelingtournament.domain

Examples of org.optaplanner.examples.travelingtournament.domain.TravelingTournament


        return (TravelingTournament) solutionBusiness.getSolution();
    }

    public void resetPanel(Solution solution) {
        teamsPanel.reset();
        TravelingTournament travelingTournament = (TravelingTournament) solution;
        tangoColorFactory = new TangoColorFactory();
        defineGrid(travelingTournament);
        fillCells(travelingTournament);
        repaint(); // Hack to force a repaint of TimeTableLayout during "refresh screen while solving"
    }
View Full Code Here


    }

    public static class TravelingTournamentInputBuilder extends TxtInputBuilder {

        public Solution readSolution() throws IOException {
            TravelingTournament travelingTournament = new TravelingTournament();
            travelingTournament.setId(0L);
            int n = readN();
            readTeamList(travelingTournament, n);
            createDayList(travelingTournament, n);
            List<List<Integer>> outerDistanceList = readOuterDistanceList(travelingTournament);
            // TODO setting the distances should be a separate method
            createMatchListAndSetDistancesInTeamList(travelingTournament, outerDistanceList);
            initializeMatchDays(travelingTournament);
            BigInteger possibleSolutionSize = factorial(2 * (n - 1)).pow(n / 2);
            logger.info("TravelingTournament {} has {} days, {} teams and {} matches with a search space of {}.",
                    getInputId(),
                    travelingTournament.getDayList().size(),
                    travelingTournament.getTeamList().size(),
                    travelingTournament.getMatchList().size(),
                    getFlooredPossibleSolutionSize(possibleSolutionSize));
            return travelingTournament;
        }
View Full Code Here

TOP

Related Classes of org.optaplanner.examples.travelingtournament.domain.TravelingTournament

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.