Module
Modules contain the core scientific calculations of JCM.
They all share some common features, defined in the module class.
Java Source Code
Some standard methods are called in the following sequence (from the Modloop).
reset(): once-only calculations for initial setup, or after reset pressed.
setup(): precalculations after parameter changes -e.g. create eignevector matrices
startstate(year): set initial state (box contents), for 1750 or 2000
precalc(): calculations just before main time loop
calcfuture(): if starting in 2000
calcstep(step): calculate one timestep: most of the work is done here.
save99(): save state in 1999 for startstate(2000)
postcalc(): calculations after main timeloop (e.g. for normalising)
As well as calculations, modules are owners of adjustable parameters, and also public arrays of output data which may be referenced by visible graphs.
Modules inherit characteristics of the general Interaction Object (Iob) which defines their relationship with other modules.
They also implement the Modlist interface, so they can easily refer to other modules.
See also:
Code Structure
Modlist
Modloop
Interaction Object
Param
Graph