Package javaff.data.temporal

Examples of javaff.data.temporal.DurativeAction


  protected void addEndActionGoals(TemporalMetricState S)
    {
    Iterator dait = S.openActions.iterator();
    while (dait.hasNext())
    {
      DurativeAction da = (DurativeAction) dait.next();
      Proposition p = da.dummyGoal;
      goal.add(getProposition(p));
    }
    }
View Full Code Here


          na.add(act);
          ni.add(act);
        }
        else if (act instanceof DurativeAction)
        {
          DurativeAction dact = (DurativeAction) act;
          na.add(dact.startAction);
          na.add(dact.endAction);
          ni.add(dact.startAction);
        }
      }
View Full Code Here

        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);
                plan.addAction(da, time, dur);
            }
      else if (a instanceof STRIPSInstantAction && a != START)
View Full Code Here

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

          {
            ResourceOperator ro = (ResourceOperator) uit.next();
            if (ro.change instanceof DurationFunction)
            {
              DurationFunction df = (DurationFunction) ro.change;
              DurativeAction da = df.durativeAction;
              if (ro.type == MetricSymbolStore.INCREASE || ro.type == MetricSymbolStore.SCALE_UP) stn.decreaseMax(da, diff);
              else if (ro.type == MetricSymbolStore.DECREASE || ro.type == MetricSymbolStore.SCALE_DOWN) stn.increaseMin(da, diff);
              change = true;
              break;
            }
          }
        }
      }

     
      else if (bc.type == MetricSymbolStore.GREATER_THAN || bc.type == MetricSymbolStore.GREATER_THAN_EQUAL)
      {
        BigDecimal value = findBeforeMin(a);
        if (value.compareTo(comp) < 0)
        {
          BigDecimal diff = comp.subtract(value);
          //change an before producers back
          Set u = getBeforeOperators(a);
          Iterator uit = u.iterator();
          while (uit.hasNext())
          {
            ResourceOperator ro = (ResourceOperator) uit.next();
            if (ro.change instanceof DurationFunction)
            {
              DurationFunction df = (DurationFunction) ro.change;
              DurativeAction da = df.durativeAction;
              if (ro.type == MetricSymbolStore.INCREASE || ro.type == MetricSymbolStore.SCALE_UP) stn.increaseMin(da, diff);
              else if (ro.type == MetricSymbolStore.DECREASE || ro.type == MetricSymbolStore.SCALE_DOWN) stn.decreaseMax(da, diff);
              change = true;
              break;
            }
View Full Code Here

    while (roit.hasNext())
    {
      ResourceOperator ro = (ResourceOperator) roit.next();
      if (ro.change instanceof DurationFunction)
      {
        DurativeAction da = ((DurationFunction)ro.change).durativeAction;
        if (ro.type == MetricSymbolStore.INCREASE || ro.type == MetricSymbolStore.SCALE_UP)
        {
          stn.minimize(da);
        }
        else if (ro.type == MetricSymbolStore.DECREASE || ro.type == MetricSymbolStore.SCALE_DOWN)
View Full Code Here

    while (roit.hasNext())
    {
      ResourceOperator ro = (ResourceOperator) roit.next();
      if (ro.change instanceof DurationFunction)
      {
        DurativeAction da = ((DurationFunction)ro.change).durativeAction;
        if (ro.type == MetricSymbolStore.INCREASE || ro.type == MetricSymbolStore.SCALE_UP)
        {
          stn.maximize(da);
        }
        else if (ro.type == MetricSymbolStore.DECREASE || ro.type == MetricSymbolStore.SCALE_DOWN)
View Full Code Here

TOP

Related Classes of javaff.data.temporal.DurativeAction

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.