public class Main extends Simulator
mainclasses. See the
samples
to know how to extend this class.Env.MarketsFlat
DEBUG, agents, hifreqAgents, localAgents, markets, marketsF, normalAgents, orders
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
void |
beginSession(String sessionName)
Called at the beginning of every session.
|
void |
beginSimulation()
Called at the beginning of the simulation (before the first session).
|
List<Agent> |
createAgents(JSON.Value json)
Override this to create agents.
|
List<Event> |
createEvents(JSON.Value json)
Override this to create events.
|
List<Market> |
createMarkets(JSON.Value json)
Override this to create markets.
|
void |
endSession(String sessionName)
Called at the end of every session.
|
void |
endSimulation()
Called at the end of the simulation (after the last session).
|
Agent |
getAgentByName(JSON.Value json) |
Agent |
getAgentByName(String name) |
List<Agent> |
getAgentsByName(JSON.Value json) |
List<Agent> |
getAgentsByName(String name) |
List<Agent> |
getAgentsByName(List<String> names) |
Event |
getEventByName(JSON.Value json) |
Event |
getEventByName(String name) |
List<Event> |
getEventsByName(JSON.Value json) |
List<Event> |
getEventsByName(String name) |
List<Event> |
getEventsByName(List<String> names) |
Market |
getMarketByName(JSON.Value json) |
Market |
getMarketByName(String name) |
List<Market> |
getMarketsByName(JSON.Value json) |
List<Market> |
getMarketsByName(String name) |
List<Market> |
getMarketsByName(List<String> names) |
void |
print(String sessionName)
Override this to configure the standard outputs of the simulation.
|
beginSession, beginSimulation, createAgents, createAllAgents, createAllEvents, createAllMarkets, createEvents, createFundamentals, createItemGroup, createMarkets, endSession, endSimulation, getItemByName, getItemByName, getItemsByName, getItemsByName, getItemsByName, getRandom, print, updateFundamentals, updateMarketsUsingFundamentalPrice, updateMarketsUsingMarketPrice
addOrders, getenvOrElse, initMarketsF, prepareMarketsF, receiveMarketsF
public void beginSimulation()
public void endSimulation()
public void beginSession(String sessionName)
sessionName
- public void endSession(String sessionName)
sessionName
- public void print(String sessionName)
sessionName
- public List<Agent> createAgents(JSON.Value json)
json
- a JSON object, or properties of agents.public List<Market> createMarkets(JSON.Value json)
json
- a JSON object, or properties of markets.public List<Event> createEvents(JSON.Value json)
json
- a JSON object, or properties of events.public List<Market> getMarketsByName(JSON.Value json)
public Market getMarketByName(JSON.Value json)
public List<Market> getMarketsByName(List<String> names)
public List<Market> getMarketsByName(String name)
public Market getMarketByName(String name)
public List<Agent> getAgentsByName(JSON.Value json)
public Agent getAgentByName(JSON.Value json)
public List<Agent> getAgentsByName(List<String> names)
public List<Agent> getAgentsByName(String name)
public Agent getAgentByName(String name)
public List<Event> getEventsByName(JSON.Value json)
public Event getEventByName(JSON.Value json)
public List<Event> getEventsByName(List<String> names)
public List<Event> getEventsByName(String name)
public Event getEventByName(String name)