Model-Builder

Model-Builder

Infobox Software
name = Model-Builder
latest_release_version = 0.4.0
latest_release_date = March. 26, 2007
developer = Flávio Codeço Coelho, Cláudia Torres Codeço, Antônio Pacheco
operating_system = Cross-platform
genre = Ordinary differential equations,mathematical modeling
license = GPL
website = [http://model-builder.sourceforge.net home-page]

[http://model-builder.sourceforge.net Model-Builder] is an application written in Python programming language, designed to provide a simple graphical interface for writing simulating and analyzing mathematical models based on ordinary differential equations.

Graphical User Interface

Model-builder's GUI is a very simple one designed to be as unobstrusive as possible. Models are written in standard mathematical language (with operator syntax from Python). The design principle is: "If you can write your equations on paper, you can write implement them in Model-Builder".

The menus

The first menu is the file menu. It contains the standard open, save, save as, close and exit options. These are pretty much self-explanatory.

The second menu is the analysis menu. This menu contains two options: The uncertainty analysis (UA) and State-space Diagram . This first option opens the uncertainty analysis panel, and makes ModelBuilder go into UA mode. The second allow the creation of state-space plot of up to two variables.

The third and last is the help menu with its usual functionality

The Toolbar

The toolbar contains three buttons. The first one is the run button, which starts the simulation.

The second button shows a typeset version of the differential equations in the model (this feature requires the latest version of matplotlib).

The third button shows the results of a simulation on a spreadsheet. From there you can select variables to plot separately and save the results to a csv(comma separated values) file.

Installation Guide

Since Model-builder is written entirely in Python, it is distributed as a source package. However, it needs a Python installation (>=2.4) and utilizes other libraries that need to be installed in your system so that Model-Builder can be started.

Dependencies

#wxPython: wxpython is the GUI toolkit used by Model-Builder
#NumPy: Python package with many number crunching functions, written in C and Fortran.
#SciPy: Is another Python library that provides the Numerical integration code used by Model-Builder.
#Matplotlib: This is a python plotting library which is used to produce all the graphical output.

For Linux and Mac users those dependencies are all available as packages ready for easy installation. For windows users, those packages are also available but the best optio is to install the [http://code.enthought.com/enthon/ Python Enthought Edition] . which already comes bundled with all the above packages.

Once all of the pre-requisites are installed the best way to get the latest Model-Builder is by means of the [http://peak.telecommunity.com/DevCenter/EasyInstall Python setuptools] package (which also needs to be installed). If you have setuptools installed, all you have to do is type the following command on the command prompt:

easy_install Model-Builder

Then setuptools with fetch Model-builder's most recent package from Sourceforge and install it on you machine. If you are a linux user, you will need to have root privileges to do this.

Quick-start Tutorial

If you've gone through the installation process withou problems, you should be able to start Model-Builder from the console with a simple command:

PyMB

On some Linux distros, an entry for Model-Builder will show up on the programs menu under Science & Math.

if you have also Downloaded the [http://sourceforge.net/project/showfiles.php?group_id=164374&package_id=213689&release_id=468580 examples package] from the sourceforge site, you can open the lotka-volterra2.ode model file.

Now, just press the little stopwatch button on toobar, the start button, to start the simulation. On completion, a line plot will pop-up with the result.The results can also be opened in a spreadsheet wher it can be further analyzed, graphed and exported to a csv file.

to write a model from scratch in Model-builder, a little knowledge about acceptable syntax is required.

Equations are written on the equations box which is situated on the top left part of the GUI. Equations may include symbols defined in the parameter box, as well as the time t symbol, available automatically, since the model equations are considered as derivatives with respect to time.

General form of equations:

The general form of a differential equation is, for instance: frac{dx}{dt}=ax(t).

In Model Builder, to simplify notaion, on the LHS of the equation we can put only the symbol of the State variable. So the equation above would become:x=ax. It is obvious that this equation is not mathematically equivalent to the real differential equation we are trying to calculate. But Model-Builder only uses the LHS of equations as a labels for the state variables. Only what is on the RHS of the equations is included in calculations. So make sure all you equations conform to these rules before entering them in the equation box. Note also that x(t) on the RHS of the equation became simply x. Whenever state variables appear on the RHS, they are assumed to be functions of time, so no explicit notation is necessary, or allowed. Equations may include symbols defined in the parameter box, locate on the right side of the GUI. Thus, in our simple example, the parameter a must be defined like this (for instance): a=2.3 in the parameter box. Parameter expressions may not reference state space variables.

Both Equations and parameter expressions may also include the symbol t (time) as well as any mathematical [http://www.scipy.org/Numpy_Example_List function defined in numerical python] , like for example sin(t).

Equations are to be entered according to Python's syntax for mathematical expressions. This means that basic arithmetic operators become:


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Model building — This article is about the making of models. For models of buildings, see Building model. Model builder in deep concentration Model building as a hobby involves the creation of models either from kits or from materials and components acquired by… …   Wikipedia

  • Model building (particle physics) — In particle physics, the term model building refers to a construction of new quantum field theories beyond the Standard Model that have certain features making them attractive theoretically or for possible observations in the near future. If the… …   Wikipedia

  • Model Suit Gunpla Builders Beginning G — 模型戦士 ガンプラ ビルダーズ ビギニングG (Mokei Senshi Ganpura Birudāzu Biginingu Jī) Genre Mecha Original video animation Directed by …   Wikipedia

  • Model aircraft — A die cast Boeing 747 400 model. Model aircraft are flying or non flying models of existing or imaginary aircraft using a variety of materials including plastic, diecast metal, polystyrene, balsa wood, foam and fibreglass. Flying designs range… …   Wikipedia

  • Model–view–controller — A general representation of the MVC design pattern. Model view controller concept. The solid line represents a direct as …   Wikipedia

  • Model car — For the term referring to delineation of (non model) car ranges, see car model. This Norev model car is a good miniature representation of a real Renault 4CV and would have been sold as a children s toy. A model car or toy car is a miniature… …   Wikipedia

  • Model village — This article is about full size villages, typically built for factory workers. For miniature model villages, see miniature park. Almshouses in Saltaire, Yorkshire, typical of the architecture of the whole village A model village is a type of… …   Wikipedia

  • Gundam model — Gundam Models refers to plastic and non plastic model kits depicting the mecha, vehicles and characters of the fictional Mobile Suit Gundam universe. These kits have become popular among anime fans and model lovers, especially in Japan and in… …   Wikipedia

  • Freelance model — IntroductionThe term freelance, in the aerial, railway, naval, or bus model building, indicates a company which does not base its products on existing livery.freelance models are sometimes frowned upon in the model building community, although… …   Wikipedia

  • Ship model — This article is concerned primarily with static models. For operating models see model yachting or radio controlled boat, Model of a 19th century vessel in the Bishop Museum, Hawaii …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”