`
turingfellow
  • 浏览: 135080 次
  • 性别: Icon_minigender_1
  • 来自: 福建省莆田市
社区版块
存档分类
最新评论

protocols

    博客分类:
  • jade
阅读更多

<!--
 The protocols capability enables an easy goal-driven usage of
 some often used FIPA protocols.
-->
<capability 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"
 package="jadex.planlib"
 name="Protocols">

 <imports>
  <import>jadex.adapter.fipa.*</import>
  <import>java.util.*</import>
  <import>jadex.runtime.*</import>
  <import>jadex.runtime.impl.*</import>
 </imports>

 <beliefs>
  <!-- Timeout for messages. -->
  <belief name="timeout" class="Long" exported="true">
   <fact>(Integer)$propertybase.getProperty("standard.timeout")</fact>
  </belief>

  <!-- Filters are only relevant for the participants protocol side. -->

  <!-- The filter for deciding which initial request messages are handled in this capability. -->
  <belief name="rp_filter" class="IFilter" exported="true">
   <fact>IFilter.NEVER</fact>
  </belief>

  <!-- The filter for deciding which initial cfp messages are handled in this capability. -->
  <belief name="cnp_filter" class="IFilter" exported="true">
   <fact>IFilter.NEVER</fact>
  </belief>
  
  <!-- The filter for deciding which initial iterated cfp messages are handled in this capability. -->
  <belief name="icnp_filter" class="IFilter" exported="true">
   <fact>IFilter.NEVER</fact>
  </belief>
  
  <!-- The filter for deciding which initial cfp messages are handled in this capability. -->
  <belief name="ea_filter" class="IFilter" exported="true">
   <fact>IFilter.NEVER</fact>
  </belief>
  
  <!-- The filter for deciding which initial cfp messages are handled in this capability. -->
  <belief name="da_filter" class="IFilter" exported="true">
   <fact>IFilter.NEVER</fact>
  </belief>

  <!-- The filter for deciding which cancel messages are handled in this capability. -->
  <belief name="cm_filter" class="IFilter" exported="true">
   <fact>
    new ComposedFilter(new IFilter[]
    {
     $beliefbase.rp_filter,
     $beliefbase.cnp_filter,
     $beliefbase.icnp_filter,
     $beliefbase.ea_filter,
     $beliefbase.da_filter
    }, ComposedFilter.OR)
   </fact>
  </belief>
 </beliefs>

 <goals>
 
  <!-- FIPA request protocol. -->

  <!-- (Initiator side) Initiate a conversation using the fipa-request protocol. -->
  <achievegoal name="rp_initiate" exported="true">
   <!-- The receiver of the request. -->
   <parameter name="receiver" class="AgentIdentifier"/>
   <!-- The requested action. -->
   <parameter name="action" class="Object"/>
   <!-- Optional ontology for marshalling. -->
   <parameter name="ontology" class="String" optional="true"/>
   <!-- Optional language for marshalling. -->
   <parameter name="language" class="String" optional="true"/>
   <!-- The optional request timeout. -->
   <parameter name="timeout" class="Long" optional="true"/>
   <!-- The result of the request. -->
   <parameter name="result" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
  </achievegoal>

  <!-- (Participant side) Request protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="rp_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>

  <!-- (Participant side) Decide upon a requested task will be executed. -->
  <querygoal name="rp_decide_request" exported="true">
   <!-- The requested action. -->
   <parameter name="action" class="Object"/>
   <!-- The requesting agent. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- True, if request should be done and agree message should be sent. -->
   <parameter name="accept" class="Boolean" direction="out"/>
  </querygoal>

  <!-- (Participant side) Execute the requested task. -->
  <achievegoal name="rp_execute_request" exported="true">
   <!-- The requested action. -->
   <parameter name="action" class="Object"/>
   <!-- The requesting agent. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- The result of the request. -->
   <parameter name="result" class="Object" direction="out" optional="true"/>
  </achievegoal>

  <!-- FIPA contract net protocol. -->

  <!-- (Initiator side) Initiate a call for proposal protcol. -->
  <achievegoal name="cnp_initiate" exported="true">
   <!-- The call-for-proposals is in the content. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" direction="inout" optional="true"/>
   <!-- Optional ontology for marshalling. -->
   <parameter name="ontology" class="String" optional="true"/>
   <!-- Optional langauge for marshalling. -->
   <parameter name="language" class="String" optional="true"/>
   <!-- The timeout used during the negotiation. -->
   <parameter name="timeout" class="Long" optional="true"/>
   <!-- If several proposals are acceptable, should all be accepted. -->
   <parameter name="executeall" class="Boolean" optional="true">
    <value>Boolean.FALSE</value>
   </parameter>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The (initial) negotiation participants. -->
   <parameterset name="receivers" class="AgentIdentifier"/>
   <!-- The tasks done by the winners. -->
   <parameterset name="result" class="Object" direction="out"/>
   <!-- The negotiation history. -->
   <parameterset name="history" class="NegotiationRecord" optional="true" direction="out"/>
  </achievegoal>
  
  <!-- (Initiator side) Evaluate the received proposals. -->
  <querygoal name="cnp_evaluate_proposals" exported="true">
   <!-- The original call-for-proposals. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" optional="true" direction="inout"/>
   <!-- Dummy paramter that leads to goal completion, when an acceptable proposal is available or all proposals are evaluated. -->
   <parameter name="evaluated" class="Boolean" direction="out">
    <value evaluationmode="dynamic">
     ($goal.acceptables.length>0 ||
     (select one ParticipantProposal $prop from $goal.proposals
     where $prop.getEvaluation()==null)==null) ? true : null
    </value>
   </parameter>
   <!-- The received proposals. -->
   <parameterset name="proposals" class="ParticipantProposal"/>
   <!-- The negotiation history. -->
   <parameterset name="history" class="NegotiationRecord"/>
   <!--  The acceptable proposals, sorted by preference (best proposal first). -->
   <parameterset name="acceptables" class="ParticipantProposal" optional="true" direction="out"/>
  </querygoal>

  <!-- (Participant side) Contract-net protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="cnp_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>

  <!-- (Participant side) Make a cfp proposal. -->
  <querygoal name="cnp_make_proposal" exported="true">
   <!-- The cfp describing the task to be done. -->
   <parameter name="cfp" class="Object"/>
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- The proposal for doing the task. -->
   <parameter name="proposal" class="Object" direction="out"/>
   <!-- Optional information about the task that will be tranferred
   to the task execution step (not sent to initiator).-->
   <parameter name="proposal_info" class="Object" direction="out" optional="true"/>
  </querygoal>

  <!-- (Participant side) Execute a cfp task. -->
  <achievegoal name="cnp_execute_task" exported="true">
   <!-- The proposal for doing the task. -->
   <parameter name="proposal" class="Object"/>
   <!-- Optional information about the task from the
   preceding step (not sent to initiator).-->
   <parameter name="proposal_info" class="Object" optional="true"/>
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- Information about the task execution. -->
   <parameter name="result" class="Object" direction="out" optional="true"/>
  </achievegoal>
  
  <!-- FIPA iterated contract net protocol. -->

  <!-- (Initiator side) Initiate a call for proposal protcol. -->
  <achievegoal name="icnp_initiate" exported="true">
   <!-- The call-for-proposals is in the content. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" direction="inout" optional="true"/>
   <!-- Optional ontology for marshalling. -->
   <parameter name="ontology" class="String" optional="true"/>
   <!-- Optional langauge for marshalling. -->
   <parameter name="language" class="String" optional="true"/>
   <!-- The timeout used during the negotiation. -->
   <parameter name="timeout" class="Long" optional="true"/>
   <!-- If several proposals are acceptable, should all be accepted. -->
   <parameter name="executeall" class="Boolean" optional="true">
    <value>Boolean.FALSE</value>
   </parameter>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The (initial) negotiation participants. -->
   <parameterset name="receivers" class="AgentIdentifier"/>
   <!-- The tasks done by the winners. -->
   <parameterset name="result" class="Object" direction="out"/>
   <!-- The negotiation history. -->
   <parameterset name="history" class="NegotiationRecord" direction="out"/>
  </achievegoal>
  
  <!-- (Initiator side) Evaluate the received proposals. -->
  <querygoal name="icnp_evaluate_proposals" exported="true">
   <!-- The original call-for-proposals. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" optional="true" direction="inout"/>
   <!-- Dummy paramter that leads to goal completion, when an acceptable proposal is available or all proposals are evaluated. -->
   <parameter name="evaluated" class="Boolean" direction="out">
    <value evaluationmode="dynamic">
     ($goal.acceptables.length>0 ||
     (select one ParticipantProposal $prop from $goal.proposals
     where $prop.getEvaluation()==null)==null) ? true : null
    </value>
   </parameter>
   <!-- The received proposals -->
   <parameterset name="proposals" class="ParticipantProposal"/>
   <!-- The negotiation history. -->
   <parameterset name="history" class="NegotiationRecord"/>
   <!-- The acceptable proposals, sorted by preference (best proposal first).
     By default, setting acceptable proposals will end the protocol (i.e. no more iterations). -->
   <parameterset name="acceptables" class="ParticipantProposal" optional="true" direction="out"/>
  </querygoal>
  
  <!-- (Initiator side) Collect information for next round (if any). -->
  <querygoal name="icnp_nextround_info" exported="true">
   <!-- The call-for-proposal object sent to participants (should be refined for next round). -->
   <parameter name="cfp" class="Object" direction="inout"/>
   <!-- The call-for-proposal info (local information, can be refined for next round). -->
   <parameter name="cfp_info" class="Object" optional="true" direction="inout"/>
   <!-- Flag indicating the decision to iterate (set to true or false to end goal). -->
   <parameter name="iterate" class="Boolean" direction="out"/>
   <!-- The participants (can be altered for next negotiation round). -->
   <parameterset name="participants" class="AgentIdentifier" direction="inout"/>
   <!-- The proposals, received from participants including evaluation (if any). -->
   <parameterset name="proposals" class="ParticipantProposal"/>
   <!-- The negotiation history. -->
   <parameterset name="history" class="NegotiationRecord"/>
  </querygoal>

  <!-- (Participant side) Iterated contract-net protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="icnp_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>

  <!-- (Participant side) Make a cfp proposal. -->
  <querygoal name="icnp_make_proposal" exported="true">
   <!-- The cfp describing the task to be done. -->
   <parameter name="cfp" class="Object"/>
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- The proposal for doing the task. -->
   <parameter name="proposal" class="Object" direction="out"/>
   <!-- Optional information about the task that will be tranferred
   to the task execution step (not sent to initiator).-->
   <parameter name="proposal_info" class="Object" direction="out" optional="true"/>
  </querygoal>

  <!-- (Participant side) Execute a cfp task. -->
  <achievegoal name="icnp_execute_task" exported="true">
   <!-- The proposal for doing the task. -->
   <parameter name="proposal" class="Object"/>
   <!-- Optional information about the task from the
   preceding step (not sent to initiator).-->
   <parameter name="proposal_info" class="Object" optional="true"/>
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- Information about the task execution. -->
   <parameter name="result" class="Object" direction="out" optional="true"/>
  </achievegoal>
  
  <!-- FIPA english auction protocol. -->

  <!-- (Initiator side) Initiate the english auction protocol. -->
  <achievegoal name="ea_initiate" exported="true">
   <!-- The auction description containing necessary information about the auction:
    a) the auction topic, b) the round timeout, c) the starttime (optional) -->
   <parameter name="auction_description" class="AuctionDescription"/>
   <!-- The call-for-proposals is in the content. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" optional="true"/>
   <!-- The optional limit offer (if defined no ea_decide_acceptance goal is thrown). -->
   <parameter name="limit" class="Comparable" optional="true"/>
   <!-- Optional ontology for marshalling. -->
   <parameter name="ontology" class="String" optional="true"/>
   <!-- Optional language for marshalling. -->
   <parameter name="language" class="String" optional="true"/>
   <!-- The auction result. -->
   <parameter name="result" class="Object" direction="out" optional="true"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The initially participating bidder agents. -->
   <parameterset name="receivers" class="AgentIdentifier"/>
  </achievegoal>
  
  <!-- (Initiator side) Decide if the next round should be executed and with which cfp. -->
  <querygoal name="ea_decide_iteration" exported="true">
   <!-- Decide about the cfp for the next round. -->
   <parameter name="cfp" class="Object" direction="out"/>
   <!-- Decide about the (new) cfp info. -->
   <parameter name="cfp_info" class="Object" optional="true" direction="inout"/>
   <!-- The history of cfps. -->
   <parameterset name="history" class="Object"/>
  </querygoal>
  
  <!-- (Initiator side) Decide if winning offer should be accepted. -->
  <querygoal name="ea_decide_acceptance" exported="true">
   <!-- The auction description. -->
   <parameter name="auction_description" class="AuctionDescription"/>
   <!-- The winning proposal -->
   <parameter name="cfp" class="Object"/>
   <!-- The local cfp info -->
   <parameter name="cfp_info" class="Object" optional="true"/>
   <!-- The winning agent. -->
   <parameter name="winner" class="AgentIdentifier"/>
   <!-- The result. -->
   <parameter name="accept" class="Boolean" direction="out"/>
   <!-- The history of cfps. -->
   <parameterset name="history" class="Object"/>
  </querygoal>
  
  <!-- (Participant side) English auction protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="ea_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>
  
  <!-- (Participant side) Optional goal that offers a possibility to decide about participation. -->  
  <achievegoal name="ea_decide_participation" exported="true">
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- The auction info describing the auction. -->
   <parameter name="auction_description" class="AuctionDescription" direction="in"/>
   <!-- Local auction info. -->
   <parameter name="auction_info" class="Object" optional="true" direction="out"/>
   <!-- False for not participating in the auction. -->
   <parameter name="participate" class="Boolean" direction="out"/>
  </achievegoal>
        
  <!-- (Participant side) Make a proposal for an english auction. -->
  <querygoal name="ea_make_proposal" exported="true">
   <!-- The current offer made by the auctioneer. -->
   <parameter name="cfp" class="Object"/>
   <!-- The auction description describing the auction. -->
   <parameter name="auction_description" class="AuctionDescription"/>
   <!-- Local auction info. -->
   <parameter name="auction_info" class="Object" optional="true" direction="inout"/>
   <!-- True, for accepting the offer. -->
   <parameter name="accept" class="Boolean" direction="out"/>
   <!-- True, for immediately leaving the current auction. -->
   <parameter name="leave" class="Boolean" direction="out" optional="true"/>
   <!-- The history of all offers in the auction. -->
   <parameterset name="history" class="Object" optional="true"/>
  </querygoal>
  
  <!-- FIPA dutch auction protocol. -->

  <!-- (Initiator side) Initiate the dutch auction protocol. -->
  <achievegoal name="da_initiate" exported="true">
   <!-- The auction description containing necessary information about the auction:
    a) the auction topic, b) the round timeout, c) the starttime (optional) -->
   <parameter name="auction_description" class="AuctionDescription"/>
   <!-- The current offer made by the auctioneer. -->
   <parameter name="cfp" class="Object"/>
   <!-- The call-for-proposals info (local information). -->
   <parameter name="cfp_info" class="Object" optional="true" direction="in"/>
   <!-- Optional ontology for marshalling. -->
   <parameter name="ontology" class="String" optional="true"/>
   <!-- Optional language for marshalling. -->
   <parameter name="language" class="String" optional="true"/>
   <!-- The result of the protocol execution. -->
   <parameter name="result" class="Object" optional="true" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The initially participating bidder agents. -->
   <parameterset name="receivers" class="AgentIdentifier"/>
  </achievegoal>
  
  <!-- (Initiator side) Decide if the next round should be executed and with which cfp. -->
  <querygoal name="da_decide_iteration" exported="true">
   <!-- Decide about the cfp for the next round. -->
   <parameter name="cfp" class="Object" direction="out"/>
   <!-- Decide about the (new) cfp info. -->
   <parameter name="cfp_info" class="Object" optional="true" direction="inout"/>
   <!-- The history of cfps. -->
   <parameterset name="history" class="Object"/>
  </querygoal>
    
  <!-- (Participant side) Dutch auction protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="da_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>
  
  <!-- (Participant side) Optional goal that offers a possibility to decide a participation. -->  
  <achievegoal name="da_decide_participation" exported="true">
   <!-- The initiator of the interaction. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- The auction description. -->
   <parameter name="auction_description" class="AuctionDescription" direction="in"/>
   <!-- Local auction info. -->
   <parameter name="auction_info" class="Object" optional="true" direction="out"/>
   <!-- False for not participating in the auction. -->
   <parameter name="participate" class="Boolean" direction="out"/>
  </achievegoal>  
        
  <!-- (Participant side) Accept a proposal in a dutch auction. -->
  <querygoal name="da_make_proposal" exported="true">
   <!-- The current offer made by the auctioneer. -->
   <parameter name="cfp" class="Object"/>
   <!-- The auction description. -->
   <parameter name="auction_description" class="AuctionDescription"/>
   <!-- Local auction info. -->
   <parameter name="auction_info" class="Object" optional="true" direction="inout"/>
   <!-- True, for accepting the offer. -->
   <parameter name="accept" class="Boolean" direction="out"/>
   <!-- True, for immediately leaving the current auction. -->
   <parameter name="leave" class="Boolean" direction="out" optional="true"/>
   <!-- The history of all offers in the auction. -->
   <parameterset name="history" class="Object" optional="true"/>
  </querygoal>

  <!-- FIPA-Cancel-Meta-Protocol goals. -->

  <!-- (Participant side) FIPA-Cancel-Meta-Protocol protocol interaction goal (top-level goal of all receiver-side interactions). -->
  <performgoal name="cm_receiver_interaction" retry="false" exported="true">
   <!-- The message that initiated the protocol. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state. -->
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <value>new InteractionState()</value>
   </parameter>
   <!-- The interaction result. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>
  
  <!-- (Participant side) Optional goal to approve a cancel request (default=true). -->
  <querygoal name="cm_approve_cancel" exported="true">
   <!-- The interaction to be cancelled. -->
   <parameter name="conversation-id" class="String"/>
   <!-- The protocol of the interaction to be cancelled. -->
   <parameter name="protocol" class="String"/>
   <!-- The initiator agent for the cancel request. -->
   <parameter name="initiator" class="AgentIdentifier"/>
   <!-- True, if the cancellation is ok. -->
   <parameter name="result" class="Boolean" direction="out"/>
   <!-- A failure reason when cancellation is not ok. -->
   <parameter name="failure_reason" class="Object" direction="out" optional="true"/>
  </querygoal>

  <!-- Generic goals. -->

  <!-- A subgoal that can be posted to trigger  to protocol specific
    interaction handling. Should be used when implementing custom
    plan for receiver interaction goal. -->
  <performgoal name="perform_interaction" retry="false" exported="true">
   <!-- The message should be assign from the superordinated goal. -->
   <parameter name="message" class="IMessageEvent"/>
   <!-- The interaction description (content of first message). -->
   <parameter name="interaction_description" class="Object" direction="out"/>
   <!-- The interaction state should be assign from the superordinated goal. -->
   <parameter name="interaction_state" class="InteractionState" direction="out"/>
   <!-- The result should be passed back to the superordinated goal. -->
   <parameter name="result" class="Object" direction="out"/>
  </performgoal>

 </goals>

 <plans>
  <!-- Generic interaction goal creation plan. -->
  <plan name="rp_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"rp_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="rp_request"/>
   </trigger>
  </plan>
  
  <!-- Generic interaction goal creation plan. -->
  <plan name="cnp_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"cnp_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="cnp_cfp"/>
   </trigger>
  </plan>
  
  <!-- Generic interaction goal creation plan. -->
  <plan name="icnp_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"icnp_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="icnp_cfp"/>
   </trigger>
  </plan>
  
  <!-- Generic interaction goal creation plan. -->
  <plan name="ea_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"ea_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="ea_inform_start_auction"/>
   </trigger>
  </plan>
  
  <!-- Generic interaction goal creation plan. -->
  <plan name="da_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"da_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="da_inform_start_auction"/>
   </trigger>
  </plan>
 
  <plan name="request_initiator_plan">
   <parameter name="receiver" class="AgentIdentifier">
    <goalmapping ref="rp_initiate.receiver"/>
   </parameter>
   <parameter name="action" class="Object">
    <goalmapping ref="rp_initiate.action"/>
   </parameter>
   <parameter name="ontology" class="String">
    <goalmapping ref="rp_initiate.ontology"/>
   </parameter>
   <parameter name="language" class="String">
    <goalmapping ref="rp_initiate.language"/>
   </parameter>
   <parameter name="timeout" class="Long">
    <goalmapping ref="rp_initiate.timeout"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="rp_initiate.result"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="rp_initiate.interaction_state"/>
   </parameter>
   <body class="RPInitiatorPlan" />
   <!-- <body>new RPInitiatorPlan()</body> -->
   <trigger>
    <goal ref="rp_initiate"/>
   </trigger>
  </plan>

  <plan name="rp_receiver_plan" priority="-1">
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="rp_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="rp_receiver_interaction.interaction_state"/>
    <goalmapping ref="perform_interaction.interaction_state"/>
   </parameter>
   <parameter name="interaction_description" class="Object" direction="out">
    <goalmapping ref="rp_receiver_interaction.interaction_description"/>
    <goalmapping ref="perform_interaction.interaction_description"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="rp_receiver_interaction.result"/>
    <goalmapping ref="perform_interaction.result"/>
   </parameter>
   <body class="RPReceiverPlan" />
   <!-- <body>new RPReceiverPlan()</body> -->
   <trigger>
    <goal ref="rp_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_REQUEST.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>

  <plan name="cnp_initiator_plan">
   <parameter name="iterated" class="Boolean">
    <value>Boolean.FALSE</value>
   </parameter>
   <parameter name="cfp" class="Object">
    <goalmapping ref="cnp_initiate.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="cnp_initiate.cfp_info"/>
   </parameter>
   <parameter name="ontology" class="String">
    <goalmapping ref="cnp_initiate.ontology"/>
   </parameter>
   <parameter name="language" class="String">
    <goalmapping ref="cnp_initiate.language"/>
   </parameter>
   <parameter name="timeout" class="Long">
    <goalmapping ref="cnp_initiate.timeout"/>
   </parameter>
   <parameter name="executeall" class="boolean">
    <goalmapping ref="cnp_initiate.executeall"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="cnp_initiate.interaction_state"/>
   </parameter>
   <parameterset name="receivers" class="AgentIdentifier">
    <goalmapping ref="cnp_initiate.receivers"/>
   </parameterset>
   <parameterset name="result" class="Object" direction="out">
    <goalmapping ref="cnp_initiate.result"/>
   </parameterset>
   <parameterset name="history" class="NegotiationRecord">
    <goalmapping ref="cnp_initiate.history"/>
   </parameterset>
   <body class="CNPInitiatorPlan" />
   <!-- <body>new CNPInitiatorPlan()</body> -->
   <trigger>
    <goal ref="cnp_initiate"/>
   </trigger>
  </plan>

  <!-- Default plan for evaluate proposals goal. -->
  <plan name="cnp_evaluateproposals_plan" priority="-1">
   <parameter name="cfp" class="Object">
    <goalmapping ref="cnp_evaluate_proposals.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="cnp_evaluate_proposals.cfp_info"/>
   </parameter>
   <parameterset name="proposals" class="ParticipantProposal">
    <goalmapping ref="cnp_evaluate_proposals.proposals"/>
   </parameterset>
   <parameterset name="acceptables" class="ParticipantProposal" optional="true" direction="out">
    <goalmapping ref="cnp_evaluate_proposals.acceptables"/>
   </parameterset>
   <parameterset name="history" class="NegotiationRecord">
    <goalmapping ref="cnp_evaluate_proposals.history"/>
   </parameterset>
   <body class="CNPEvaluateProposalsPlan" />
   <trigger>
    <goal ref="cnp_evaluate_proposals"/>
   </trigger>
   <precondition>$goal.cfp_info instanceof IProposalEvaluator</precondition>
  </plan>

  <plan name="cnp_receiver_plan">
   <parameter name="iterated" class="Boolean">
    <value>Boolean.FALSE</value>
   </parameter>
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="cnp_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="cnp_receiver_interaction.interaction_state"/>
    <goalmapping ref="perform_interaction.interaction_state"/>
   </parameter>
   <parameter name="interaction_description" class="Object" direction="out">
    <goalmapping ref="cnp_receiver_interaction.interaction_description"/>
    <goalmapping ref="perform_interaction.interaction_description"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="cnp_receiver_interaction.result"/>
    <goalmapping ref="perform_interaction.result"/>
   </parameter>
   <body class="CNPReceiverPlan" />
   <!-- <body>new CNPReceiverPlan()</body> -->
   <trigger>
    <goal ref="cnp_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_CONTRACT_NET.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>
  
  <plan name="icnp_initiator_plan">
   <parameter name="iterated" class="Boolean">
    <value>Boolean.TRUE</value>
   </parameter>
   <parameter name="cfp" class="Object">
    <goalmapping ref="icnp_initiate.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="icnp_initiate.cfp_info"/>
   </parameter>
   <parameter name="ontology" class="String">
    <goalmapping ref="icnp_initiate.ontology"/>
   </parameter>
   <parameter name="language" class="String">
    <goalmapping ref="icnp_initiate.language"/>
   </parameter>
   <parameter name="timeout" class="Long">
    <goalmapping ref="icnp_initiate.timeout"/>
   </parameter>
   <parameter name="executeall" class="boolean">
    <goalmapping ref="icnp_initiate.executeall"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="icnp_initiate.interaction_state"/>
   </parameter>
   <parameterset name="receivers" class="AgentIdentifier">
    <goalmapping ref="icnp_initiate.receivers"/>
   </parameterset>
   <parameterset name="result" class="Object" direction="out">
    <goalmapping ref="icnp_initiate.result"/>
   </parameterset>
   <parameterset name="history" class="NegotiationRecord">
    <goalmapping ref="icnp_initiate.history"/>
   </parameterset>
   <body class="CNPInitiatorPlan" />
   <!-- <body>new CNPInitiatorPlan()</body> -->
   <trigger>
    <goal ref="icnp_initiate"/>
   </trigger>
  </plan>

  <!-- Default plan for evaluate proposals goal. -->
  <plan name="icnp_evaluateproposals_plan" priority="-1">
   <parameter name="cfp" class="Object">
    <goalmapping ref="icnp_evaluate_proposals.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="icnp_evaluate_proposals.cfp_info"/>
   </parameter>
   <parameterset name="proposals" class="ParticipantProposal">
    <goalmapping ref="icnp_evaluate_proposals.proposals"/>
   </parameterset>
   <parameterset name="acceptables" class="ParticipantProposal" optional="true" direction="out">
    <goalmapping ref="icnp_evaluate_proposals.acceptables"/>
   </parameterset>
   <parameterset name="history" class="NegotiationRecord">
    <goalmapping ref="icnp_evaluate_proposals.history"/>
   </parameterset>
   <body class="CNPEvaluateProposalsPlan" />
   <trigger>
    <goal ref="icnp_evaluate_proposals"/>
   </trigger>
   <precondition>$goal.cfp_info instanceof IProposalEvaluator</precondition>
  </plan>

  <!-- Default plan for query nextround-info goal. -->
  <plan name="icnp_querynextroundinfo_plan" priority="-1">
   <parameter name="cfp" class="Object">
    <goalmapping ref="icnp_nextround_info.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object" direction="inout">
    <goalmapping ref="icnp_nextround_info.cfp_info"/>
   </parameter>
   <parameter name="iterate" class="Boolean" direction="out">
    <goalmapping ref="icnp_nextround_info.iterate"/>
   </parameter>   
   <parameterset name="participants" class="AgentIdentifier" direction="inout">
    <goalmapping ref="icnp_nextround_info.participants"/>
   </parameterset>
   <parameterset name="proposals" class="ParticipantProposal">
    <goalmapping ref="icnp_nextround_info.proposals"/>
   </parameterset>
   <parameterset name="history" class="NegotiationRecord">
    <goalmapping ref="icnp_nextround_info.history"/>
   </parameterset>
   <body class="CNPQueryNextroundInfoPlan" />
   <trigger>
    <goal ref="icnp_nextround_info"/>
   </trigger>
   <precondition>$goal.cfp_info instanceof IQueryNextroundInfo</precondition>
  </plan>

  <plan name="icnp_receiver_plan">
   <parameter name="iterated" class="Boolean">
    <value>Boolean.TRUE</value>
   </parameter>
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="icnp_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="icnp_receiver_interaction.interaction_state"/>
    <goalmapping ref="perform_interaction.interaction_state"/>
   </parameter>
   <parameter name="interaction_description" class="Object" direction="out">
    <goalmapping ref="icnp_receiver_interaction.interaction_description"/>
    <goalmapping ref="perform_interaction.interaction_description"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="icnp_receiver_interaction.result"/>
    <goalmapping ref="perform_interaction.result"/>
   </parameter>
   <body class="CNPReceiverPlan" />
   <!-- <body>new CNPReceiverPlan()</body> -->
   <trigger>
    <goal ref="icnp_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_ITERATED_CONTRACT_NET.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>
  
  <plan name="ea_initiator_plan">  
   <parameter name="auction_description" class="AuctionDescription">
    <goalmapping ref="ea_initiate.auction_description"/>
   </parameter>
   <parameter name="cfp" class="Object">
    <goalmapping ref="ea_initiate.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="ea_initiate.cfp_info"/>
   </parameter>
   <parameter name="limit" class="Comparable">
    <goalmapping ref="ea_initiate.limit"/>
   </parameter>
   <parameter name="ontology" class="String">
    <goalmapping ref="ea_initiate.ontology"/>
   </parameter>
   <parameter name="language" class="String">
    <goalmapping ref="ea_initiate.language"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="ea_initiate.interaction_state"/>
   </parameter>
   <parameter name="result" class="Object">
    <goalmapping ref="ea_initiate.result"/>
   </parameter>
   <parameterset name="receivers" class="AgentIdentifier">
    <goalmapping ref="ea_initiate.receivers"/>
   </parameterset>
   <body class="EAInitiatorPlan" />
   <!-- <body>new EAInitiatorPlan()</body> -->
   <trigger>
    <goal ref="ea_initiate"/>
   </trigger>
  </plan>  
    
  <plan name="ea_receiver_plan" priority="-1">
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="ea_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="ea_receiver_interaction.interaction_state"/>
    <goalmapping ref="perform_interaction.interaction_state"/>
   </parameter>
   <parameter name="interaction_description" class="Object" direction="out">
    <goalmapping ref="ea_receiver_interaction.interaction_description"/>
    <goalmapping ref="perform_interaction.interaction_description"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="ea_receiver_interaction.result"/>
    <goalmapping ref="perform_interaction.result"/>
   </parameter>
   <body class="EAReceiverPlan" />
   <!-- <body>new EAReceiverPlan()</body> -->
   <trigger>
    <goal ref="ea_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_ENGLISH_AUCTION.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>
    
  <plan name="da_initiator_plan">  
   <parameter name="auction_description" class="AuctionDescription">
    <goalmapping ref="da_initiate.auction_description"/>
   </parameter>
   <parameter name="cfp" class="Object">
    <goalmapping ref="da_initiate.cfp"/>
   </parameter>
   <parameter name="cfp_info" class="Object">
    <goalmapping ref="da_initiate.cfp_info"/>
   </parameter>
   <parameter name="ontology" class="String">
    <goalmapping ref="da_initiate.ontology"/>
   </parameter>
   <parameter name="language" class="String">
    <goalmapping ref="da_initiate.language"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="da_initiate.interaction_state"/>
   </parameter>
   <parameter name="result" class="Object">
    <goalmapping ref="da_initiate.result"/>
   </parameter>
   <parameterset name="receivers" class="AgentIdentifier">
    <goalmapping ref="da_initiate.receivers"/>
   </parameterset>
   <body class="DAInitiatorPlan" />
   <!-- <body>new DAInitiatorPlan()</body> -->
   <trigger>
    <goal ref="da_initiate"/>
   </trigger>
  </plan>  
  
  <plan name="da_receiver_plan" priority="-1">
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="da_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <parameter name="interaction_state" class="InteractionState" direction="out">
    <goalmapping ref="da_receiver_interaction.interaction_state"/>
    <goalmapping ref="perform_interaction.interaction_state"/>
   </parameter>
   <parameter name="interaction_description" class="Object" direction="out">
    <goalmapping ref="da_receiver_interaction.interaction_description"/>
    <goalmapping ref="perform_interaction.interaction_description"/>
   </parameter>
   <parameter name="result" class="Object" direction="out">
    <goalmapping ref="da_receiver_interaction.result"/>
    <goalmapping ref="perform_interaction.result"/>
   </parameter>
   <body class="DAReceiverPlan" />
   <!-- <body>new DAReceiverPlan()</body> -->
   <trigger>
    <goal ref="da_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_DUTCH_AUCTION.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>
  
  <!-- FIPA-Cancel-Meta-Protocol plans -->
  
  <!-- FIPA-Cancel-Meta-Protocol generic interaction goal creation plan. -->
  <plan name="cm_interaction_goal_creation_plan">
   <parameter name="goaltype" class="String">
    <value>"cm_receiver_interaction"</value>
   </parameter>
   <body class="InteractionGoalCreationPlan" />
   <!-- <body>new InteractionGoalCreationPlan()</body> -->
   <trigger>
    <messageevent ref="cm_cancel"/>
   </trigger>
  </plan>  
  
  <!-- Plan for cancelling an interaction (receiver side of FIPA-Cancel-Meta-Protocol). -->
  <plan name="cm_receiver_plan">
   <parameter name="message" class="IMessageEvent">
    <goalmapping ref="cm_receiver_interaction.message"/>
    <goalmapping ref="perform_interaction.message"/>
   </parameter>
   <body class="CMReceiverPlan" />
   <!-- <body>new CMReceiverPlan()</body>-->
   <trigger>
    <goal ref="cm_receiver_interaction"/>
    <goal ref="perform_interaction">
     <match>SFipa.PROTOCOL_CANCEL_META.equals($goal.message.getParameter(SFipa.PROTOCOL).getValue())</match>
    </goal>
   </trigger>
  </plan>
  
  <!-- Default plan for deciding about cancellation. -->
  <plan name="cm_approve_cancel_plan" priority="-1">
   <parameter name="result" class="boolean">
    <goalmapping ref="cm_approve_cancel.result"/>
   </parameter>
   <body class="CMApproveCancelPlan" />
   <!-- <body>new CMApproveCancelPlan()</body> -->
   <trigger>
    <goal ref="cm_approve_cancel"/>
   </trigger>
  </plan>
  
 </plans>

 <events>
  <messageevent name="rp_request" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.REQUEST</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="conversation-id" class="String">
    <value>SFipa.createUniqueId($scope.getAgentName())</value>
   </parameter>
   <!--<parameter name="reply-with" class="String">
    <value>SFipa.createUniqueId($scope.getAgentName())</value>
   </parameter>-->
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
   </parameter>
   <match>$beliefbase.rp_filter.filter($messagemap) &amp;&amp; $messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="rp_agree" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.AGREE</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="rp_refuse" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.REFUSE</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="rp_failure" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.FAILURE</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="rp_not_understood" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.NOT_UNDERSTOOD</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="rp_inform" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.INFORM</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_REQUEST</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <!--- cnp -->

  <messageevent name="cnp_cfp" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.CFP</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_CONTRACT_NET</value>
   </parameter>
   <!-- hmm inout needed to read it in plan :-( -->
   <parameter name="conversation-id" class="String" direction="inout">
    <value>SFipa.createUniqueId($scope.getAgentName())</value>
   </parameter>
   <!--<parameter name="reply-with" class="String">
    <value>SFipa.createUniqueId($scope.getAgentName())</value>
   </parameter>-->
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
   <match>$beliefbase.cnp_filter.filter($messagemap) &amp;&amp; $messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="cnp_propose" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.PROPOSE</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_CONTRACT_NET</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="cnp_refuse" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.REFUSE</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_CONTRACT_NET</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messageevent>

  <messageevent name="cnp_reject" type="fipa" exported="true">
   <parameter name="performative" class="String" direction="fixed">
    <value>SFipa.REJECT_PROPOSAL</value>
   </parameter>
   <parameter name="protocol" class="String" direction="fixed">
    <value>SFipa.PROTOCOL_CONTRACT_NET</value>
   </parameter>
   <parameter name="language" class="String">
    <value>SFipa.NUGGETS_XML</value>
    </parameter>
    <match>$messagemap.get("$conversation_id")!=null</match>
  </messag

分享到:
评论

相关推荐

    EPC Radio-Frequency Identity Protocols

    ### EPC™ Radio-Frequency Identity (RFID) Protocols #### 概述 EPC™ Radio-Frequency Identity Protocols(EPC™射频识别协议)是针对超高频(UHF)射频识别(RFID)通信的一套标准,具体版本为Class-1 ...

    Web Application Architecture Principles Protocols and Practices

    《Web Application Architecture Principles Protocols and Practices》是一本深入探讨Web应用程序设计基础的专著,它涵盖了Web架构的关键要素,包括原则、协议以及实践方法。在本文中,我们将详细阐述这些核心概念...

    ATM Signalling PROTOCOLS AND PRACTICE

    ### ATM Signaling: Protocols and Practice #### 背景介绍 随着通信技术的发展,特别是随着ATM(Asynchronous Transfer Mode)技术的兴起,对于如何有效地进行信号传递、配置网络连接以及管理网络资源的需求日益...

    Formal Correctness of Security Protocols

    《Formal Correctness of Security Protocols》是一本深入探讨安全协议形式验证的书籍,主要涵盖了前七个章节的内容。这本书旨在确保网络安全协议在设计和实施过程中能够达到预期的安全目标,防止潜在的攻击和漏洞。...

    IPv6 Core Protocols Implementation

    《IPv6 Core Protocols Implementation》一书由Qing Li、Tatuya Jinmei和Keiichi Shima合著,系统地介绍了IPv6的核心协议及其实施方法。 #### 二、IPv6概述 IPv6是为了解决IPv4地址空间不足而设计的新一代互联网...

    Multiple Access Protocols For Mobile Communications GPRS UMTS And Beyond - Wiley 2002.pdf

    本书《Multiple Access Protocols for Mobile Communications: GPRS, UMTS and Beyond》由Alex Brand与Hamid Aghvami合著,于2002年由John Wiley & Sons出版社出版。该书主要围绕移动通信中的多址接入协议展开,详细...

    计算机网络协议图 network associates guide to communications protocols

    本文将基于《Network Associates Guide to Communications Protocols》中的内容,详细介绍计算机网络中的各层协议及其功能,并对部分具体协议进行解析。 #### 二、OSI七层模型概述 为了更好地理解各种网络协议之间...

    l7-protocols-2009-05-10.tar

    标题 "l7-protocols-2009-05-10.tar" 暗示了这是一个关于网络协议的资源,特别的是,它涉及到第七层(应用层)的协议。在 OSI 模型中,第七层是最高层,处理应用程序和用户之间的交互。这个压缩包可能包含了一系列与...

    Network Associates Guide To Communications Protocols.pdf .pdf

    在这份名为《Network Associates Guide To Communications Protocols》的文档中,探讨了多种网络通信协议,它们是计算机网络中用于数据交换的一套规范和约定。文档内容丰富,涵盖了从传输层到应用层的广泛协议,它们...

    tcp_ip_illustrated_volume_1_the_protocols.pdf

    ### TCP/IP Illustrated Volume 1: The Protocols #### 概述 《TCP/IP Illustrated Volume 1: The Protocols》是一本深入介绍TCP/IP协议栈基础知识的经典书籍,由W. Richard Stevens编写。本书不仅适合初学者作为...

    Radio Protocols for LTE and LTE-Advanced

    《Radio Protocols for LTE and LTE-Advanced》一书由SeungJune Yi、SungDuck Chun、YoungDae Lee、SungJun Park和SungHoon Jung共同撰写,他们均来自韩国LG Electronics公司,并于2012年由John Wiley & Sons ...

    红头发笔记Routing Protocols Illstrated Vol.1

    《红头发笔记Routing Protocols Illustrated Vol.1》深入解析了内部路由协议的运作机制以及如何控制路由选择,是一部由Babe.Ga(红头发)撰写的专业IT书籍,首次发布于2004年9月,版权受中国法律保护。本书通过详尽...

    Bridges, Routers, Switches and Internetworking Protocols

    标题与描述中的“Bridges, Routers, Switches and Internetworking Protocols”涵盖了网络设备和协议在构建互联网络中的关键角色。这些组件不仅在数据传输中扮演着核心角色,而且是理解现代网络架构的基础。 ### ...

    Pelco PTZ Protocols D Protocol Version 5.0.1

    ### Pelco PTZ Protocols D Protocol Version 5.0.1 知识点解析 #### 一、概览 **Pelco PTZ Protocols D Protocol Version 5.0.1** 是一个通信协议规范,旨在定义了控制设备与接收器/驱动器之间的通信方式。该文档...

    Protocols for Secure Electronic Commerce,2nd Edition,CRC

    《Protocols for Secure Electronic Commerce,2nd Edition,CRC》由Mostafa Hashem Sherif博士编写,作为《Advanced and Emerging Communications Technologies Series》系列书籍之一,这本书详细介绍了在电子商务...

    Network Routing: Algorithms Protocols and Architectures

    标题所描述的《Network Routing: Algorithms, Protocols and Architectures》一书,是一本专注于网络路由领域的技术作品。该书深入探讨了网络路由的算法、协议以及架构,这三个方面是网络设计和实现中不可或缺的要素...

    multiple access protocols performance and analysis 英文版,超清晰,非扫描

    《多址接入协议性能与分析》一书由Raphael Rom和Moshe Sidi共同撰写,该书籍详细探讨了计算机通信网络中的多址接入协议(Multiple Access Protocols)及其性能分析,是Springer-Verlag出版社出版的专业性著作。...

Global site tag (gtag.js) - Google Analytics