Package de.timefinder.data.algo

Examples of de.timefinder.data.algo.Solution


    void clearInvalid() {
        getInvalidAssignments().clear();
    }

    public Solution export() {
        Solution solution = new Solution();
        solution.setHardConflicts(getHardConstraintsViolations());
        solution.setSoftConflicts(getSoftConstraintsViolations());

        for (Assignment ass : allAssignments) {
            solution.addAssignment(new Assignment(ass));
        }

        return solution;
    }
View Full Code Here


    public void testRunAlgorithm() {
        System.out.println("runAlgorithm");
        DataPool4Track2 dataPool4Track2 = createDP4Track2();
        dataPool4Track2.doWork();
        assertTrue(ncpInstance.getDataPool().getDao(Event.class).getAll().size() > 100);
        Solution sol = ncpInstance.doWork();
        ConstraintChecker.printStatistics(sol, true);
        assertTrue("Optimization is not efficient enough!", ncpInstance.getHardConflicts() < 20);
    }
View Full Code Here

        ncpInstance.setDataPool(dataPool);

        loadData(dataPool, new File(fileOrFolder), settings);

        long start = System.currentTimeMillis();
        Solution solution = ncpInstance.doWork();
//        ConstraintChecker.printStatistics(solution);

        return start;
    }
View Full Code Here

TOP

Related Classes of de.timefinder.data.algo.Solution

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.