|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.boxed_economy.besp.model.fmfw.FmFwObject
org.boxed_economy.besp.model.fmfw.World
モデルにおけるworldを定義します。Worldの役割は以下の通りです。 1.worldにAgentを配置して管理します。 2.Worldを継承したクラスによってモデルを定義することができます。 (Agentの生成・追加などをinit()をオーバーライドして記述します。) 3.Clock,Spaceを保持し、取得できます。(Worldの時間・空間を規定) 4.乱数生成アルゴリズム(RandomNumberGenerator)を管理します。 5.Vocaburalyクラスを通して、Model内のTypeを管理します。 これらの役割から、基礎モデルによって実現される経済モデルでWorldはベースとなる要素と いうことができます。 また、実装のために以下の機能があります。 Worldにデフォルト実装を行ないました。基礎モデルで定義されている機能に加えて ・UpdateModelEventを配信するために、PresentationContainerを取得する機能 ・一定時間実行のためのLimitedRunSettingの管理 ・TimeEventの配信順を管理するために、PriorityクラスとTypeを関連付ける機能
入れ子クラスの概要 |
クラス org.boxed_economy.besp.model.fmfw.FmFwObject から継承した入れ子クラス |
FmFwObject.InstanceCounter |
コンストラクタの概要 | |
World()
|
メソッドの概要 | |
void |
consumeGoods(Goods goods)
Goodsを消費するために明示的に呼ぶメソッドです。 |
Agent |
createAgent()
デフォルトの定数を利用してエージェントを生成します。 |
Agent |
createAgent(AgentType type)
エージェントを生成します。 |
Goods |
createGoods(GoodsType type,
double quantity)
引数に基づき、Goodsを生成して返します。 |
void |
destroyAgent(Agent agent)
WorldからAgentを削除します。 |
protected void |
fireAgentCreated(UpdateWorldEvent e)
イベント送信関連 |
protected void |
fireAgentDestroyed(UpdateWorldEvent e)
|
protected void |
fireGoodsConsumed(UpdateWorldEvent e)
|
protected void |
fireGoodsCreated(UpdateWorldEvent e)
|
Agent |
getAgent(AgentType type)
引数のTypeのAgentを返します。 |
java.util.Collection |
getAgents(AgentType type)
引数のTypeのAgentのCollectionを返します。 |
java.util.Collection |
getAgentsRecursively(AgentType type)
引数のType及びその子TypeのAgentのCollectionを返します。 |
AgentType |
getAgentType(java.lang.String key)
キーに該当するAgentTypeを取得します。 |
java.util.Collection |
getAllAgents()
全てのAgentの集合を返します。 |
BehaviorType |
getBehaviorType(Behavior behavior)
Behaviorに該当するBehaviorTypeを取得します。 |
BehaviorType |
getBehaviorType(java.lang.String key)
キーに該当するBehaviorTypeを取得します。 |
Clock |
getClock()
このWorldが保持するClockを取得します。 |
long |
getDefaultRandomSeed()
Returns the defaultRandomSeed. |
java.lang.String |
getDescription()
モデルの説明を返します. |
GoodsType |
getGoodsType(java.lang.String key)
キーに該当するGoodsTypeを取得します。 |
InformationType |
getInformationType(Information information)
Informationに該当するInformationTypeを取得します。 |
InformationType |
getInformationType(java.lang.String key)
キーに該当するInformationTypeを取得します。 |
ModelContainer |
getModelContainer()
|
java.lang.String |
getName()
モデルの名前を返します。 |
PresentationContainer |
getPresentationContainer()
|
int |
getPriority(AgentType agentType)
引数のAgentTypeに対応するPriorityを返します。 |
RandomNumberGenerator |
getRandomNumberGenerator()
DefaultのRandomNumberGeneratorを検索して返します。 |
RandomNumberGenerator |
getRandomNumberGenerator(java.lang.String name)
引数のnameのRandomNumberGeneratorを検索して返します。 |
RelationType |
getRelationType(java.lang.String key)
キーに該当するRelationTypeを取得します。 |
Space |
getSpace()
このWorldが保持する空間を取得します。 |
long |
getTimeEventRandomSeed()
Returns the timeEventRandomSeed. |
void |
initialize()
初期化します |
void |
initializeAgents()
エージェントを初期化します (エージェント, 財, 関係の初期化を想定しています) |
void |
initializeWorld()
世界を初期化します (ランダム, 時計, 空間の初期化を想定しています) |
AgentType |
installAgentType(java.lang.String name)
AgentTypeを生成して返します。 |
AgentType |
installAgentType(java.lang.String name,
int priority)
AgentTypeを生成して返します。 |
BehaviorType |
installBehaviorType(java.lang.String name)
BehaviorTypeを生成して返します。 |
GoodsType |
installGoodsType(java.lang.String name)
GoodsTypeを生成して返します。 |
InformationType |
installInformationType(java.lang.String name)
InformationTypeを生成して返します。 |
void |
installRandomNumberGenerator(RandomNumberGenerator random)
引数のRandomNumberGeneratorをrandomMapに追加します。 |
RelationType |
installRelationType(java.lang.String name)
RelationTypeを生成して返します。 |
void |
setClock(Clock clock)
global時間を設定します。 |
void |
setDefaultRandomSeed(long defaultRandomSeed)
Sets the defaultRandomSeed. |
void |
setModelContainer(ModelContainer container)
Container関連 |
void |
setPriority(AgentType agentType,
int priority)
Priorityを追加設定します。 |
void |
setSpace(Space space)
global空間を設定します。 |
void |
setTimeEventRandomSeed(long timeEventRandomSeed)
Sets the timeEventRandomSeed. |
クラス org.boxed_economy.besp.model.fmfw.FmFwObject から継承したメソッド |
finalize, getInstanceCounters |
クラス java.lang.Object から継承したメソッド |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public World()
メソッドの詳細 |
public final void initialize()
public void initializeWorld()
public void initializeAgents()
public java.lang.String getName()
public java.lang.String getDescription()
public void setModelContainer(ModelContainer container)
public PresentationContainer getPresentationContainer()
public ModelContainer getModelContainer()
public Agent getAgent(AgentType type)
type
- 指定するAgentType
public java.util.Collection getAgents(AgentType type)
type
- 指定するAgentType
public java.util.Collection getAgentsRecursively(AgentType type)
type
- 指定するAgentType
public java.util.Collection getAllAgents()
public Agent createAgent()
public Agent createAgent(AgentType type)
type
- 生成するAgentのType
public void destroyAgent(Agent agent)
public Goods createGoods(GoodsType type, double quantity)
type
- Goodsに指定するのGoodsType
public void consumeGoods(Goods goods)
goods
- public void setClock(Clock clock)
clock
- 設定する時間public Clock getClock()
public void setSpace(Space space)
space
- 設定する空間public Space getSpace()
public RandomNumberGenerator getRandomNumberGenerator(java.lang.String name)
public RandomNumberGenerator getRandomNumberGenerator()
public void installRandomNumberGenerator(RandomNumberGenerator random)
public long getDefaultRandomSeed()
public void setDefaultRandomSeed(long defaultRandomSeed)
defaultRandomSeed
- The defaultRandomSeed to setpublic long getTimeEventRandomSeed()
public void setTimeEventRandomSeed(long timeEventRandomSeed)
timeEventRandomSeed
- The timeEventRandomSeed to setpublic AgentType getAgentType(java.lang.String key)
key
- 検索するキー文字列public BehaviorType getBehaviorType(java.lang.String key)
key
- 検索するキー文字列public BehaviorType getBehaviorType(Behavior behavior)
public GoodsType getGoodsType(java.lang.String key)
key
- 検索するキー文字列public InformationType getInformationType(java.lang.String key)
key
- 検索するキー文字列public InformationType getInformationType(Information information)
public RelationType getRelationType(java.lang.String key)
key
- 検索するキー文字列public AgentType installAgentType(java.lang.String name)
name
- 生成するTypeの名前
public AgentType installAgentType(java.lang.String name, int priority)
name
- 生成するTypeの名前
public GoodsType installGoodsType(java.lang.String name)
name
- 生成するTypeの名前
public BehaviorType installBehaviorType(java.lang.String name)
name
- 生成するTypeの名前
public RelationType installRelationType(java.lang.String name)
name
- 生成するTypeの名前
public InformationType installInformationType(java.lang.String name)
name
- 生成するTypeの名前
public int getPriority(AgentType agentType)
agentType
- 取得したいPriorityのType
public void setPriority(AgentType agentType, int priority)
agentType
- 関連付けるTypeprotected void fireAgentCreated(UpdateWorldEvent e)
protected void fireAgentDestroyed(UpdateWorldEvent e)
protected void fireGoodsCreated(UpdateWorldEvent e)
protected void fireGoodsConsumed(UpdateWorldEvent e)
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |