⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coopie.java

📁 人工智能中Agent开发包。多 Agent 系统是处理自治 Agent 之间知识层的协作问题
💻 JAVA
字号:
/*	This software was produced as a part of research	activities. It is not intended to be used as commercial	or industrial software by any organisation. Except as	explicitly stated, no guarantees are given as to its	reliability or trustworthiness if used for purposes other	than those for which it was originally intended. 	(c) British Telecommunications plc 1999.*/
/*
This stub file was automatically generated by ZeusAgentGenerator version 1.1
*/
 /* Do not edit this class, it has a TaskExternal : test.capabilities.generator.taskwriter.TestExternal
 which it will call when it is executed. Add the code that you want 
 to be executed when this task is run there instead. */

import java.util.*;
import zeus.util.*;
import zeus.concepts.*;
import zeus.actors.ZeusTask;
import zeus.actors.TaskContext;

public class coopie extends ZeusTask {
   protected void exec() {

      // The Input Facts:

      Fact[] _var1 = inputArgs[0];	// Entity
      Fact[] _var4 = inputArgs[1];	// Entity

      // The Output Facts:

      Fact[] _var7;	// Entity
      Fact[] _var10;	// Entity
      System.out.println("-Expected Input-");
      for(int i = 0; i < expInputArgs.length; i++ )
         System.out.println(expInputArgs[i].pprint());

      System.out.println("-Input-");
      for(int j = 0; j < inputArgs.length; j++) {
         System.out.println("Input Fact["+j+"]");
         for(int i = 0; i < inputArgs[j].length; i++)
            System.out.println(inputArgs[j][i].pprint());
      }

     // calling user defined zeus.concepts.TaskExternal
    // first set the TaskContext object up 
     TaskContext taskContext = new TaskContext(); 
     taskContext.setAgentContext (this.context);
     taskContext.setExpInputArgs (expInputArgs); 
     taskContext.setInputArgs (inputArgs); 
     taskContext.setExpOutputArgs (expOutputArgs); 

     outputArgs = new Fact [expOutputArgs.length][];

     for (int k=0; k<expOutputArgs.length; k++) {
         outputArgs[k] = new Fact[1];
         outputArgs[k][0] = new Fact(Fact.FACT, expOutputArgs[k]);
     }

     taskContext.setOutputArgs (outputArgs); 
    // now initialise the external object 
    test.capabilities.generator.taskwriter.TestExternal taskExternal = new test.capabilities.generator.taskwriter.TestExternal(); 
     // now call the TaskExternal implementation specified for this task
     taskExternal.exec(taskContext); 

      System.out.println("-Expected Output-");
      for(int i = 0; i < expOutputArgs.length; i++ )
         System.out.println(expOutputArgs[i].pprint());

      outputArgs = taskContext.getOutputArgs();

      System.out.println("-Output-");
      for(int k = 0; k < outputArgs.length; k++ ) 
          System.out.println(outputArgs[k][0].pprint());
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -