Rollerslam PIM 2.0.2 (a)
description
Transcript of Rollerslam PIM 2.0.2 (a)
Rollerslam PIM2.0.2 (a)
Top Level
Service Specification View
<<subject>>Rollerslam
<<K2Realize>><<interface>>
SimulationAdmin---------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
simAdmin
<<K2Component >>Rollerslam
-----------------------------------------------------------------------------------------------------------------------------
Realization Service View
<<K2Component>>Simulation
Infrastructure<<interface>>
Display<<K2Component>>
GameDisplay
<<interface>>SimulationAdmin
<<K2Component>>ControlPanel
<<K2Use>>
<<K2Use>>
<<K2Realize>>
<<K2Realize>><<interface>>
Agent
*
<<K2Component>>Player
<<K2Component>>Referee
<<K2Component>>Coach
<<K2Component>>GamePhysics
<<K2Use>>
<<K2Realize>>
agents
env{subsets agents}
<<K2Use>>
: Rollerslam-----------------------------------------------------------------------------------------------------------------------------
Realization Instance View
: SimulationInfrastructure
: Displaydisp1 :
RollerslamDisplay
: SimulationAdmin: Control
Panel
: Displaydisp2 :
RollerslamDisplay
<<K2UseLink>>
<<K2UseLink>>
<<K2RealizeLink>>
<<K2RealizeLink>>
: GamePhysics : Coach : Referee : Player : Player...
gfa : Agent ca : Agent r : Agent p1 : Agent p40 : Agent
<<K2UseLink>>
<<K2UseLink>>
<<K2RealizeLink>> <<K2RealizeLink>> <<K2RealizeLink>> <<K2RealizeLink>> <<K2RealizeLink>>
<<K2UseLink>> <<K2RealizeLink>>
<<K2RealizeLink>>
SimulationInfrastructure
Specification Service View
<<subject>>Simulation
Infrastructure
<<K2Use>>
<<K2Realize>>
*<<K2Use>> agents
env{subsets agents}
<<K2Use>>
<<interface>> Agent--------------------------------------------------------+ sendPerceptions(p:Message[0..*])+ getActions() : Message[0..*]+ setSimulationState(s:SimulationState)
<<interface>>Display
----------------------------+ update(m:Message)
<<interface>>SimulationAdmin
---------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
simAdmin
Specification Type View
<<interface>>SimulationState
-----------------------INITIALIZEDPAUSEDRUNNING
Message<<interface>>
Agentsender
Specification Life Cycle View
RUNNING PAUSED
setSimulationState(PAUSED)
setSimulationState(RUNNING)
INITIALIZED
setSimulationState(INITIALIZED)
Specification Operation View
context SimulationAdmin::setState(s:SimulationState) post: getState() = s
Realization Service View
<<K2Component>> Simulation Infrastructure---------------------------------------------------------------------------------------------------------------+ state : SimulationState---------------------------------------------------------------------------------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState---------------------------------------------------------------------------------------------------------------
<<K2Component>>Communication
Infrastructure
<<K2Component>>DisplayUpdater
<<interface>>Display
<<K2Use>>
<<K2Use>>
<<interface>>Agent
*
env {subsets agents}
agents <<interface>>Simulation
StateProvider<<K2Use>>
<<K2Realize>><<K2Use>>
<<interface>>
SimulationAdmin
Realization Instance View
: Simulation Infrastructure---------------------------------------------------------------------+ state : INITIALIZED---------------------------------------------------------------------
ag : Agent
env : Agent
d : Display
<<K2UseLink>>
<<K2UseLink>> <<K2RealizeLink>>
simAdmin
: CommunicationInfrastructure
: SimulationStateProvider
<<K2RealizeLink>>
: DisplayUpdater
<<K2UseLink>>
<<K2UseLink>>
Realization Operation View
context SimulationInfrastructure::setState(s:SimulationState) post: state = s and agents->forAll(ag|ag^setState(s))
context SimulationIntrastructure::getState() : SimulationState body: state
Display Updater
Specification Service View
<<K2Component>>DisplayUpdater
<<interface>>Display
<<K2Use>>
<<K2Use>>
<<interface>>SimulationStateProvider-------------------------------+getEnvState() : Message
Realization Service View
<<K2Component>>DisplayUpdater
-------------------------------+getEnvState() : Message
<<interface>>SimulationStateProvider-------------------------------+getEnvState() : Message
Realization Algorithmic View
display->forall(x | x^update(m))
result = simulationStateProvider^getEnvState().result()
m : Message
[simulationStateProvider.getState() == RUNNING]
CommunicationInfrastructure
Specification Service View
<<K2Component>>Communication
Infrastructure
<<K2Use>>
<<interface>>Agent
*
env {subsets agents}
agents <<interface>>Simulation
StateProvider<<K2Use>>
<<K2Realize>>
Realization Service View
<<K2Component>>Communication
InfrastructureMessage
envMsgs
*
envState 1
Realization Type View
context CommunicationInfrastructureinv: simulationStateProvider.getState() = self.envState
Realization Algorithmic View
envState = env.getActions().any()
envMsgs = agents->excluding(env)->iterate(ag;
result : Set(Message) = Set{} | result->including(ag.getActions))
agents->excluding(env)->forAll(ag | ag^sendPerceptions(Set{envState}))
env^sendPerceptions(envMsg)
Rollerslam PIM2.0.2 (b)
ORCAS Profile
<<stereotype>>K2Component
Agent
<<stereotype>>K2Use
Effector Sensor
<<stereotype>>K2Realize
Top Level
Service Specification View
<<subject>>Rollerslam
<<K2Realize>><<interface>>
SimulationAdmin---------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
simAdmin
Realization Service View
<<agent>>GamePhysics
<<agent>>Referee
<<agent>>Player
<<interface>> RefereeEffector---------------------------------------+ setScore(a:Integer, b:Integer)
<<interface>> FullyObservableWorldSensor---------------------------------------+ sense(model:World)
<<interface>> PlayerEffector---------------------------------------+ dash(dir:Vector)+ kick(dir:Vector)
<<sensor>>
<<sensor>>
<<sensor>>
<<sensor>><<effector>>
<<effector>>
<<effector>>40
41
<<K2Component>>GameDisplay
<<interface>> Display------------------------------------+ update(model:WorldModel)
<<K2Use>>
<<K2Realize>>
*
<<interface>>SimulationAdmin
---------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
<<K2Realize>>
<<K2Realize>>
Realization Operation View
context Rollerslam::setState(s:SimulationState) post: state = s and agents->forAll(ag|ag^setState(s))
context Rollerslam::getState() : SimulationState body: state