|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ntnu.ecosim.environment.Market
public class Market
The Market is where consumers and service providers operate. The market holds lists of all actors that are added, and some functionality for activating the agents.
Constructor Summary | |
---|---|
Market(SimulationManager sm)
The Market constructor. |
Method Summary | |
---|---|
void |
addConsumer()
Adds one consumer to the market. |
void |
addConsumer(ServiceProvider sp)
Adds one bound consumer to the market |
void |
addInitialConsumers(int nofConsumers)
Adds the initial (unbound) consumers. |
void |
addServiceProvider(java.lang.String name,
int initsub,
double subFee,
double bindFee,
java.lang.String strategy,
int innostr,
int innotype,
int ecofl)
Method to add one service provider to the market |
Consumer |
getConsumer(int uniqueID)
Method to get a consumer from the list of consumers |
int |
getConsumerPlanningHorizon()
Method to get the planning horizon of consumers |
double |
getInterestRate()
Method to get the interest rate in the market |
int |
getNofConsumers()
Gets the total number of consumers in the market |
int |
getNofProviders()
Gets the number of service providers in the market. |
ServiceProvider |
getServiceProvider(int no)
Gets the service provider according to the location in the list |
int |
getSimulationSpeed()
Method to get the simulation speed |
int |
getTime()
Gets the time of the clock (the number of months the simulation has run) |
int |
getTimeLeft()
Gets the time left of the simulation. |
int |
getTimeToRun()
Method to get the total number of time steps for this simulation |
int |
getUnboundConsumers()
Gets the number of unbound consumers in the market. |
boolean |
isStopped()
Gets whether or not the market i stopped |
void |
newTimeStep()
This method is called for every timestep. |
void |
reinitMarket()
Re-initialize the market. |
void |
setSimulationSpeed(int ssp)
Method to set the simulation speed |
void |
setTimeToRun(int ttr)
Method to set the number of intervals the simulator should run (time steps) |
void |
simulationDone()
Method to be called when the simulation is done |
void |
startMarket()
Starts the simulation of the market. |
void |
stopMarket()
Stops the simulation of the market. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Market(SimulationManager sm)
Method Detail |
---|
public void addConsumer()
public void addConsumer(ServiceProvider sp)
sp
- the service provider the consumer is bound topublic void addInitialConsumers(int nofConsumers)
nofConsumers
- The number of consumers to addpublic void addServiceProvider(java.lang.String name, int initsub, double subFee, double bindFee, java.lang.String strategy, int innostr, int innotype, int ecofl) throws NoSuchStrategyException
name
- The name of the service providerinitsub
- The number of initial subscriberssubFee
- The subscription fee for this providerbindFee
- The binding fee for the providerstrategy
- The strategy (innovative, reactive, innoreactive, etc.) for this providerinnostr
- The innovative strength (between 0 and 10)innotype
- The innovation type this company develops (between 0 and 10, where 0 is "only value-adding" and 10 is "only network effect adding")ecofl
- The economic flexibility of this company (between 0 and 10)
NoSuchStrategyException
- If the specified strategy could not be found.public Consumer getConsumer(int uniqueID)
uniqueID
- the unique ID of the consumer
public int getConsumerPlanningHorizon()
public double getInterestRate()
public int getNofConsumers()
public int getNofProviders()
public ServiceProvider getServiceProvider(int no)
no
- the location in the list
public int getSimulationSpeed()
public int getTime()
public int getTimeLeft()
public int getTimeToRun()
public int getUnboundConsumers()
public boolean isStopped()
public void newTimeStep()
public void reinitMarket()
public void setSimulationSpeed(int ssp)
ssp
- the "sleep time" of the main threadpublic void setTimeToRun(int ttr)
ttr
- the number of time steps that should be runpublic void simulationDone()
public void startMarket()
public void stopMarket()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |