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

MCSim User' Manual

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

2.1 General procedure

Model building and simulation proceeds in four stages:

  1. You create with any text editor a model description file. The reference section on mod, later in this manual gives you the syntax to use (see section 5. Defining Models). This syntax allows you to describe the model variables, parameters, equations, inputs and outputs in a C-like fashion without having you to actually know how to write a C program.

  2. You instruct the model generator, mod, to preprocess your model description file. Mod creates a C file, called `model.c'.

  3. You compile and link the newly created `model.c' file together with the other C program files. MCSim C code is standard, so you should be able to compile it with any standard C compiler, for example GNU gcc. After compiling and linking, an executable simulation program `mcsim' is created, specific of the particular model you have designed. These preprocessing and compilation steps may seem clumsy but they produce the most efficient code for your particular machine.

  4. You design any number of simulation specification files and run them with the mcsim program. The simulation specification files describe the kind of simulation to run (simple simulations, Monte Carlo etc.), various settings for the integration algorithm if needed, and a description of one or several experimental conditions or observations to simulate (see section 6. Specifying Simulations). The simulation output is written to standard ASCII files.

Little or no knowledge of computer programming is required, unless you want to tailor the program to special needs, beyond what is described in this manual (in which case you should contact us). You need, however, some familiarity with program compilation under your operating system (see section System requirements). The software manual for your compiler should be able to help you.

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

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