This page will look better in a graphical browser that supports web standards, but is accessible to any browser or internet device.

Served by Gloin.

MPC, the semi-automated Modular Program Constructor.


Getting Started:


Modular Program Constructor (MPC): in-depth examples:

The Modular Program Constructor (MPC) has been designed to work with
JSim's Mathematical Modeling Language (MML).  MPC is a pre-compiler written in
Java. It reads an input file, FileName.mpc, and generates an output file,
FileName.mod, a JSim model file. The input file combines MML with “directives”
embedded as comments and is able to utilize code from other JSim model files
and constructed code libraries. The directives all begin with “//%” so they
are comments. Directives control the identification, fetching, relabeling of
variables and parameters, and assembling and recombining code into new
equations.  MPC  currently has thirteen directives:

(1)  //%COM (comment directive not copied to final model file)
(2)  //%START codeBlockName
(3)  //%END codeBlockName
(4)  //%INSERTSTART codeBlockName
(5)  //%INSERTEND codeBlockName
(6)  //%STARTDELETE
(7)  //%ENDDELETE
(8)  //%  continuation, used only with GET, REPLACE, and COLLECT directives
(9)  //%GET Model.mod codeBlockName (“oldName1=newName1”, ...)
(10) //%SETGLOBALVAL %replacer%=("replacement")
(11) //%REPLACE %replacer%=(“replacement1”, ... “replacementN”)
(12) //%ENDREPLACE
(13) //%COLLECT(“variableName”)

Download the presentation and draft paper for details (below).

Project file contains the ODE generated version of the diffusion equation using
the SETGLOBALVAL directive and finite difference approximation and compares the 
result with the PDE solution. (Run setglobalval model).

Project file shows an ode model of a transporter between two compartments and
a pde model of a four species transporter both generated using much of the
same code. (run getODE and getPDE; run Loops on getPDE to explore the effect of
cold substrate on the outflow of tracer substrate.)

Final three models illustrate generating models sequentially to build reuseable
models of increasing complexity to simulate an organ-level model with heterogeneous
flow for two substrates. The models are:

BTEX30: a three region model (capillary, interstitial fluid region, and
        parenchymal cell) with flow, diffusion, exchange between regions, and
        consumption for single metabolite A. (Plotted on BTEX30plotpage.)

The following two models are plotted on plotpages with prefix B30.
BTEX30A2B: two copies of BTEX30 for two species with enzymatic conversion of
           metabolite A to metabolite B in parenchymal cell.
BTEX30A2B10paths: a copy of BTEX30A2B is modified removing the flow
declaration.  A ten flow path model is generated combining 10 copies of
the modified BTEX30A2B model with the multiflow algorithm.

View MPC examples in JSim: 
    Help running a JSim model.
Java runtime required. Web browser must support Java Applets.
(JSim model applet may take 10-20 seconds to load.)

Download MPC examples JSim project file:

JSim must be installed locally.

Further reading:    

Related Models

Model Feedback

Contact Gary Raymond at garyr--at--uw--dot--edu for questions.

Acknowledgements

Please cite www.physiome.org in any publication for which this software is used and send one reprint to the address given below:
The National Simulation Resource, Director J. B. Bassingthwaighte, Department of Bioengineering, University of Washington, Seattle WA 98195-5061.

[This page was last modified 29Nov16, 2:10 pm.]

Model development and archiving support at physiome.org provided by the following grants: NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.