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>

你可能感兴趣的:(.net,Web)