|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ntnu.ecosim.agents.Agent
edu.ntnu.ecosim.agents.serviceproviders.ServiceProvider
public class ServiceProvider
This is the class representing the service provider agent.
Field Summary |
---|
Fields inherited from class edu.ntnu.ecosim.agents.Agent |
---|
market |
Constructor Summary | |
---|---|
ServiceProvider(java.lang.String name,
int initsub,
double subFee,
double bindFee,
Market market,
java.lang.String strat,
int innostr,
int innotype,
int ecofl)
The constructor of service providers |
Method Summary | |
---|---|
void |
addInnovation(Innovation i)
Adds an innovation to the providers list of innovations |
void |
addSubscriber()
Adds a subscriber to the total number of subscribers. |
double |
calculateArpu()
Method to calculate the ARPU of the provider |
double |
calculateChurnRate()
Calculates the customer churn rate of the provider for this round |
protected int |
getAvgSubsCostInMarket()
Method used to compare this providers costs to the average subscription costs in the market. |
double |
getBindingFee()
Method used to get the binding fee of the provider |
Innovation |
getInnovation(int place)
Method to get an innovation from this providers list of innovations |
java.lang.String |
getName()
Gets the name of the provider |
int |
getNewSubscribers()
Gets the number of new subscribers. |
protected int |
getNofConsumersInMaret()
Gets the number of consumers in the market |
int |
getNofInnovations()
Gets the number of innovations by this service provider |
int |
getNofSubscribers()
Gets the number of subscribers. |
int |
getProfit()
Gets the total profit of this provider. |
double |
getRoundProfit()
Gets the profit for this round |
double |
getSubscriptionFee()
Gets the subscription fee of this provider |
java.lang.String |
getUniqueID()
Gets the unique ID of the provider. |
void |
performAction()
This is the method that is called for each new time step. |
void |
removeSubscriber()
Removes one subscriber from the total number of subscribers this service provider has. |
protected void |
setBindingFee(double bf)
Sets the binding fee for this provider |
void |
setSubscriptionFee(double sf)
Sets the subscription fee for the provider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceProvider(java.lang.String name, int initsub, double subFee, double bindFee, Market market, java.lang.String strat, int innostr, int innotype, int ecofl) throws NoSuchStrategyException
name
- The name of the providerinitsub
- The number of initial subscribers for this service providersubFee
- The subscription feebindFee
- The binding feemarket
- The market the provider operates withinstrat
- The strategy of the providerinnostr
- The innovation strategy of the providerinnotype
- The innovation type of the providerecofl
- The economic flexibility that the provider has
NoSuchStrategyException
- if the strategy is not recognizedMethod Detail |
---|
public void addInnovation(Innovation i)
i
- the innovationpublic void addSubscriber()
public double calculateArpu()
public double calculateChurnRate()
protected int getAvgSubsCostInMarket()
public double getBindingFee()
public Innovation getInnovation(int place)
place
- the place in the list the innovation is located at
public java.lang.String getName()
public int getNewSubscribers()
protected int getNofConsumersInMaret()
public int getNofInnovations()
public int getNofSubscribers()
public int getProfit()
public double getRoundProfit()
public double getSubscriptionFee()
public java.lang.String getUniqueID()
public void performAction()
Agent
performAction
in class Agent
public void removeSubscriber()
protected void setBindingFee(double bf)
bf
- the new binding fee of the service providerpublic void setSubscriptionFee(double sf)
sf
- the new subscription fee
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |