Package gld.algo.tlc.iatracos

Examples of gld.algo.tlc.iatracos.SignConfigInterval


          signConfs.item(j).getAttributes();
        if (signConfAttributes != null) {
          Attr attr;
          attr = (Attr) signConfAttributes.getNamedItem("id");
          id = Integer.valueOf(attr.getNodeValue()).intValue();
          SignConfigInterval signConfigInterval =
            new SignConfigInterval(id);
          attr = (Attr) signConfAttributes.getNamedItem("interval");
          interval = Integer.valueOf(attr.getNodeValue()).intValue();
          signConfigInterval.initialize(interval);
          attr = (Attr) signConfAttributes.getNamedItem("order");
          activationOrder =
            Integer.valueOf(attr.getNodeValue()).intValue();
          signConfigInterval.setActivationOrder(activationOrder);
          if (activationOrder == 0) {
            signConfigInterval.setActive();
            signConfigInterval.addOffset(offset);
          } else {
            signConfigInterval.setNotActive();
          }

          tls[i][id] = signConfigInterval;
        }
      }
View Full Code Here


    Node[] nodes = super.infra.getAllNodes();
    for (int i = 0; i < nodesLenght; i++) {
      node = nodes[i];
      if (node instanceof Junction) {
        signConfLenght = tls[i].length;
        SignConfigInterval signConfigInterval = null;
        for (int j = 0; j < signConfLenght; j++) {
          signConfigInterval = tls[i][j];
          if (this.isActiveConfig(signConfigInterval)) {
            this.doStep((Junction) node, signConfigInterval);
            if (signConfigInterval.isOver()) {
              signConfigInterval.refresh();
              this.changeActiveCongiration(
                signConfigInterval,
                this.getNextConfiguration(
                  tls[i],
                  signConfigInterval));
View Full Code Here

      0,
      signConfigIntervals.length);

    Comparator signConfigComparator = new Comparator() {
      public int compare(Object o1, Object o2) {
        SignConfigInterval signConfigInterval1 =
          (SignConfigInterval) o1;
        SignConfigInterval signConfigInterval2 =
          (SignConfigInterval) o2;

        if (signConfigInterval1.getActivationOrder()
          < signConfigInterval2.getActivationOrder()) {
          return -1;
        } else if (
          signConfigInterval1.getActivationOrder()
            > signConfigInterval2.getActivationOrder()) {
          return 1;
        } else if (
          signConfigInterval1.getId()
            < signConfigInterval2.getId()) {
          return -1;
        } else if (
          signConfigInterval1.getId()
            > signConfigInterval2.getId()) {
          return 1;
        } else {
          return -1;
        }
      }
View Full Code Here

TOP

Related Classes of gld.algo.tlc.iatracos.SignConfigInterval

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.