ETHZ_Logo RAMSES_Logo_Right   RAMSES   RAMSES_Logo_Left Systems Ecology  
Start    search button      Modules:   A-Z   Function   Layer        QuickRefs:   DM   AuxLib   AuxLibE   SciLib   EasyMW   MW   ISIS   RMSLib

DEFINITION MODULE SampleMods;

  (*******************************************************************

    Module  SampleMods     (Easy_ModelWorks_1.5)

      Copyright (c) 1996-2006 by Andreas Fischlin and ETH Zurich.

    Purpose   Supports the definition of a custom collection  
              of sample models to be executed from within 
              'Easy ModelWorks'.
    
    Remarks   Up to a maximum of 6 sample models can be
              installed. These sample models are freely
              editable and are ordinary 'Easy ModelWorks'
              models. The only difference to user defined
              ones is that they are defined (entered) via
              programing, i.e. by using the client interface
              of 'Easy ModelWorks'. The latter is provided
              by the module EasyMWFcts ('Easy ModelWorks'
              Functions). Reimplement this module to
              customize 'Easy ModelWorks' to your needs, for
              instance while teaching another subject
              than ecological modeling or control theory.

              Note, this technique has an important
              implication: In order to recompile a new
              implementation of this module you need
              a compiler (eventually also a linker, depending
              on your computer platform) and ModelWorks.
              None of these tools are needed if you work
              only with ordinary 'Easy ModelWorks' models
              (where you do not even need a text editor to
              edit 'Easy ModelWorks' models.  Although you can
              optionally use a text editor to write Easy
              ModelWorks models, this can of course also be
              acomplished from within 'Easy ModelWorks'
              itself).

              All needed software tools are available as
              freeware for any Macintosh computer (given it
              has at least 1 MB RAM). ModelWorks is also available
              as freeware for IBM-PCs, but to reprogram
              the sample modules you require a development
              environment which is only commercially available.
              For the currently valid specifications see the
              www site respectively ftp host addresses given
              below.  At the same addresses you can also obtain
              all freeware.

              In addition it is optionally also possible to
              implement or import ordinary ModelWorks Model
              Definition Programs (MDPs) via this module,
              e.g.  by programming a MDP within this module
              (see sample code wihin local module of the
              implementation template (file
              SampleMods.TEMPLATE.MOD) or by importing MDPs
              from other modules.  Any such MDP has to be
              announced to 'Easy ModelWorks' by installing it
              via procedure StructModAux.AssignSubModel.

              IMPORTANT NOTE: This definition module MUST NOT
              be changed. Only its implementation may
              be freely modified.

              Reference:
                Fischlin et al., 1994.  ModelWorks - An Interactive
                Simulation Environment for Personal Computers and
                Workstations.  Systems Ecology Report #14, 324pp.


    Programming

      o Design
        Andreas Fischlin          10/04/1996

      o Implementation
        Andreas Fischlin          10/04/1996


    ETH Zurich
    Systems Ecology
    CHN E 35.1
    Universitaetstrasse 16
    8092 Zurich
    SWITZERLAND

    URLs:
        <mailto:RAMSES@env.ethz.ch>
        <http://www.sysecol.ethz.ch>
        <http://www.sysecol.ethz.ch/SimSoftware/RAMSES>


    Last revision of definition:  16/04/1996  AF

  *******************************************************************)


  CONST
    maxSmplMods = 6;

  TYPE
    CmdText = ARRAY [0..63] OF CHAR;

  VAR
    subMenuTitle: CmdText;
      sampleModelCmdText: ARRAY [1..maxSmplMods] OF CmdText;
      userFctCmdText: CmdText; userFctAliasChar: CHAR;
      (* Above strings (idents) are the ones 'Easy ModelWorks' uses as menu
      text respectively command text in its submenu "Sample Models" (=
      default subMenuTitle).  You may assign any text to them in order to
      customize 'Easy ModelWorks' to your needs.  If you specify a string as
      empty, the corresponding menu command will not be installed.  In
      particular, if you specify subMenuTitle as empty string, none of the
      procedures below (SampleModel1 ..  SampleModel6, announced MDPs,
      UserFunction) become accessible for the 'Easy ModelWorks' user.  *)

      chooseMDPCmdText: CmdText; chooseMDPAliasChar: CHAR;
      (* IMPORTANT NOTE: In contrast to the rule given above, the menu
      command chooseMDPCmdText behaves differently: First, if some of your
      modules currently executing call EasyMWFcts.AnnounceMWMDP, the needed
      menu command will be installed, regardless of an empty
      chooseMDPCmdText (using default text "ModelWorks MDP...").  Secondly,
      the command becomes visible only in the to so-called power user mode
      of 'Easy ModelWorks'.  This is because the access of ordinary
      ModelWorks MDPs is intended mainly for users who already know
      ModelWorks well, for students it may be rather confusing.  For
      instance 'Easy ModelWorks'' help, can't explain the use of ModelWorks
      standard simulation environment, hence it should remain reserved to
      power users, e.g.  teachers using 'Easy ModelWorks' also to demonstrate
      a MDP.  The mode power user on-off, can only be toggled with a hidden
      key combination, i.e.  Cmd^Shift^Caps-lock^P. *)

  PROCEDURE SampleModel1;
  PROCEDURE SampleModel2;
  PROCEDURE SampleModel3;
  PROCEDURE SampleModel4;
  PROCEDURE SampleModel5;
  PROCEDURE SampleModel6;

  PROCEDURE UserFunction;
  (* UserFunction may be used to provide any additional function.  Since it
  is possible to learn which sample model is currently in use from within
  this function, you can provide an additional user function to any sample
  model by a large CASE statement within UserFunction.  A typical use of
  this mechanism is to show the signal flow diagram of the sample models,
  e.g.  by provididing parameter editing via scroll bars or edit fields
  within the diagram.  Use the 'Dialog Machine' for easy programing of
  these functions (also available as part of RAMSES).  *)


END SampleMods.

  Contact RAMSES@env.ethz.ch Last updated: 25-Jul-2011 [Top of page]