Package javaff.data.metric

Examples of javaff.data.metric.NamedFunction


  private void setupPGFuncMap(Set funcs)
  {
    Iterator fit = funcs.iterator();
    while (fit.hasNext())
    {
      NamedFunction nf = (NamedFunction) fit.next();
      PGFuncMap.put(nf, new PGNamedFunction(nf));
    }
  }
View Full Code Here


    Iterator fit = ms.funcValues.keySet().iterator();
    Map max = new Hashtable();
    Map min = new Hashtable();
    while (fit.hasNext())
    {
      NamedFunction nf = (NamedFunction) fit.next();
      PGFunction pgf = (PGFunction) PGFuncMap.get(nf);
      BigDecimal bd = (BigDecimal) ms.funcValues.get(nf);
      max.put(pgf, bd);
      min.put(pgf, bd);
    }
View Full Code Here

    pstream.println(":init");
    printToString(p.initial, pstream, false, true, 2);
    Iterator it = p.funcValues.keySet().iterator();
    while (it.hasNext())
    {
      NamedFunction nf = (NamedFunction) it.next();
      pstream.println();
      printIndent(pstream, 2);
      pstream.print("(= ");
      printToString(nf, pstream, false, false);
      pstream.print(" "+p.funcValues.get(nf)+")");
View Full Code Here

      Iterator bcit = a.getComparators().iterator();
      while (bcit.hasNext())
      {
        //WARNING WARNING WARNING - assumes comparators are of the form (NamedFunction </>/<=/>= StaticFunction)
                           BinaryComparator bc = (BinaryComparator) bcit.next();
        NamedFunction res = (NamedFunction) bc.first;
        PrecedenceResourceGraph prg = (PrecedenceResourceGraph) graphs.get(res);
        if (prg == null)
        {
          prg = new PrecedenceResourceGraph(stn);
          graphs.put(res,prg);
        }
        state = (TemporalMetricState) states.get(a);
        BigDecimal d = bc.second.getValue(state);
        prg.addCondition(new BinaryComparator( bc.type, res, new NumberFunction(d)), a);
      }

      Iterator roit = a.getOperators().iterator();
      while (roit.hasNext())
      {
        ResourceOperator ro = (ResourceOperator) roit.next();
        NamedFunction res = (NamedFunction) ro.resource;
        PrecedenceResourceGraph prg = (PrecedenceResourceGraph) graphs.get(res);
        if (prg == null)
        {
          prg = new PrecedenceResourceGraph(stn);
          graphs.put(res,prg);
        }
        prg.addOperator(new ResourceOperator( ro.type, res, ro.change.makeOnlyDurationDependent(state)), a);
      }

    }


    Iterator git = graphs.keySet().iterator();

    while (git.hasNext())
    {
      NamedFunction nf = (NamedFunction) git.next();
      PrecedenceResourceGraph prg = (PrecedenceResourceGraph) graphs.get(nf);
      prg.addOperator(new ResourceOperator(MetricSymbolStore.INCREASE, nf, new NumberFunction(nf.getValue(problem.getTemporalMetricInitialState()))), stn.START);
      boolean changesMade = true;
      while (changesMade)
      {
        changesMade = prg.meetConditions();
        stn.constrain();
View Full Code Here

TOP

Related Classes of javaff.data.metric.NamedFunction

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.