You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,18 @@ Asking and reporting in LevelSpace is conceptually pretty straight forward: You
11
11
12
12
In general, the LevelSpace syntax has been designed to align with existing NetLogo primitives whenever possible.
13
13
14
-
### Headless and Interactive Models
14
+
### Headless and Interactive Models
15
15
16
-
LevelSpace has two different child model types; headless models and interactive models. They each have their strengths and weaknesses:
16
+
LevelSpace has two different child model types; headless models and interactive models. They each have their strengths and weaknesses:
17
17
18
-
Interactive models
18
+
Interactive models
19
19
* are full-fledged models that give full access to their interface and widgets,
20
20
* run a bit slower, and use more memory
21
21
* are visible by default
22
22
23
23
Headless Models
24
-
* only give you access to their view and command center
25
-
* are faster and use less memory than interactive models.
24
+
* only give you access to their view and command center
25
+
* are faster and use less memory than interactive models.
26
26
* are hidden by default
27
27
28
28
Typically you will want to use headless models when you are running a large number of models, or if you simply want to run them faster. Interactive models are good if you run a small amount of models, if you are writing a LevelSpace model and need to be able to debug, or if you need access to widgets during runtime.
@@ -45,7 +45,7 @@ A simple thing we can do is to open up some models, run them concurrently, and c
45
45
to setup
46
46
ls:reset
47
47
ca
48
-
ls:create-models 30 "Wolf Sheep Predation.nlogo"
48
+
ls:create-models 30 "Wolf Sheep Predation.nlogox"
49
49
ls:ask ls:models [ set grass? true setup ]
50
50
reset-ticks
51
51
end
@@ -62,7 +62,7 @@ end
62
62
63
63
This use case is based on the Model Interactions Example-model from the NetLogo Models Library.
64
64
65
-
Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`, and a Climate Change model called `CC`. Now let's imagine that we want the regrowth time in the wSP model to depend on the temperature in the CC model. Using LevelSpace's primitives, we could do something like this:
65
+
Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`, and a Climate Change model called `CC`. Now let's imagine that we want the regrowth time in the wSP model to depend on the temperature in the CC model. Using LevelSpace's primitives, we could do something like this:
66
66
67
67
```
68
68
; save new regrowth time in a temporary LevelSpace let-variable
@@ -75,7 +75,7 @@ Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`
75
75
76
76
; finally ask both models to go
77
77
ls:ask ls:models [ go ]
78
-
```
78
+
```
79
79
80
80
### A general Usecase: Tidying up "Dead" Child Models
Create the specified number of instances of the given .nlogo model. The path can be absolute, or relative to the main model. Compared with `ls:create-interactive-models`, this primitive creates lightweight models that are hidden by default. You should use this primitive if you plan on having many instances of the given model. The models may be shown using `ls:show`; when visible, they will have a view and command center, but no other widgets, e.g. plots or monitors.
144
+
Create the specified number of instances of the given model. The path can be absolute, or relative to the main model. Compared with `ls:create-interactive-models`, this primitive creates lightweight models that are hidden by default. You should use this primitive if you plan on having many instances of the given model. The models may be shown using `ls:show`; when visible, they will have a view and command center, but no other widgets, e.g. plots or monitors.
145
145
146
146
If given a command, LevelSpace will call the command after loading each instance of the model with the `model-id` as the argument. This allows you to easily store model ids in a variable or list when loading models, or do other initialization. For example, to store a model id in a variable, you can do:
147
147
148
148
```NetLogo
149
149
let model-id 0
150
-
(ls:create-models "My-Model.nlogo" [ [id] -> set model-id id ])
150
+
(ls:create-models "My-Model.nlogox" [ [id] -> set model-id id ])
151
151
```
152
152
153
153
Child model RNGs are seeded from the parent models RNG when they are created.
Like `ls:create-models`, creates the specified number of instances of the given .nlogo model. Unlike `ls:create-models`, `ls:create-interactive-models` creates models that are visible by default, and have all widgets. You should use this primitive if you plan on having only a handful of instances of the given model, and would like to be able to interact with the instances through their interfaces during runtime.
167
+
Like `ls:create-models`, creates the specified number of instances of the given model. Unlike `ls:create-models`, `ls:create-interactive-models` creates models that are visible by default, and have all widgets. You should use this primitive if you plan on having only a handful of instances of the given model, and would like to be able to interact with the instances through their interfaces during runtime.
168
168
169
169
Child model RNGs are seeded from the parent models RNG when they are created.
170
170
Thus, if you seed the parent's model RNG before child model before child models are created, the simulation as a whole will be reproducible.
Reports the name of the .nlogo file of the model. This is the name of the window in which the model appears when visible. If a list of models is given, a list of names is reported.
448
+
Reports the name of the model file. This is the name of the window in which the model appears when visible. If a list of models is given, a list of names is reported.
Copy file name to clipboardExpand all lines: USING.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,18 @@ Asking and reporting in LevelSpace is conceptually pretty straight forward: You
6
6
7
7
In general, the LevelSpace syntax has been designed to align with existing NetLogo primitives whenever possible.
8
8
9
-
### Headless and Interactive Models
9
+
### Headless and Interactive Models
10
10
11
-
LevelSpace has two different child model types; headless models and interactive models. They each have their strengths and weaknesses:
11
+
LevelSpace has two different child model types; headless models and interactive models. They each have their strengths and weaknesses:
12
12
13
-
Interactive models
13
+
Interactive models
14
14
* are full-fledged models that give full access to their interface and widgets,
15
15
* run a bit slower, and use more memory
16
16
* are visible by default
17
17
18
18
Headless Models
19
-
* only give you access to their view and command center
20
-
* are faster and use less memory than interactive models.
19
+
* only give you access to their view and command center
20
+
* are faster and use less memory than interactive models.
21
21
* are hidden by default
22
22
23
23
Typically you will want to use headless models when you are running a large number of models, or if you simply want to run them faster. Interactive models are good if you run a small amount of models, if you are writing a LevelSpace model and need to be able to debug, or if you need access to widgets during runtime.
@@ -40,7 +40,7 @@ A simple thing we can do is to open up some models, run them concurrently, and c
40
40
to setup
41
41
ls:reset
42
42
ca
43
-
ls:create-models 30 "Wolf Sheep Predation.nlogo"
43
+
ls:create-models 30 "Wolf Sheep Predation.nlogox"
44
44
ls:ask ls:models [ set grass? true setup ]
45
45
reset-ticks
46
46
end
@@ -57,7 +57,7 @@ end
57
57
58
58
This use case is based on the Model Interactions Example-model from the NetLogo Models Library.
59
59
60
-
Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`, and a Climate Change model called `CC`. Now let's imagine that we want the regrowth time in the wSP model to depend on the temperature in the CC model. Using LevelSpace's primitives, we could do something like this:
60
+
Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`, and a Climate Change model called `CC`. Now let's imagine that we want the regrowth time in the wSP model to depend on the temperature in the CC model. Using LevelSpace's primitives, we could do something like this:
61
61
62
62
```
63
63
; save new regrowth time in a temporary LevelSpace let-variable
@@ -70,7 +70,7 @@ Let's imagine that we have two models: a Wolf Sheep Predation-model called `WSP`
70
70
71
71
; finally ask both models to go
72
72
ls:ask ls:models [ go ]
73
-
```
73
+
```
74
74
75
75
### A general Usecase: Tidying up "Dead" Child Models
Create the specified number of instances of the given .nlogo model. The path can be absolute, or relative to the main model. Compared with `ls:create-interactive-models`, this primitive creates lightweight models that are hidden by default. You should use this primitive if you plan on having many instances of the given model. The models may be shown using `ls:show`; when visible, they will have a view and command center, but no other widgets, e.g. plots or monitors.
57
+
Create the specified number of instances of the given model. The path can be absolute, or relative to the main model. Compared with `ls:create-interactive-models`, this primitive creates lightweight models that are hidden by default. You should use this primitive if you plan on having many instances of the given model. The models may be shown using `ls:show`; when visible, they will have a view and command center, but no other widgets, e.g. plots or monitors.
58
58
59
59
If given a command, LevelSpace will call the command after loading each instance of the model with the `model-id` as the argument. This allows you to easily store model ids in a variable or list when loading models, or do other initialization. For example, to store a model id in a variable, you can do:
60
60
61
61
```NetLogo
62
62
let model-id 0
63
-
(ls:create-models "My-Model.nlogo" [ [id] -> set model-id id ])
63
+
(ls:create-models "My-Model.nlogox" [ [id] -> set model-id id ])
64
64
```
65
65
66
66
Child model RNGs are seeded from the parent models RNG when they are created.
@@ -75,7 +75,7 @@ Use the `ls:random-seed` primitive to seed the model system's RNGs after child m
Like `ls:create-models`, creates the specified number of instances of the given .nlogo model. Unlike `ls:create-models`, `ls:create-interactive-models` creates models that are visible by default, and have all widgets. You should use this primitive if you plan on having only a handful of instances of the given model, and would like to be able to interact with the instances through their interfaces during runtime.
78
+
Like `ls:create-models`, creates the specified number of instances of the given model. Unlike `ls:create-models`, `ls:create-interactive-models` creates models that are visible by default, and have all widgets. You should use this primitive if you plan on having only a handful of instances of the given model, and would like to be able to interact with the instances through their interfaces during runtime.
79
79
80
80
Child model RNGs are seeded from the parent models RNG when they are created.
81
81
Thus, if you seed the parent's model RNG before child model before child models are created, the simulation as a whole will be reproducible.
@@ -332,7 +332,7 @@ Hide all of the given models *and their descendents*. Hiding models is a good wa
Reports the name of the .nlogo file of the model. This is the name of the window in which the model appears when visible. If a list of models is given, a list of names is reported.
347
+
Reports the name of the model file. This is the name of the window in which the model appears when visible. If a list of models is given, a list of names is reported.
0 commit comments