Package de.timefinder.algo.constraint

Examples of de.timefinder.algo.constraint.EventOrderConstraint.addBefore()


                        EventOrderConstraint secConstraint = secEvent.getConstraint(EventOrderConstraint.class);
                        if (secConstraint == null) {
                            secConstraint = new EventOrderConstraint(secEvent);
                            secEvent.putConstraint(secConstraint);
                        }
                        secConstraint.addBefore(firstEvent);
                    } else if (i == -1) {
                        // We could check now the priviously added followers and beforers,
                        // but this is not possible because '-1' could occur the
                        // first time (instead of expected '1')
                    }
View Full Code Here


    private void connect(Assignment prev, Assignment follow) {
        EventOrderConstraint oc = prev.getEvent().getConstraint(EventOrderConstraint.class);
        oc.addFollow(follow.getEvent());

        EventOrderConstraint oc2 = follow.getEvent().getConstraint(EventOrderConstraint.class);
        oc2.addBefore(prev.getEvent());
    }

    @Override
    protected Assignment newAssignment(String str) {
        Assignment ass = super.newAssignment(str, 1, 1);
View Full Code Here

        MinGapsConstraint mgc = new MinGapsConstraint(settings, Arrays.asList(ev3));
        mgc.setCountEarly(true);
        ev1.putConstraint(mgc);

        EventOrderConstraint orderC1 = new EventOrderConstraint(ev2);
        orderC1.addBefore(ev1);
        orderC1.addFollow(ev4);
        ev2.putConstraint(orderC1);

        PersonITCRasterConstraint personRasterC1 = new PersonITCRasterConstraint(person1, settings);
        personRasterC1.setWeight(3.4f);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.