Giter Club home page Giter Club logo

models's Introduction

NetLogo Models Library

Bundling

The NetLogo Models Library is bundled with NetLogo. You can download NetLogo and the Models Library from http://ccl.northwestern.edu/netlogo/.

NetLogo Version Changes

When the NetLogo version is bumped, a few changes are required:

  • Update the version in build.sbt
  • Update the expected version in VersionTests.scala
  • Resave the models using the runMain org.nlogo.models.ModelsResaver sbt command and then the runMain org.nlogo.models.ModelsResaver3d sbt command. These commands must be run separately as the switch for 3D mode is only read once globally.

Licenses

The models in this repository are provided under a variety of licenses.

Some models are public domain, some models are open source, some models are CC BY-NC-SA (free for noncommercial distribution and use).

See each model's Info tab for details.

models's People

Contributors

aditiwagh avatar arthurhjorth avatar bainco avatar barbacbd avatar brandesnw avatar charlesres avatar dsugat avatar idloj avatar jzkelter avatar lacuneta avatar mnovakccl avatar mrerrormessage avatar mrn-aglic avatar nicolaspayette avatar qiemem avatar sethtisue avatar spiromar avatar suppaman avatar thebizzle avatar uriccl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

models's Issues

IABM citations are not consistent

reported by @SethTisue:

"There is a lot of general inconsistency about whether citation information is indented with a bullet or not. see e.g. the info tab of Fire Simple. The info tab contains a total of eight citations. Four are bulleted, four are not.

I suggest using the bullets because it calls the citation out as something most readers won't need to read."

Duplicates between book models and sample models: El Farol and DLA Simple

As in #39, our "every model has a unique name" fails for two book models that have duplicates under the Sample Models folders:

  • IABM Textbook/chapter 3/El Farol Extensions/El Farol vs.
    Sample Models/Social Science/El Farol
  • Sample Models/Chemistry & Physics/Diffusion Limited Aggregation/DLA Simple vs.
    IABM Textbook/chapter 3/DLA extensions/DLA Simple

The versions have already started to diverge: some minor improvements that were made in the book versions were not made in the sample models versions. The other difference is that the book versions have the ACKNOWLEDGMENT section and book specific HOW TO CITE in their info tabs.

Should we:

  1. Rename one of the versions, for each model.
  2. Use the book versions in the Sample Models folder.

In the name of fighting entropy, I advocate 2.

@UriCCL, what do you think?

Duplicate "Bug Hunt Predators and Invasive Species" models

Our "every model has a unique name" unit test complains that there are two copies of Bug Hunt Predators and Invasive Species. We have a "one world" version in BEAGLE Evolution:

https://github.com/NetLogo/models/blob/master/Curricular%20Models/BEAGLE%20Evolution/Bug%20Hunt%20Predators%20and%20Invasive%20Species.nlogo

And a "two worlds" version in ModelSim:

https://github.com/NetLogo/models/blob/master/Curricular%20Models/ModelSim/Population%20Biology/Bug%20Hunt%20Predators%20and%20Invasive%20Species.nlogo

@UriCCL, @arthurhjorth, @mnovakccl... Should we rename one of the two? Or overwrite the one in BEAGLE?

(@frankduncan, just a heads up that you should be aware of this if you run the units tests.)

Make sure BehaviorSpace experiments in library models are relevant

E.g., Lennard-Jones has an experiment named experiment1 which has only one run and doesn't do much. It should not be there.

I'm not sure how to assess that experiments are "relevant" without checking them all out, but a good way to catch some bad ones would be to disallow experiments named experiment*. Experiments included in models should have meaningful names anyway.

Deal with preview images having non-square aspect ratios

The models library dialog displays them as squares. If they're not, they're cropped, in sometimes awkward ways.

This mostly happens with manual previews, when they're done carelessly, but can also happen with automatic previews of models with non-square worlds (a point in case is Simple Economy, where I had to write custom preview commands using resize-world: dc67979).

My own inclination would be to shrink the image to fit in the dialog instead of cropping it, but we could also conceivably write a script to catch non-square previews in the library. Certain models are certainly better off with custom previews than with shrunk images (e.g., again, Simple Economy).

In either case, implementing NetLogo/NetLogo#760 could help.

Convert some models from continuous to tick based updates

