Codota Logo
PriorityAgenda
Code IndexAdd Codota to your IDE (free)

How to use
PriorityAgenda
in
jadex.rules.rulesystem

Best Java code snippets using jadex.rules.rulesystem.PriorityAgenda (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Set the next activation.
   */ 
  public void setNextActivation(Activation next)
  {
//        System.out.println("Set next: "+next);
    
    if(activations.contains(next))
    {
      this.next	= next;
    }
    else
    {
      throw new RuntimeException("Activation not in agenda: "+next+", "+this);
    }
    notifyListeners();
  }
}
origin: net.sourceforge.jadex/jadex-kernel-bdi

rulesystem = new RuleSystem(state, model.getMatcherFunctionality().getRulebase(), model.getMatcherFunctionality(), new PriorityAgenda());
origin: net.sourceforge.jadex/jadex-rules-applications

RuleSystem rete = new RuleSystem(state, rb, new RetePatternMatcherFunctionality(rb), new PriorityAgenda());
origin: net.sourceforge.jadex/jadex-rules

  /**
   *  Set the next activation.
   */ 
  public void setNextActivation(Activation next)
  {
//        System.out.println("Set next: "+next);
    
    if(activations.contains(next))
    {
      this.next	= next;
    }
    else
    {
      throw new RuntimeException("Activation not in agenda: "+next+", "+this);
    }
    notifyListeners();
  }
}
origin: net.sourceforge.jadex/jadex-rules-applications

RuleSystem rete = new RuleSystem(state, rb, new RetePatternMatcherFunctionality(rb), new PriorityAgenda());
rete.init();
origin: net.sourceforge.jadex/jadex-rules

  /**
   *  Remove an activation
   *  @param act The activation.
   */
  public void removeActivation(Activation act)
  {
//        total    -= System.nanoTime();
//        System.out.println("Remove: "+act);
    
    this.activations.remove(act);
    this.counts.remove(act);
    
    if(next==act)
      next = null;
    
//        state++;
    notifyListeners();

//        total    += System.nanoTime();
//        long    currenttime     = System.currentTimeMillis();
//        if(currenttime>lasttime+1000)
//        {
//            if(lasttime!=0)
//                System.out.println("Total agenda time: "+((int)(total/1000000.0))+" ms, "+((int)((total-last)/1000.0)/(currenttime-lasttime))/10.0+"% in last step.");
//            lasttime    = currenttime;
//            last    = total;
//        }        
  }
   
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Remove an activation
   *  @param act The activation.
   */
  public void removeActivation(Activation act)
  {
//        total    -= System.nanoTime();
//        System.out.println("Remove: "+act);
    
    this.activations.remove(act);
    this.counts.remove(act);
    
    if(next==act)
      next = null;
    
//        state++;
    notifyListeners();

//        total    += System.nanoTime();
//        long    currenttime     = System.currentTimeMillis();
//        if(currenttime>lasttime+1000)
//        {
//            if(lasttime!=0)
//                System.out.println("Total agenda time: "+((int)(total/1000000.0))+" ms, "+((int)((total-last)/1000.0)/(currenttime-lasttime))/10.0+"% in last step.");
//            lasttime    = currenttime;
//            last    = total;
//        }        
  }
   
origin: net.sourceforge.jadex/jadex-rules

  /**
   *  Add a new activation.
   *  @param act The activation.
   */
  public void addActivation(Activation act)
  {
//        total    -= System.nanoTime();
//        System.out.println("Add: "+act);
    this.counts.put(act, Long.valueOf(count++));
    this.activations.add(act);
    
    state++;
    notifyListeners();

//        total    += System.nanoTime();
//        long    currenttime     = System.currentTimeMillis();
//        if(currenttime>lasttime+1000)
//        {
//            if(lasttime!=0)
//                System.out.println("Total agenda time: "+((int)(total/1000000.0))+" ms, "+((int)((total-last)/1000.0)/(currenttime-lasttime))/10.0+"% in last step.");
//            last    = total;
//            lasttime    = currenttime;
//        }        
  }
   
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Add a new activation.
   *  @param act The activation.
   */
  public void addActivation(Activation act)
  {
//        total    -= System.nanoTime();
//        System.out.println("Add: "+act);
    this.counts.put(act, Long.valueOf(count++));
    this.activations.add(act);
    
    state++;
    notifyListeners();

//        total    += System.nanoTime();
//        long    currenttime     = System.currentTimeMillis();
//        if(currenttime>lasttime+1000)
//        {
//            if(lasttime!=0)
//                System.out.println("Total agenda time: "+((int)(total/1000000.0))+" ms, "+((int)((total-last)/1000.0)/(currenttime-lasttime))/10.0+"% in last step.");
//            last    = total;
//            lasttime    = currenttime;
//        }        
  }
   
jadex.rules.rulesystemPriorityAgenda

Javadoc

An agenda that sorts activations according to their priority.

Most used methods

  • <init>
    Create a new agenda.
  • notifyListeners

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Collectors (java.util.stream)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now