Package javaff.data.strips

Examples of javaff.data.strips.InstantAction


          ne.followsStart.addAll(e.followsStart);

          Iterator fit = e.followsStart.iterator();
          while (fit.hasNext())
          {
            InstantAction ia = (InstantAction)fit.next();
            if (checkOrder(ia,ne.end)) ne.addPreceder(ia,s);
          }

          ne.constraints.add(TemporalConstraint.getConstraint(sa, e.end));
View Full Code Here


    Set fs = new HashSet();
    Iterator fit = e.followsStart.iterator();
    while (fit.hasNext())
    {
      InstantAction f = (InstantAction) fit.next();
      if (checkOrder(f,a)) fs.add(f);
    }
    fit = fs.iterator();
    while (fit.hasNext())
    {
      InstantAction f = (InstantAction) fit.next();
      e.addFollowerOrder(f,a, s);
    }

    /*
    Set ps = new HashSet();
View Full Code Here

    {
    boolean consistency = true;
    Iterator sit = nodes.iterator();
    while (sit.hasNext() && consistency)
    {
      InstantAction source = (InstantAction) sit.next();
      consistency = consistentSource(source);
    }
    return consistency;
    }
View Full Code Here

    //Implementation of Bellman-Ford Algorithm for Single Source Shortest Path with negative edges
    public boolean consistentSource(InstantAction source)
    {
    List nodeIndex = new ArrayList(nodes);
    InstantAction p[] = new InstantAction[nodeIndex.size()];
    BigDecimal d[] = new BigDecimal[nodeIndex.size()];
    for (int count = 0; count < nodeIndex.size(); ++count)
    {
      p[count] = (InstantAction) nodeIndex.get(count);
      d[count] = javaff.JavaFF.MAX_DURATION;
View Full Code Here

    {
    TimeStampedPlan plan = new TimeStampedPlan();
        Iterator ait = Timepoints.iterator();
        while (ait.hasNext())
        {
            InstantAction a = (InstantAction) ait.next();;
            if (a instanceof StartInstantAction)
            {
                DurativeAction da = ((StartInstantAction)a).parent;
                BigDecimal time = TheArray[Timepoints.indexOf(a)][0].negate().setScale(SCALE,ROUND);
        BigDecimal dur = TheArray[Timepoints.indexOf(da.endAction)][0].negate().subtract(time).setScale(SCALE,ROUND);
View Full Code Here

  public void minimizeTime()
  {
    Iterator ait = Timepoints.iterator();
        while (ait.hasNext())
        {
            InstantAction a = (InstantAction) ait.next();;
            if (a instanceof EndInstantAction)
            {
        int i = Timepoints.indexOf(a);
                if (TheArray[i][0].compareTo(TheArray[0][i].negate()) != 0)
        {
View Full Code Here

  public void minimizeDuration()
  {
    Iterator ait = Timepoints.iterator();
        while (ait.hasNext())
        {
            InstantAction a = (InstantAction) ait.next();;
            if (a instanceof StartInstantAction)
            {
                DurativeAction da = ((StartInstantAction)a).parent;
                minimize(da);
            }
View Full Code Here

TOP

Related Classes of javaff.data.strips.InstantAction

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.