Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 3D/Code Examples/Network Example 3D.nlogox3d
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Use the turtle variable `label` to label the nodes and/or edges with some inform
Try calculating some statistics about the network that forms, for example the average degree.

Try other rules for connecting nodes besides totally randomly. For example, you could:

- Connect every node to every other node.
- Make sure each node has at least one edge going in or out.
- Only connect nodes that are spatially close to each other.
Expand Down
3 changes: 3 additions & 0 deletions 3D/Sample Models/GasLab/GasLab Free Gas 3D.nlogox3d
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ The basic principle of all GasLab models is the following algorithm (for more de
## HOW TO USE IT

Initial settings:

- NUMBER-OF-PARTICLES: the number of gas particles.
- TRACE?: Draws the path of one individual particle.
- COLLIDE?: Turns collisions between particles on and off.
Expand All @@ -613,11 +614,13 @@ As in most NetLogo models, the first step is to press SETUP. It puts in the init
The GO button runs the models again and again. This is a "forever" button.

Monitors:

- PERCENT FAST, PERCENT MEDIUM, PERCENT SLOW monitors: percent of particles with different speeds: fast (red), medium (green), and slow (blue).
- AVERAGE SPEED: average speed of the particles.
- AVERAGE ENERGY: average kinetic energy of the particles.

Plots:

- SPEED COUNTS: plots the number of particles in each range of speed (fast, medium or slow).
- SPEED HISTOGRAM: speed distribution of all the particles. The gray line is the average value, and the black line is the initial average. The displayed values for speed are ten times the actual values.
- ENERGY HISTOGRAM: the distribution of energies of all the particles, calculated as (m*v^2)/2. The gray line is the average value, and the black line is the initial average.
Expand Down
6 changes: 6 additions & 0 deletions 3D/Sample Models/GasLab/GasLab Single Collision 3D.nlogox3d
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ The particles are modeled as hard balls with no internal energy except that whic
Coloring of the particles is with respect to one speed (10). Particles with a speed less than 5 are blue, those that are more than 15 are red, while all in those in-between are green.

Particles behave according to the following rules:

1. A particle moves in a straight line without changing its speed, unless it collides with another particle or bounces off the wall. The particles are aimed to hit each other at the origin.
2. Two particles "collide" if they find themselves on the same patch (the world is composed of a grid of small squares called patches).
3. A random axis is chosen, as if they are two balls that hit each other and this axis is the line connecting their centers.
Expand All @@ -565,27 +566,32 @@ Particles behave according to the following rules:
## HOW TO USE IT

Initial settings:

- COLLISION-ANGLE: Sets the angle that separates the pink and blue particles before the collision.
- REFLECTION-ANGLE: Sets the angle of the axis connecting the particles' centers when they collide with respect to the vertical axis. To calculate the outcome of the collision, the speeds of the two particles are projected onto this new axis and the new speeds and headings are computed. Other GasLab models use random values for "REFLECTION-ANGLE", but this model allows you to experiment with them one by one. This angle is called THETA in the code of the model.
- INIT-PINK-SPEED (or BLUE): Sets the initial speed of the pink (or blue) particle.
- PINK-MASS (or BLUE): Sets the mass of the pink (or blue) particle.

Other settings:

- SHOW-CENTER-OF-MASS?: If ON, the center of mass of the system will be shown in gray.
- WIGGLE?: If ON, the initial particles will be placed in a random location to start.

Buttons for running the model:

- SETUP
- RUN-MODE: Chooses between ONE COLLISION (just one run), ALL-COLLISION-ANGLES (loops through all the collision angles with 15-degrees steps) and ALL-REFLECTION-ANGLES (loops through all the reflection angles with 15-degrees steps).
- GO

Monitors:

- ENERGY OF PINK (or -BLUE): Shows the current energy of the pink (or blue) particle.
- SPEED OF PINK (or -BLUE): Shows the current speed of the pink (or blue) particle.
- AVERAGE SPEED: Shows the average of the speeds of the two particles.
- TOTAL ENERGY: Shows the sum of the energies of the two particles.

Plots:

- SPEEDS: speed of each of the particles over time.

## THINGS TO NOTICE
Expand Down
24 changes: 16 additions & 8 deletions 3D/Sample Models/GasLab/GasLab Two Gas 3D.nlogox3d
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,21 @@ This model is the simplest gas model in the suite of GasLab models. The particl

The basic principle of all GasLab models is the following algorithm (for more details, see the model "GasLab Gas in a Box"):

1) A particle moves in a straight line without changing its speed, unless it collides with another particle or bounces off the wall.
2) Two particles "collide" if their surfaces touch. In this model, the time at which any collision is about to occur is measured, and particles move forward until the first pair to collide touch one another. They are collided, and the cycle repeats.
3) The vector of collision for the particles describes the direction of the line connecting their centers.
4) The particles exchange momentum and energy only along this line, conforming to the conservation of momentum and energy for elastic collisions.
5) Each particle is assigned its new speed, direction and energy.
1. A particle moves in a straight line without changing its speed, unless it collides with another particle or bounces off the wall.
2. Two particles "collide" if their surfaces touch. In this model, the time at which any collision is about to occur is measured, and particles move forward until the first pair to collide touch one another. They are collided, and the cycle repeats.
3. The vector of collision for the particles describes the direction of the line connecting their centers.
4. The particles exchange momentum and energy only along this line, conforming to the conservation of momentum and energy for elastic collisions.
5. Each particle is assigned its new speed, direction and energy.

