Package de.timefinder.algo.io

Examples of de.timefinder.algo.io.DataPool4Track2


    }

    @Test
    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


        return counter;
    }

    @Test
    public void testGetInitialPeriode() {
        DataPool4Track2 dataPool4Track2 = createDP4Track2();
        dataPool4Track2.doWork();
        int oldSize = ncpInstance.getDataPool().getDao(Event.class).getAll().size();

        Period currentWeek = ncpInstance.getInitialPeriod(true);
        assertEquals(oldSize, currentWeek.getAll().size());
        assertEquals(oldSize, currentWeek.getInvalidAssignments().size());
View Full Code Here

    private DataPool4Track2 createDP4Track2() {
        InputStream iStream = NoCollisionPrinciple.class.getResourceAsStream(TIM_FILE);
        assertNotNull(iStream);
        InputStreamReader reader = new InputStreamReader(iStream);
        DataPool4Track2 dataPool4Track2 = new DataPool4Track2();
        dataPool4Track2.setSettings(settings);
        dataPool4Track2.setDataPool(dataPool);
        dataPool4Track2.setSource(reader);
        ncpInstance.setDataPool(dataPool4Track2.getDataPool());

        return dataPool4Track2;
    }
View Full Code Here

            importer.setDataPoolSettings(settings);
            importer.doWork();
        } else {
            InputStreamReader reader = new InputStreamReader(new FileInputStream(fileOrFolder));

            DataPool4Track2 dataPool4Track2 = new DataPool4Track2();
            dataPool4Track2.setSettings(settings);
            dataPool4Track2.setDataPool(dataPool);
            dataPool4Track2.setSource(reader);

            dataPool4Track2.doWork();
        }
    }
View Full Code Here

TOP

Related Classes of de.timefinder.algo.io.DataPool4Track2

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.