To Install NModel
, you must have .NET. You do not need Visual Studio, but it is convenient to have
for example the express edition
of Visual Studio in order to use the solution files (.sln
Obtain .NET from Microsoft. The latest version is 3.5
. If you already have version 2 or 3, they work too. You may already have .NET; it is included with Vista and with Visual Studio.
From the NModel Releases
tab (above) or the Current Release
(right), download the runtime binary, NModel.msi
. Open the .msi
file and follow the prompts. Choose Typical Install
Executing the .msi
file installs the NModel library
, the four programs mpv
, and ct
, and the online help. This is all you need to run the examples
, and to create and use your own model programs
. This Codeplex site also provides the source code to NModel, but you do not have to build from source to use it.
In order to run mpv
(the Model Program Viewer utility), you must also install the graph layout engine GLEE
. Notice that GLEE uses a less permissive license than NModel.
After you have installed both NModel and GLEE, you must copy the GLEE DLLs into the NModel bin directory. In a typical installation where both are installed at their default locations, you could accomplish that by cd C:\Program Files\Microsoft Research\GLEE\bin copy *.dll ..\..\..\NModel\bin
On Vista you must do this as administrator (open Command Prompt with Run as administrator).
Alternatively to mpv
(or in addition to it), you may use mp2dot
(Model Program to Dot). The mp2dot
program does not require GLEE, and is covered by the more permissive NModel license.
programs can generate output files in the dot
graph layout language. In order to display their contents, you will need programs that can process dot
, for example in the Graphviz
package. Its GVedit
program displays dot
and can save files in several formats, including Postscript and SVG. Its dot
program also generates Postscript. You can display PostScript in a viewer such as GSView
, and display SVG in most browsers (Internet Explorer requires a plugin for this).
The Graphics sample
includes a batch command file dotps.bat
that generates Postscript from a dot
file and optionally displays it, using Graphviz and GSview. There is also mp2ps.bat
, which invokes mp2dot
It is convenient to add the path C:\Program Files\NModel\bin
to the Path
environment variable (the .msi
file adoes not do this automatically). Then you can use the commands mpv
, and ct
without prefixing them with the path.