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

MCSim User' Manual

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

5.1 Using Mod to process model description files

The mod program is a stand-alone facility. It takes a model description file in the "user-friendly" format described below and creates a C language file `model.c' which you will compile and link to the simulation program. Mod allows the user to define equations for the model, assign default values to parameters or default initial values to model variables, and define scaling functions for both the input parameters and the outputs variables. Mod lets the user create and modify models without having to maintain C code.

In Unix, the command line syntax for the mod program is:

mod [input-file [output-file]]

where the brackets indicate that the input and output filenames are optional. If the input filename is not specified, the program will prompt for both. If only the input filename is specified, the output is written by default to the file `model.c'. Unless you feel like doing some makefile programming, we recommend using this default since the makefile for MCSim assumes the C language model file to have this name. You have to have prepared an input file containing a description of the model following the syntax described in the following (see section 5.2 Syntax of the model description file).

On the Macintosh you double-click the `Mod' icon and enter the name of the model definition file at the prompt (on the Macintosh, names can include space characters).

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