Skip to content
/ NetLogo-GPL Public template

A template for a NetLogo model to be released under the GNU General Public LIcence

License

Notifications You must be signed in to change notification settings

garypolhill/NetLogo-GPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NetLogo-GPL

A template for a NetLogo model to be released under the GNU General Public Licence. Includes a handful of other elements part of good practice:

  • A ChangeLog section of the Info tab in which you record modifications you've made in the code tab. There is a Wikipedia page on ChangeLog if you want to know more, and various other resources on the web.
  • A .gitignore that has entries for Data* and data* so that if you copy the contents of this folder into your own repository for collaborating on code, you don't accidentally end up copying potentially sensitive or licensed data to a public repository. .gitignore will also ignore NetLogo temporary files (.*.tmp.nlogo) and OS temporary files Icon (Windows) and .DS_Store (Mac OSX)
  • Switch and input for seed control.
  • Unit testing utilities. The unit-test procedure can be used to run unit tests (if edited to call procedures implementing them). Procedures implementing unit tests should call assert-list-equals, assert-equals, assert-true and assert-false when checking functionality is as expected.
  • Output area for progress, notes and warning messages. Use output-error instead of the built-in error command, as this sets the error? flag as well as displaying the message. output-warning is provided to give a warning message (a non-fatal error that may suggest a problem, but the program can continue to run), output-note is provided to give the user noteworthy information about the run, and print-progress is provided to write a message advising the user of important stages reached during the run -- which can be helpful for long-running procedures to reassure them that the model is making an advance, and is not hung.
  • A error? flag to record whether an error has happened. This is set automatically when output-error is called with a string argument containing the error message. In addition carefully [] [] is wrapped around the model-specific code so that the error? flag is set if there is an unexpected runtime error. This is important when running the model in headless mode.

About

A template for a NetLogo model to be released under the GNU General Public LIcence

Resources

License

Stars

Watchers

Forks

Packages

No packages published