As of fdd55c6, here are the models that use continuous updates:

  • 3D/Code Examples/Shapes Example 3D.nlogo3d
  • 3D/Sample Models/Sierpinski Simple 3D.nlogo3d
  • Code Examples/Ask Ordering Example.nlogo
  • Code Examples/Ask-Concurrent Example.nlogo
  • Code Examples/Box Drawing Example.nlogo
  • Code Examples/Breed Procedures Example.nlogo
  • Code Examples/Case Conversion Example.nlogo
  • Code Examples/Color Chart Example.nlogo
  • Code Examples/File Input Example.nlogo
  • Code Examples/GIS/GIS General Examples.nlogo
  • Code Examples/GoGoMonitor.nlogo
  • Code Examples/GoGoMonitorSerial.nlogo
  • Code Examples/GoGoMonitorSimple.nlogo
  • Code Examples/GoGoMonitorSimpleSerial.nlogo
  • Code Examples/HSB and RGB Example.nlogo
  • Code Examples/Image Import Example.nlogo
  • Code Examples/Info Tab Example.nlogo
  • Code Examples/Link Breeds Example.nlogo
  • Code Examples/Link Lattice Example.nlogo
  • Code Examples/Matrix Example.nlogo
  • Code Examples/Moore & Von Neumann Example.nlogo
  • Code Examples/Myself Example.nlogo
  • Code Examples/Neighborhoods Example.nlogo
  • Code Examples/Network Import Example.nlogo
  • Code Examples/One Turtle Per Patch Example.nlogo
  • Code Examples/Patch Clusters Example.nlogo
  • Code Examples/Perspective Demos/Termites (Perspective Demo).nlogo
  • Code Examples/Profiler Example.nlogo
  • Code Examples/QuickTime Extension/QuickTime Movie Example.nlogo
  • Code Examples/Random Seed Example.nlogo
  • Code Examples/Scatter Example.nlogo
  • Code Examples/Sound/GasLab With Sound.nlogo
  • Code Examples/Sound/Musical Phrase Example.nlogo
  • Code Examples/Sound/Percussion Workbench.nlogo
  • Code Examples/Sound/Sound Workbench.nlogo
  • Code Examples/Table Example.nlogo
  • Code Examples/Tie System Example.nlogo
  • Code Examples/Transparency Example.nlogo
  • Code Examples/User Interaction Example.nlogo
  • Curricular Models/BEAGLE Evolution/Bird Breeder.nlogo
  • Curricular Models/Connected Chemistry/Connected Chemistry Atmosphere.nlogo
  • Curricular Models/Connected Chemistry/Connected Chemistry Rusting Reaction.nlogo
  • Curricular Models/ProbLab/4 Block Stalagmites.nlogo
  • Curricular Models/ProbLab/4 Block Two Stalagmites.nlogo
  • HubNet Activities/Polling HubNet.nlogo
  • IABM Textbook/chapter 8/Example HubNet.nlogo
  • IABM Textbook/chapter 8/Run Result Example.nlogo
  • IABM Textbook/chapter 8/Simple Viral Marketing.nlogo
  • Sample Models/Art/Optical Illusions.nlogo
  • Sample Models/Art/Unverified/Geometron Top-Down.nlogo
  • Sample Models/Biology/BeeSmart - Hive Finding.nlogo
  • Sample Models/Biology/Termites.nlogo
  • Sample Models/Computer Science/Painted Desert Challenge.nlogo
  • Sample Models/Computer Science/Unverified/Merge Sort.nlogo
  • Sample Models/Games/Unverified/Pac-Man Level Editor.nlogo
  • Sample Models/Mathematics/Probability/ProbLab/Unverified/Equidistant Probability.nlogo
  • Sample Models/Mathematics/Probability/ProbLab/Unverified/Random Combinations and Permutations.nlogo
  • Sample Models/Mathematics/Voronoi.nlogo
  • Sample Models/Social Science/Unverified/Prisoner's Dilemma/PD Basic.nlogo

It is justified in many cases, but I'm sure that the list could be somewhat trimmed down. I intend to go through the list and mark models as checked when I have either:

  • assessed that their use of continuous update is indeed righteous;
  • or converted them to tick-based updates.

