Package de.timefinder.data

Examples of de.timefinder.data.Location


        assertEquals(null, event2.getLocation());
    }

    @Test
    public void testTestAssignToLocation() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);
        aManager = new AssignmentManager(0, allLocations);

        Assignment event1 = newAssignment(0, 1);
        assertEquals(true, aManager.isForcedAssignmentPossible(event1, loc1));
View Full Code Here


        assertEquals(true, aManager.isForcedAssignmentPossible(event2, loc2));
    }

    @Test
    public void testTestAssignmentWithBiggerDuration() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);
        aManager = new AssignmentManager(0, allLocations);

        // we can only reassign events which will be 'consumed'
        Assignment ass1 = newAssignment(0, 2);
View Full Code Here

    @Before
    @Override
    public void setUp() {
        super.setUp();
        conflictingMatrix = new ConflictMatrix(5, 5);
        List locArray = Arrays.asList(new Location(10));
        periode = newPeriod(5, locArray, conflictingMatrix);
    }
View Full Code Here

        assertEquals(true, aManager.isForcedAssignmentPossible(ass2, loc1));
    }

    @Test
    public void testTestAssignmentWithSpecialEvent() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);
        aManager = new AssignmentManager(0, allLocations);

        Feature special = newFeature("special");
        loc1.addFeature(special);
View Full Code Here

        assertNull(aManager.assign(ass2));
    }

    @Test
    public void testReassignWhileCollidingEventIsNotAssigned() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);
        aManager = new AssignmentManager(0, allLocations);

        Assignment ass1 = newAssignment("1", 0, 1);
        Assignment ass2 = newAssignment("2", 0, 1);
View Full Code Here

        ConflictMatrix matrix = new ConflictMatrix(slotsPerWeek, slotsPerDay);
        Map<Resource, Set<Assignment>> resources = newResources(Arrays.asList(a, b), Arrays.asList(a, c));

        matrix.initFromResources(resources);
        Location loc1 = new Location(10);
        Location loc2 = new Location(5);
        List locations = Arrays.asList(loc1, loc2);

        periode = newPeriod(slotsPerWeek, locations, matrix);

        assertTrue(periode.add(b, 0));
View Full Code Here

        assertEquals(1, aManager.getAvailableLocations().size());
    }

    @Test
    public void testAssignedLocationAfterRollback() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);
        aManager = new AssignmentManager(0, allLocations);

        Assignment ass1 = newAssignment("1", 0, 1);
        Assignment ass2 = newAssignment("2", 0, 1);
View Full Code Here

        for (int i = 0; i < LIMITING_CAPACITY + 1; i++) {
            b.getEvent().addPerson(new Person(), true);
            c.getEvent().addPerson(new Person(), true);
        }

        List locations = Arrays.asList(new Location(10), new Location(LIMITING_CAPACITY));

        periode = newPeriod(slotsPerWeek, locations, matrix);

        assertTrue(periode.add(b, 0));
        assertTrue(periode.add(a, 0));
View Full Code Here

        assertEquals(1, aManager.getAvailableLocations().size());
    }

    @Test
    public void testOrder() {
        Location loc2 = newLocation("loc2", 5);
        allLocations.add(loc2);

        Feature special = newFeature("loc1");
        loc1.addFeature(special);
        aManager = new AssignmentManager(0, allLocations);
View Full Code Here

        ConflictMatrix matrix = new ConflictMatrix(slotsPerWeek, slotsPerDay);

        matrix.initFromResources(newResources(Arrays.asList(a, b), Arrays.asList(a, c), Arrays.asList(b, c)));

        List locations = Arrays.asList(new Location(5));

        periode = newPeriod(slotsPerWeek, locations, matrix);
        periode.setRandom(new Random());

        assertTrue(periode.add(b, 0));
View Full Code Here

TOP

Related Classes of de.timefinder.data.Location

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.