Documentation
¶
Index ¶
- Variables
- type Simulation
- func (simulation *Simulation) CheckoutAgents(engine *gongsim_models.Engine)
- func (simulation *Simulation) CommitAgents(engine *gongsim_models.Engine)
- func (simulation *Simulation) GetEngine() (engine *gongsim_models.Engine)
- func (simulation *Simulation) GetLastCommitNb() (commitNb uint)
- func (simulation *Simulation) GetLastCommitNbFromFront() (commitNb uint)
- func (simulation *Simulation) HasAnyStateChanged(engine *gongsim_models.Engine) bool
- func (simulation *Simulation) Reset(engine *gongsim_models.Engine)
Constants ¶
This section is empty.
Variables ¶
var MapMessageVisualTrack = make(map[*gongfly_models.Message]*gongleaflet_models.VisualTrack)
map to store dynamicaly association between message and visual tracks
Functions ¶
This section is empty.
Types ¶
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
Simulation meets the gongsim_models.SimulationInterface
it is in a separate package from the models package because it handles the relation to the visual representation of the simulaton object with leaflet
func NewSimulation ¶
func NewSimulation( gongflyStage *gongfly_models.StageStruct, gongsimStage *gongsim_models.StageStruct, gongleafletStage *gongleaflet_models.StageStruct) (simulation *Simulation)
NewSimulation ...
func (*Simulation) CheckoutAgents ¶
func (simulation *Simulation) CheckoutAgents(engine *gongsim_models.Engine)
CheckoutAgents checkout all staged agents to the back repo
func (*Simulation) CommitAgents ¶
func (simulation *Simulation) CommitAgents(engine *gongsim_models.Engine)
CommitAgent is called by the generic engine anytime a visual refresh is needed Commit will perform a write of all agent state to the back repo and the back repo will be checked out by the front repo (for display sake)
func (*Simulation) GetEngine ¶
func (simulation *Simulation) GetEngine() (engine *gongsim_models.Engine)
func (*Simulation) GetLastCommitNb ¶
func (simulation *Simulation) GetLastCommitNb() (commitNb uint)
GetLastCommitNb is used by the front repo to computer wether a checkout is necessary It does so by comparing successive commit nb
func (*Simulation) GetLastCommitNbFromFront ¶
func (simulation *Simulation) GetLastCommitNbFromFront() (commitNb uint)
func (*Simulation) HasAnyStateChanged ¶
func (simulation *Simulation) HasAnyStateChanged(engine *gongsim_models.Engine) bool
HasAnyStateChanged is used when the simulation user ask to advance up to the next state change. It is not implemented in this simulation
func (*Simulation) Reset ¶
func (simulation *Simulation) Reset(engine *gongsim_models.Engine)
Reset simulation