www.delorie.com/gnu/docs/mcsim/mcsim_19.html   search  
Buy GNU books!

MCSim User' Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2.4 Input functions

They can be used in a special assignments, valid only for input variables. Inputs can be initialized as a constant or expression, or assigned one of the following input functions:

The arguments of input functions can either be constants or variables. As an example, if `GavMag' and `RateConst' are defined model parameters, then the input variable `Q_gav' can be defined as:

Q_gav = PerExp(GavMag, 60, 0, RateConst);

In this way the parameters of input functions can, for example, be assigned statistical distributions in Monte Carlo simulations (see section 6.3.5 Distrib() specification).

Variable dependencies are resolved before the simulation is started. For each of the periodic functions, a single exposure beginning at time initial-time can be specified by giving an effectively infinite period, e.g. 1e10. The first period starts at the initial time of the simulation. Magnitudes change exactly at the times given.

Input functions can be combined to give a lot of flexibility (e.g., an input can be sum of some others). Separate inputs can be declared in the global section of the model definition file and combined in the Dynamics and CalcOutputs sections. The only limitation is that for each input function used, a separate input must be defined in the model, even though this function may not be a real element of the model.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003