## HOW TO USE IT

Buttons:

- OPEN: opens the door between the two chambers and allows particles to pas through
- CLOSE: closes the door separating the two chambers

Sliders / Switches:

- NUM-MAGENTAS and NUM-CYANS: the number of gas particles of each type.
- COLLIDE?: Turns collisions between particles on and off.
- MAGENTA-INIT-SPEED and CYAN-INIT-SPEED: the initial speed of each type of particle -- particles of the same type start with the same speed.
Expand All @@ -713,12 +717,15 @@ The basic principle of all GasLab models is the following algorithm (for more de
- OPENING-SIZE: define the size of the "door" between the two chambers

As in most NetLogo models, the first step is to press SETUP. It puts in the initial conditions you have set with the sliders. Be sure to wait till the SETUP button stops before pushing GO.

The GO button runs the models again and again. This is a "forever" button.

Monitors:

MAGENTAS IN LEFT CHAMBER, CYANS IN RIGHT CHAMBER, AVERAGE SPEED MAGENTA and CYAN, and AVERAGE ENERGY MAGENTA and CYAN help you track the changes after the "door" has been opened.

Plots:

- Average Speeds: Shows the change in average speed for each type of particle.
- Average Energy: Shows the change in average energy for each type of particle.

Expand Down Expand Up @@ -747,9 +754,10 @@ Calculate how long the model takes to reach equilibrium with different particle
Set the number of cyan particles to zero. This is a model of a gas expanding into a vacuum. This experiment was first done by Joule, using two insulated chambers separated by a valve. He found that the temperature of the gas remained the same when the valve was opened. Why would this be true? Is this model consistent with that observation?

Try some extreme situations, to test your intuitive understanding:
-- masses the same, speeds of the two particles very different.
-- speeds the same, masses very different.
-- a very small number of one kind of particle -- almost, but not quite a vacuum. What happens to those few particles, and how do they affect the other kind?

- masses the same, speeds of the two particles very different.
- speeds the same, masses very different.
- a very small number of one kind of particle -- almost, but not quite a vacuum. What happens to those few particles, and how do they affect the other kind?

Try relating quantitatively the ratio of the equilibrium speeds of both gases after the wall is opened to the ratio of the masses of both gases. How are they related?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,29 +258,34 @@ Initialize the plate and edges to have temperatures that equal their respective
## HOW TO USE IT

There are five temperature sliders which enable users to set four fixed edge temperatures and one initial plate temperature:
-- TOP-TEMP - Top edge temperature
-- BOTTOM-TEMP - Bottom edge temperature
-- INITIAL-PLATE-TEMP - Initial plate temperature
-- LEFT-TEMP - Left edge temperature
-- RIGHT-TEMP - Right edge temperature

- TOP-TEMP - Top edge temperature
- BOTTOM-TEMP - Bottom edge temperature
- INITIAL-PLATE-TEMP - Initial plate temperature
- LEFT-TEMP - Left edge temperature
- RIGHT-TEMP - Right edge temperature

There is a slider and a chooser that govern the thermal diffusivity of the plate. Selecting a material in the chooser, then pressing the UPDATE ALPHA button will set the value of ALPHA based on the material selected:
-- ALPHA - The alpha constant of thermal diffusivity
-- MATERIAL-TYPE - The value of the chooser is a material from the above chart. You must press UPDATE ALPHA for this to change the value of ALPHA.

- ALPHA - The alpha constant of thermal diffusivity
- MATERIAL-TYPE - The value of the chooser is a material from the above chart. You must press UPDATE ALPHA for this to change the value of ALPHA.


There are four buttons with the following functions:
-- SETUP - Initializes the model
-- GO - Runs the simulation indefinitely
-- GO ONCE - Runs the simulation for 1 time step
-- UPDATE ALPHA - press this if you want to set ALPHA to a preset value based on the material selected by the MATERIAL-TYPE chooser

- SETUP - Initializes the model
- GO - Runs the simulation indefinitely
- GO ONCE - Runs the simulation for 1 time step
- UPDATE ALPHA - press this if you want to set ALPHA to a preset value based on the material selected by the MATERIAL-TYPE chooser

VISUALIZATION

There is also a chooser, COLOR-SCHEME, which determines what scheme is used for coloring the plate. It has 4 values:
RED - colors the plate a shade of red based on its temperature, uses NetLogo's SCALE-COLOR primitive (white is coldest, black is hottest)
RGB - colors the plate from a spectrum of RGB colors based on its temperature, uses the Palette extension
HSB - colors the plate from a spectrum of HSB colors based on its temperature
DIVERGENT - colors the plate from a spectrum of colors from a divergent palette based on its temperature, uses the Palette extension

* RED - colors the plate a shade of red based on its temperature, uses NetLogo's SCALE-COLOR primitive (white is coldest, black is hottest)
* RGB - colors the plate from a spectrum of RGB colors based on its temperature, uses the Palette extension
* HSB - colors the plate from a spectrum of HSB colors based on its temperature
* DIVERGENT - colors the plate from a spectrum of colors from a divergent palette based on its temperature, uses the Palette extension

## THINGS TO NOTICE

Expand Down Expand Up @@ -308,6 +313,7 @@ Set the parameters on the temperature sliders. Pick a value for ALPHA (or pick
Try different materials to observe the heat transfer speed. How does this compare to physical experiments?

Try the following sample settings:

- Top:100, Bottom:0, Left:0, Right:0
- Top:0, Bottom:100, Left:100, Right:100
- Top:0, Bottom:66, Left:99, Right:33
Expand Down
10 changes: 6 additions & 4 deletions Curricular Models/BEAGLE Evolution/Bird Breeder.nlogox
Original file line number Diff line number Diff line change
Expand Up @@ -825,29 +825,31 @@ There are 4 players in this selective breeding scenario and you are one of them.
You start with $500 and are trying to earn at least the target $ reward for success (set with the slider REWARD-FOR-SUCCESS. Each breeding event also has an assigned cost $ (COST-FOR-BREEDING). If you wish to breed your birds with another player's, you may press the REQUEST CONTRIBUTION BIRDS button. This will cost COST-CONTRIBUTION (set by this slider) for each bird contributed.

Initial settings (chooser):

- SCENARIO: chooser that determines whether you will be breeding "birds" or "dragons".

Buttons:
- SETUP: Press this first to assign the SCENARIO you will be playing
- GO:
Press this second to start the breeding challenge

- SETUP: Press this first to assign the SCENARIO you will be playing
- GO: Press this second to start the breeding challenge
- NEXT INSTRUCTION: Use this to display a series of instructions about how to user the interface and mouse interactions with the birds.

- REQUEST CONTRIBUTION BIRDS FOR BREEDING: When pressed one bird from each computer player is loaned for breeding to one of the top three breeding sites.
- BREED CURRENT BIRDS AT BREEDING SITE: When pressed, all breeding sites that have at least one male and one female in them will produce a set of eggs in the remaining available spaces (up to four at that breeding site). If more than one male or females are at that site, only one female and male will breed.
- REMOVE ALL EGGS FROM BREEDING SITES: Removes all eggs currently in all breeding sites.
- SELL GOAL BIRD: Attempts to sell the bird you have been trying to breed. This will generate either a warning (if you don't have the bird yet in your cages) or a reward message if you do have the bird. If you have the bird, the bird is removed from your cages and you will be given $, set by the REWARD-FOR-GOAL-BIRD slider.

Sliders:

- COST-BREEDING: cost in $ for every pair of birds that you breed.
- COST-CONTRIBUTION: cost in $ of pressing the REQUEST CONTRIBUTION BIRDS.
- REWARD-FOR-GOAL-BIRD: $ rewarded for selling one goal bird.

Switches:

- SHOW-GENETICS?: Show the Mendelian representation of the genes that each bird or egg has.

Monitors:

- Your funds $: Shows the money you currently have in your bank account.

## THINGS TO NOTICE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Agents randomly wander the map.
When there are only two agents on a patch of grass, each of the agents tries to eat a certain amount of the grass.

There are three types of agents:

- Modest agents (brown) who try to eat one-third of the grass on a patch
- Fair agents (red) who try to eat one-half of the grass on a patch
- Greed agents (blue) who try to eat two-thirds of the grass on a patch
Expand Down
2 changes: 2 additions & 0 deletions Curricular Models/CT-STEM/Calorimetry.nlogox
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,7 @@ As the model runs:
If you would like to pick up where you left off, feel free to use the SAVE-EXPERIMENT feature. This will save the model as a .model file. You can later use the LOAD-EXPERIMENT button to upload that saved model.

Plots/Monitors:

- The graph on the right records all three sensor readings over time
- The observed temperatures for each sensor can also be seen in the monitors beneath the graph

Expand All @@ -1193,6 +1194,7 @@ To see what the approximate mass of each particle is, type this in the command c
This model is primarily designed for an "Energy in Chemical Reactions" unit hosted at ct-stem.northwestern.edu and authored by Carole Namowicz, but is also designed for other relevant units.

#### Goals

- Simulating realistic molecule representation (including ions), movement, and collision.
- Simulating realistic energy in chemical reactions.
- Simulating a calorimeter by placing sensors in the model and measuring the energy change in the closed system.
Expand Down
3 changes: 2 additions & 1 deletion Curricular Models/CT-STEM/Free Fall.nlogox
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ As you press the PROCEED FOR ONE STEP button, change the mass of the ball and th

## CURRICULAR USES

Students can explore this computational model of a ball in free fall to
Students can explore this computational model of a ball in free fall to:

- make observations regarding changes in its motion and energy to learn about conservation of mechanical energy.
- relate position, velocity, and acceleration.
- be introduced to some basics of computational thinking.
Expand Down
27 changes: 16 additions & 11 deletions Curricular Models/CT-STEM/Hardy Weinberg Equilibrium.nlogox
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ Mice in this model can have two fur colors, dark and light. This fur color is de
Each clock tick is a generation in this model.

At each generation, the following happens:

- a mouse moves in a random direction
- if it finds a partner,
- it produces 2 offspring with the partner
Expand All @@ -257,17 +258,21 @@ Each mating pair produces two children. Each child receives one of the alleles f

## HOW TO USE IT

1. First, set the initial population by adjusting the following sliders:
- INITIAL-HOMOZYGOUS-DOMINANT-MALES (AA males)
- INITIAL-HETEROZYGOUS-MALES (Aa/aA males)
- INITIAL-HOMOZYGOUS-RECESSIVE-MALES (aa males)
- INITIAL-HOMOZYGOUS-DOMINANT-FEMALES (AA females)
- INITIAL-HETEROZYGOUS-FEMALES (Aa/aA females)
- INITIAL-HOMOZYGOUS-RECESSIVE-FEMALES (aa females)
2. Press the SETUP button
3. Press the GO-ONCE button to advance one generation. Press the GO-FOREVER button to observe the passage of many generations.
4. Watch the monitors and plots to see allele frequencies, phenotype frequencies, and population count
5. Watch the monitors to the right of the VIEW to see Hardy-Weinberg values, genotype frequencies, and a counter for phenotypes
Before running the model, first, set the initial population by adjusting the following sliders:

* INITIAL-HOMOZYGOUS-DOMINANT-MALES (AA males)
* INITIAL-HETEROZYGOUS-MALES (Aa/aA males)
* INITIAL-HOMOZYGOUS-RECESSIVE-MALES (aa males)
* INITIAL-HOMOZYGOUS-DOMINANT-FEMALES (AA females)
* INITIAL-HETEROZYGOUS-FEMALES (Aa/aA females)
* INITIAL-HOMOZYGOUS-RECESSIVE-FEMALES (aa females)

Then...

1. Press the SETUP button
2. Press the GO-ONCE button to advance one generation. Press the GO-FOREVER button to observe the passage of many generations.
3. Watch the monitors and plots to see allele frequencies, phenotype frequencies, and population count
4. Watch the monitors to the right of the VIEW to see Hardy-Weinberg values, genotype frequencies, and a counter for phenotypes

INITIAL-HOMOZYGOUS-DOMINANT-MALES, INITIAL-HETEROZYGOUS-MALES, INITIAL-HOMOZYGOUS-RECESSIVE-MALES, INITIAL-HOMOZYGOUS-DOMINANT-FEMALES, INITIAL-HETEROZYGOUS-FEMALES, and INITIAL-HOMOZYGOUS-RECESSIVE-FEMALES are all sliders that determine the initial population of the mice population, these sliders can range from 0 to 200.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ Think about how you could study other life-history traits such as the number of
## RELATED MODELS

Check out these other models in the Models Library:

- GenEvo 2 Genetic Drift
- GenEvo 3 Genetic Drift and Natural Selection
- Mendelian Inheritance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ INITIAL-NUMBER determines the number of gas particles used with SETUP. If the w

Choosers:
SHOW-SPEED-AS-COLOR? allows you to visualize particle speed using a color palette.

- The "blue-green-red" setting shows the lower half of the speeds of the starting population as blue, and the upper half as red.
- The "violet shades" setting shows a gradient from dark violet (slow) to light violet (fast).
- The "all green" setting shows all particles in green, regardless of speed.
Expand Down
Loading