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