booktrading / manager

<html><head><title>

jadex.examples.booktrading.manager

</title></head><body>
 
This package contains the manager agent used to start the booktrading scenario.

</body></html>
<!--
 <H3>The manager agent for starting the application.</H3>

 Can be used to start the booktrading example with different
 initial configurations of buyer and seller agents.

-->
<agent xmlns="http://jadex.sourceforge.net/jadex"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://jadex.sourceforge.net/jadex
                     http://jadex.sourceforge.net/jadex-0.96.xsd"
    name="Manager"
    package="jadex.examples.booktrading.manager">

 <imports>
  <import>jadex.*</import>
  <import>jadex.planlib.*</import>
  <import>java.util.*</import>
  <import>jadex.examples.booktrading.common.*</import>
 </imports>

 <capabilities>
  <capability name="startcap" file="StartAgents"/>
  <capability name="amscap" file="jadex.planlib.AMS"/>
 </capabilities>

 <goals>
  <achievegoalref name="start_agents">
   <concrete ref="startcap.start_agents"/>
   <deliberation>
    <!-- Wait for all agents being started before destroying the manager. -->
    <inhibits ref="ams_destroy_agent"/>
   </deliberation>
  </achievegoalref>
  <!-- Goal used to kill manager after startup. -->
  <achievegoalref name="ams_destroy_agent">
   <concrete ref="amscap.ams_destroy_agent"/>
  </achievegoalref>
 </goals>

 <properties>
<!--  <property name="debugging">true</property>-->
 </properties>

 <configurations>
  <configuration name="One buyer / one seller">
   <goals>
    <initialgoal ref="start_agents">
     <parameterset ref="agentinfos">
      <value>
       new StartAgentInfo("jadex.examples.booktrading.buyer.Buyer", "Alex", 0, new String[]{"initial_orders"},
       new Object[]{new Order[]
       {
        new Order("All about agents", new Date(System.currentTimeMillis()+60000), 100, 120, true),
        new Order("All about web services", new Date(System.currentTimeMillis()+60000), 40, 60, true),
        new Order("Harry Potter", new Date(System.currentTimeMillis()+60000), 5, 10, true),
        new Order("Agents in the real world", new Date(System.currentTimeMillis()+60000), 30, 65, true)
       }})
      </value>
      <value>
       new StartAgentInfo("jadex.examples.booktrading.seller.Seller", "Lars", 0, new String[]{"initial_orders"},
       new Object[]{new Order[]
       {
        new Order("All about agents", new Date(System.currentTimeMillis()+60000), 130, 110, false),
        new Order("All about web services", new Date(System.currentTimeMillis()+60000), 50, 30, false),
        new Order("Harry Potter", new Date(System.currentTimeMillis()+60000), 15, 9, false),
        new Order("Agents in the real world", new Date(System.currentTimeMillis()+60000), 100, 60, false)
       }})
      </value>
     </parameterset>
    </initialgoal>
    <initialgoal ref="ams_destroy_agent">
     <parameter ref="agentidentifier">
      <value>$agent.getAgentIdentifier()</value>
     </parameter>
    </initialgoal>
   </goals>
  </configuration>
  <configuration name="One buyer / two sellers">
   <goals>
    <initialgoal ref="start_agents">
     <parameterset ref="agentinfos">
      <value>
       new StartAgentInfo("jadex.examples.booktrading.buyer.Buyer", "Alex", 0, new String[]{"initial_orders"},
       new Object[]{new Order[]
       {
        new Order("All about agents", new Date(System.currentTimeMillis()+60000), 100, 120, true),
        new Order("All about web services", new Date(System.currentTimeMillis()+60000), 40, 60, true),
        new Order("Harry Potter", new Date(System.currentTimeMillis()+60000), 5, 10, true),
        new Order("Agents in the real world", new Date(System.currentTimeMillis()+60000), 30, 65, true)
       }})
      </value>
      <value>
       new StartAgentInfo("jadex.examples.booktrading.seller.Seller", "Lars", 0, new String[]{"initial_orders"},
       new Object[]{new Order[]
       {
        new Order("All about agents", new Date(System.currentTimeMillis()+60000), 130, 110, false),
        new Order("All about web services", new Date(System.currentTimeMillis()+60000), 50, 30, false),
        new Order("Harry Potter", new Date(System.currentTimeMillis()+60000), 12, 6, false),
        new Order("Agents in the real world", new Date(System.currentTimeMillis()+60000), 100, 60, false)
       }})
      </value>
      <value>
       new StartAgentInfo("jadex.examples.booktrading.seller.Seller", "Dirk", 0, new String[]{"initial_orders"},
       new Object[]{new Order[]
       {
        new Order("All about agents", new Date(System.currentTimeMillis()+60000), 120, 100, false),
        new Order("All about web services", new Date(System.currentTimeMillis()+60000), 40, 20, false),
        new Order("Harry Potter", new Date(System.currentTimeMillis()+60000), 16, 12, false),
        new Order("Agents in the real world", new Date(System.currentTimeMillis()+60000), 100, 60, false)
       }})
      </value>
     </parameterset>
    </initialgoal>
    <initialgoal ref="ams_destroy_agent">
     <parameter ref="agentidentifier">
      <value>$agent.getAgentIdentifier()</value>
     </parameter>
    </initialgoal>
   </goals>
  </configuration>
 </configurations>

</agent>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值