Package javaff.planning

Examples of javaff.planning.MetricState


    return s;
  }

  public MetricState getMetricInitialState()
    {
    MetricState ms = new MetricState(actions, initial, goal, functionValues, metric);
    ms.setRPG(new RelaxedMetricPlanningGraph(this));
    return ms;
  }
View Full Code Here


    return new BinaryComparator(type, first.ground(varMap), second.ground(varMap));
  }

  public boolean isTrue(State s)
    {
    MetricState ms = (MetricState) s;
    BigDecimal df = first.getValue(ms);
    BigDecimal ds = second.getValue(ms);

    boolean result = false;
View Full Code Here

    change = c;
  }
 
    public void apply(State s)
    {
    MetricState ms = (MetricState) s;
    BigDecimal dr = resource.getValue(ms);
    BigDecimal dc = change.getValue(ms);
    BigDecimal res = null;

    if (type == MetricSymbolStore.ASSIGN) res = dc;
    else if (type == MetricSymbolStore.INCREASE) res = dr.add(dc);
    else if (type == MetricSymbolStore.DECREASE) res = dr.subtract(dc);
    else if (type == MetricSymbolStore.SCALE_UP) res = dr.multiply(dc);
    else if (type == MetricSymbolStore.SCALE_DOWN) res = dr.divide(dc, MetricSymbolStore.SCALE, MetricSymbolStore.ROUND);
    ms.setValue(resource,res);
    }
View Full Code Here

TOP

Related Classes of javaff.planning.MetricState

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.