sim.h
External header file
simInt.h
Internal header file
sim.c
Functions for doing module simulations
simDependency.c
Routines manipulating the atom dependency table.
simMain.c
Routines for commands and interface with Tcl/Tk.

sim.h

External header file

By: Freddy Mang

See AlsosimInt.h


simInt.h

Internal header file

By: Freddy Mang

See Alsooptional


sim.c

Functions for doing module simulations

By: Freddy Mang

This file contains the routines for module simulations.

See Alsooptional

Sim_SimAtomReadName()
Read the name of the simAtom
Sim_SimAtomReadIsUserAtom()
Returns true if the simAtom is an user atom.
Sim_SimAtomReadAtom()
Returns the atom that is represented by this simAtom.
Sim_SimAtomReturnSortedArray()
Returns a sorted array of the simAtoms.
Sim_SimAtomArrayFree()
Frees an array of simAtoms.
SimAtomAlloc()
Allocates a SimAtom.
SimAtomFree()
Frees an SimAtom.
SimSimulationStart()
Start Simulation for a module
SimManagerInit()
Initialize the global sim_manager
SimManagerReadSimInfo()
Returns the simInfo of the module.
SimManagerDeleteSimInfo()
Delete the simInfo of the module.
SimSimInfoAlloc()
Allocate a simInfo for a module
SimSimInfoFree()
Frees a simInfo
SimSimInfoAddToManager()
Add the simInfo to the Manager
SimSimInfoSetIndex()
Sets the Index field in the simInfo
SimSimInfoSetChoice()
Sets the Choice field in the simInfo
SimSimInfoSetSimAtomOrder()
Sets the SimAtomOrder field in the simInfo.
SimSimInfoSetPrevState()
Sets the PrevState field.
SimSimInfoSetPartialState()
Sets the PartialState field.
SimSimInfoSetVarInfo()
Sets the varInfo field.
SimComputeChoice()
Compute the choice, from the partialState and prevState.
SimStateUpdateWithChoice()
Update the simInfo when a choice is made.
SimSimInfoReadName()
Returns the module name represented by the simInfo.
SimSimInfoReadIndex()
Returns the index in the simInfo.
SimSimInfoReadPrevState()
Returns the prevState.
SimSimInfoReadSimAtomOrder()
Returns the array of simAtomOrder.
SimSimInfoReadPartialState()
Returns the partialState.
SimSimInfoReadChoice()
retuns the list of choices.
SimSimInfoReadVarInfo()
retuns the varInfo.
SimReadAtomDependencyInfo()
required
SimAtomDup()
Partially duplicates a SimAtom.
SimSimAtomIsExternalVariable()
Checks if the simAtom represents an external variable.
SimListConcatenate()
Appends list2 to list1.
SimChoiceCmd()
Command for sim_choice

simDependency.c

Routines manipulating the atom dependency table.

By: Freddy Mang

In game simulation, the order of execution of the agents is of vital importance, since it effect the type and order of quantification of the variables. In this file, there is a structure, called SimAtom, for each atom of the module. The variable, SimAtomDependencyInfo, stores a directed acyclic graph whose arc goes from the SimAtom that is being awaited to the one that is awaiting this SimAtom.

See AlsosimInt.h

SimAtomDependencyInfoReadName()
returns the name of module in the atom dependency info.
SimTopologicalSort()
Topological sort of the simAtoms.
SimAtomDependencyInfoUpdate()
Updates the AtomDependencyInfo to the current module.
SimDependencyInfoSetIsUserAtom()
Clears all the isUserAtom flag in the dependencyInfo
SimAtomDecrementNumAwaitingAtoms()
Decrements the numAwaitingAtom field.

simMain.c

Routines for commands and interface with Tcl/Tk.

By: Freddy Mang

See AlsoOther files from the sim package.

Sim_Init()
Initialization of the sim package.
SimStartCmd()
Command for sim_start
SimEndCmd()
Command for sim_end
SimChoiceCmd()
Command for sim_choice
SimSelectCmd()
Picks the choice during simulation.
SimModeCmd()
required
SimPrevStatePrintCmd()
sim_prev_state_print
SimInfoCmd()
Implements the sim_info command
SimIsInitialRound()
required
SimIsUserTurn()
required
FreeStringArray()
Frees an array of strings.
SimIsStartOfRound()
Determines if the simulation is at the start of a round.
SimModeOfSimulation()
required
SimObtainAtomArrayFromAtomNames()
required
SimAtomControlVariablesConvertToString()
Returns a string of control variables.
SimModuleIsInfinite()
Check if the module is infinite.

Last updated on 980624 22h11