5.2.0-RC4 model nitpicks

  • Models Library dialog: it's a little odd that "Alternative Visualizations" is the first thing under Sample Models. so for example there is code that sorts "unverified" to the end rather than in alphabetical order, maybe should do same here. AH: @nicolaspayette do you know how to do this? (NP: #32)
  • Turtles Circling Simple has all-caps "SETUP" and "GO" buttons. AH: Done.
  • DLA extensions -> DLA Extensions for consistency with the other chapter 3 folders. AH: Changed folder + legal.txt.
  • Agentset Efficiency has no preview image. (@frankduncan says there are other models with this problem as well) AH: Done.
  • Models Library dialog, IABM Models, chapter 8 folder: an empty "data" folder shows up. I think there might be code somewhere that allows directories like this to be excluded? AH: @nicolaspayette would you know how to do this? (NP: #33)
  • Run Example info tab uses all caps for primitive names, it should use typewriter font. AH: Done.
  • Run Example info tab has broken link for CC BY-NC-SA 3.0 logo, perhaps other models are affected too?
  • Ticket Sales go button doesn't have the "Disable until ticks start" checkbox checked. (It wouldn't surprise me if this mistake were made in many of the new models; I'd suggest checking them all.) AH: done.
  • Wolf Sheep Simple 2, "number-of-sheep" slider is positioned weirdly high. AH: done

Problem in AIDS model

Migrated from NetLogo/NetLogo#730.

@ToonTalk says:

The infect command is

to infect ;; turtle procedure
if coupled? and infected? and not known?
[ if random-float 11 > condom-use or
random-float 11 > ([condom-use] of partner)
[ if random-float 100 < infection-chance
[ ask partner [ set infected? true ] ] ] ]
end

those calls should be to random-float 10 not 11. Perhaps the author intended to include 10 as a possible output but then 10.0000001 should have been appropriate. If somehow 11 is really the intent then the info tab should be updated.

Also it is odd that condom-use is a probability that ranges from 0 to 10 instead of being expressed as a percentage like infection-chance.

notarize.scala should put blank lines between list items in HOW TO CITE

@UriCCL:

The script should insert a line break between the two citations, as below.

## HOW TO CITE

If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

* Novak, M. and Wilensky, U. (2015).  NetLogo Bacteria Food Hunt model.  http://ccl.northwestern.edu/netlogo/models/BacteriaFoodHunt.  Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

* Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

@frankduncan, I'm assigning the script issues to you for now, but I may be able to help with those this week if needed.

Info tab in climate change model inaccurate

From NetLogo/NetLogo#704

It says "Run the model with a bright sun but no clouds and no CO2. What happens to the temperature? It should rise quickly and then settle down around 50 degrees." When I set the brightness to 5.0 it settles down around 35 to 38 not 50 degrees.

Cars don't change lanes in Traffic 2 Lanes

@SethTisue writes:

According to the info tab the cars are supposed to change lanes, but
they never do. pen-down lets you see this easily.

And:

I tried some old versions and found that it broke sometime between
NetLogo 3.1.5 and 4.0.5.

I've figured out that the problem was caused by the fact that ask now operates serially (since NetLogo 4.0, see http://ccl.northwestern.edu/netlogo/docs/programming.html#ask-concurrent).

Changing ask for ask-concurrent in the drive procedure fixes the problem, but I chose to avoid ask-concurrent in favor of splitting the ask block in two, allowing all turtles to first adjust their speed and then check if they should change lane (which was effectively what was happening with the old ask behavior.)

In the process of trying to figure this out, I've also modernized the indentation a bit. The drive and change-lanes procedures, in particular, have multiple levels of nested ifelse blocks, making them hard to understand and debug. I think this could be avoided and, if the model is ever to come out of "unverified", should.

Markdown in IABM models

Reported by @SethTisue:

"in general, Markdown is under-utilized in the info tabs of the new models. I think this is a hangover from the old days when NetLogo only supported plain text for this."

gogo primitives have changed, update code examples

We changed them in order to make them align more strongly with the book. Now there is:

output-port-on instead of motor-on
output-port-off instead of motor-off
output-port-clockwise insteaed of motor-clockwise
otuput-port-counter-clockwise instead of motor-counter-clockwise
set-output-port-power instead of motor-set-power

Missing screenshots 5.2

@frankduncan sent this list:

MISSING PREVIEW: 3D/Sample Models/Hydrogen Diffusion 3D.png
MISSING PREVIEW: Code Examples/Palette Example.png
MISSING PREVIEW: Curricular Models/ModelSim/Evolution/Bacteria Food Hunt.png
MISSING PREVIEW: Curricular Models/ModelSim/Evolution/Bacteria Hunt Speeds.png
MISSING PREVIEW: IABM Textbook/chapter 0/Turtles Circling Simple.png
MISSING PREVIEW: IABM Textbook/chapter 5/Agentset Efficiency.png
MISSING PREVIEW: IABM Textbook/chapter 5/Random Network.png
MISSING PREVIEW: IABM Textbook/chapter 8/Arduino Example.png
MISSING PREVIEW: IABM Textbook/chapter 8/Disease With Android Avoidance HubNet.png
MISSING PREVIEW: IABM Textbook/chapter 8/Example HubNet.png
MISSING PREVIEW: Sample Models/Social Science/Unverified/Artificial Anasazi.png

Runtime error in "Urban Suite - Tijuana Bordertowns"

ASK expected input to be an agent or agentset but got NOBODY instead.
error while service-center 4 running ASK
  called by procedure TOWARDS-OTHER-CENTERS
  called by procedure GENERATE-CITYSCAPE
  called by procedure SETUP
  called by Button '2  cityscape'

To reproduce:

  • Press clear;
  • Press cityscape;
  • Let it run until it's done;
  • Press cityscape again.

I have not investigated more than that.

Break modelsim folder in two

@mnovakccl says:

Evolution:

  • Bacteria Food Hunt
  • Bacteria Hunt Speeds

Population Bio:

  • Bug Hunt Disruptions
  • Bug Hunt Environmental Changes
  • Bug Hunt Predators and Invasive Species

Party model freezes when stacks of people are too big

Turtles joining a group are asked to while [any? other turtles-here] [ fd 1 ], but if the group already extends to the edge of the world, this creates an infinite loop.

Simply changing this code to: while [any? other turtles-here and can-move? 1] [ fd 1 ] will prevent freezing (extra turtles will just stack at the edge).

(reported by John Bragin)

Many test models haven't been updated in years

Some models under test/ have not been re-saved since the days of 4.0 betas!

It doesn't seem to cause problems, since the unit tests that use them are still passing, but as a matter of hygiene, they should be converted to NetLogo 5.2 and we should make sure that all unit tests still pass after that.

Duplicate Virus model causes unit test to fail

We have a unit test in https://github.com/NetLogo/NetLogo/blob/5.x/src/test/org/nlogo/workspace/TestLibrary.scala that checks if every model has a unique name. It fails because of the Virus model:

[info] TestLibrary:
[info] - every model has a unique name *** FAILED ***
[info]   Virus.nlogo (TestLibrary.scala:14)

As of 5.2RC4, this model appears in both the Biology folder and the Alternative Visualizations folder. The two versions are almost identical: only the value of the turtle-shape chooser differs between the two.

We have other models that are duplicated in the library, but those are copied by release.sh, after the unit tests are run. We cannot do that for Virus because the two versions differ, however slightly.

I see four options:

  1. Disable the unit test altogether. Not a good idea in my opinion.
  2. Add a special case to the unit test. That's the easiest course of action, and the one I expect we'll take, though special cases like this make NetLogo harder to maintain over time.
  3. Rename the version in the Alternative Visualizations folder to something else (though the name Virus - Alternative Visualization is already taken).
  4. Get rid of the duplicate model (I know, I know, that's not really an option... ;-))

@UriCCL, @arthurhjorth, @frankduncan, care to weight in?

(I'm tagging this 5.2, but just to be clear: this is not holding us up for release.)

Move "Alternative Visualizations" folder to top level

In, #26 (comment) @SethTisue says:

Models Library dialog: it's a little odd that "Alternative Visualizations" is the first thing under Sample Models. so for example there is code that sorts "unverified" to the end rather than in alphabetical order, maybe should do same here.

@UriCCL says:

Regarding the Alt Viz folder, I think this folder should be outside of sample models entirely, just like curricular models.

The question of where it should go in the list is still open. I'm inclined to think it should just be added at the end.

Hydrogen Diffusion 3D has plotting code in code tab

The Patch Distribution plot currently has some commented out code inside the plot and some plotting code in the code tab. All plotting code could probably be moved inside the plot. (Or if, surprisingly, it couldn't, the commented out code should at least be removed.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.