Skip to content

billdback/gentsim-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

See COPYING for the license for this software.

Web Site and Documentation:  http://www.gentsim.org
Contact Info:  billback@gentsim.org

gentsim-examples is a partner project to the gentsim framework.  The goal is to provide a variety ofsimple examples that demonstrate how to use the functionality of gentsim.  None of the models should be considered valid from a simulation perspective.  Additional sample models are welcome.

gentsim-examples contains the library needed to create and run gentsim examples.  You can also download and build the code directly from http://github.com/billdback/gentsim.

gentsim requires Groovy 1.6.5 or later and will not work with earlier versions of Groovy.

Installing

1.  Simply download the examples code and libraries from either the http://www.gentsim.org site or http://www.github.com/billdback/gentsim-examples.  

2.  Put the gentsim-<version>-SNAPSHOT.jar into your groovy classpath.  This can be done by adding the jar to your CLASSPATH variable, passing the jar as a parameter to the groovy command (using -classpath), or by placing the jar into your ~/.groovy/lib directory.

3.  Verify the install by running one of the example simulations using the process in "Running Simulation Scripts" below.

4.  You will probably also want to put the bin/gentsim.groovy class in your path or make it accessible from anywhere.  An easy way to do this is to create an alias.  In the bash shell this is done by the command: alias gentsim='groovy my/path/to/examples/bin/gentsim.groovy'.  This will make it much easier to run the groovy scripts to simplify gentsim development.

Creating New Simulations

Simulations are created using the "gentsim" command and then editing the software.  See the language guide at http://www.gentsim.org/language_guide/gentsim_language.shtml for full details on how to write simulations using gentsim.

Running Simulation Scripts

1.  Change directory to the root of the simulation.  This should contain a groovy script with a name like MySimulation.groovy the creates a simulation.  

2.  $ groovy -cp <jars> MySimulation

Note that the -cp <jars> is only required if you have additional jars to add to the classpath that are not already in the <sim-directory>/lib directory, the CLASSPATH variable or ~/.groovy/lib directory.



About

Example simulations created using gentsim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages