This manual is primarily a technical manual. Currently the user-information is
covered by simrisc
's man-pages
This manual covers the design and organization of simrisc
's software. Each
section (except for section main
) covers a class as encountered when
reading the sources starting at the main
function.
In total almost 30 classes were defined. Starting from main
only
Simulator
is required.
At the other side of the spectrum there are several classes or comparable elements which are used by many classes. These elements are defined in separate header files:
enums/enums.h
, containing enumeration values for errors and constant
values;
typedefs/typedefs.h
, defining short names for frequently used vectors
(like SizeVect
for std::vector<size_t>
)
globals/globals.h
, a struct defining several static functions handling
frquently encountered small computations (like isZero
to determine
whether a double
value has a value that's closer to zero than a
(compile time configurable) tolerance).
These files are not further covered in this manual: they contain definitions and trivial support functions, and the reader should refer for these files themselves for further details.
The outline of the organization of the outer levels of the program is shown in
Figure 1. main
uses a Simulator
, and for each separate
analysis the Simulator
creates an Analysis
object, which in turn
creates a Loop
object, doing all the hard work (hence the ellipsis in
Figure 1).
The configuration file defines elements that can be used in the analyses. Such
elements are, e.g., Screening
, containing screening parameters,
Densities
, containing parameters of breast densities, and Incidence
,
containing tumor incidence parameters. Objects of those classes are used by
Loop
.
It is quite possible that future versions of simrisc
also supports different types
of simulations. It's likely that Loop
itself then becomes a scenario
as defined by Gamma et al. (1995), and that analysis specification files also
select the requested scenario(s) by specifying the requested simulation
type(s).