catnet.strategy
Interface IPricing

All Known Implementing Classes:
avalanche, zeroIntelligence

public interface IPricing

Überschrift: B2B-OS Beschreibung: Copyright: Copyright (c) 2001 Organisation: IIG Telematik, Albert-Ludwigs-Universitaet Freiburg


Field Summary
static java.lang.String[] actionText
          Description of the Field
 
Method Summary
 double bargain(java.lang.Integer factorID, int proposalTypeToGenerate, double opponentsNewPrice, double myOldPrice, java.lang.Integer negotiationID)
          This method should handle all computation related to finding a price for distributive negotiation.
 double getAveragePrice(java.lang.Integer factorID)
          Gets the averagePrice attribute of the IPricing object
 java.lang.String getExecutionState()
          Gets the executionState attribute of the zeroIntelligence object
 double getInitialPrice(java.lang.Integer factorID, int type)
          Gets the initialPrice attribute of the IPricing object, that means the price UP from which a good is BID or DOWN from which a good is ASKed.
 double getLimitPrice(java.lang.Integer factorID, int type)
          Gets the limitPrice attribute of the IPricing object, which means the price UP to which a good is ASKed or DOWN to which a good is BID for selling.
 Genotype getMyGenotype()
          Gets the myGenotype attribute of the IPricing object
 NegotiationHistory getNegotiationHistory(java.lang.String conversationID)
          Gets the negotiationHistory attribute of the IPricing object
 int getRecommendedAction()
          Action to take recommended by the pricing strategy.
 void setMyGenotype(Genotype myGenotype)
          Sets the myGenotype attribute of the IPricing object
 void setParameters(java.util.HashMap strategyHash)
          Sets the parameters attribute of the IPricing object
 void setPrices(java.lang.Integer factorID, double min, double max)
          Sets the prices attribute of the IPricing object
 

Field Detail

actionText

public static final java.lang.String[] actionText
Description of the Field

Method Detail

bargain

public double bargain(java.lang.Integer factorID,
                      int proposalTypeToGenerate,
                      double opponentsNewPrice,
                      double myOldPrice,
                      java.lang.Integer negotiationID)
This method should handle all computation related to finding a price for distributive negotiation. Basically, buyers and sellers will use the same method and compare their different valuation of the good (unit price). This valuation changes over the course of the negotiation by making concessions. If both values match, a compromise has been found and the good will (probably) change its owner.

Parameters:
opponentsNewPrice - actual price how opponent values one unit of the good
myOldPrice - last price that I valued one unit of the good
factorID - Description of the Parameter
negotiationID - Description of the Parameter
proposalTypeToGenerate - Description of the Parameter
Returns:
price to reply to opponent

setParameters

public void setParameters(java.util.HashMap strategyHash)
Sets the parameters attribute of the IPricing object

Parameters:
strategyHash - The new parameters value

setPrices

public void setPrices(java.lang.Integer factorID,
                      double min,
                      double max)
Sets the prices attribute of the IPricing object

Parameters:
factorID - The new prices value
min - The new prices value
max - The new prices value

getLimitPrice

public double getLimitPrice(java.lang.Integer factorID,
                            int type)
Gets the limitPrice attribute of the IPricing object, which means the price UP to which a good is ASKed or DOWN to which a good is BID for selling. (The initialPrice is technically the reverse).

Parameters:
factorID - Description of the Parameter
type - Description of the Parameter
Returns:
The limitPrice value

getNegotiationHistory

public NegotiationHistory getNegotiationHistory(java.lang.String conversationID)
Gets the negotiationHistory attribute of the IPricing object

Parameters:
conversationID - Description of the Parameter
Returns:
The negotiationHistory value

getInitialPrice

public double getInitialPrice(java.lang.Integer factorID,
                              int type)
Gets the initialPrice attribute of the IPricing object, that means the price UP from which a good is BID or DOWN from which a good is ASKed. (The limitPrice is technically the reverse).

Parameters:
factorID - Description of the Parameter
type - Description of the Parameter
Returns:
The initialPrice value

getAveragePrice

public double getAveragePrice(java.lang.Integer factorID)
Gets the averagePrice attribute of the IPricing object

Parameters:
factorID - Description of the Parameter
Returns:
The averagePrice value

getRecommendedAction

public int getRecommendedAction()
Action to take recommended by the pricing strategy. Constant values are as follows:

Returns:
The recommendedAction value

getExecutionState

public java.lang.String getExecutionState()
Gets the executionState attribute of the zeroIntelligence object

Returns:
The executionState value

setMyGenotype

public void setMyGenotype(Genotype myGenotype)
Sets the myGenotype attribute of the IPricing object

Parameters:
myGenotype - The new myGenotype value

getMyGenotype

public Genotype getMyGenotype()
Gets the myGenotype attribute of the IPricing object

Returns:
The myGenotype value