Tabnine Logo
PriorityAgenda
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JFrame (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now