Skip to content

Commit e678953

Browse files
committed
Resizing Fireflies, Fire, Virus on a Network, Hotelling's Law, and Party
1 parent b422375 commit e678953

5 files changed

Lines changed: 59 additions & 59 deletions

File tree

Sample Models/Biology/Fireflies.nlogox

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,26 @@ end
6868
; Copyright 1997 Uri Wilensky.
6969
; See Info tab for full copyright and license.]]></code>
7070
<widgets>
71-
<view x="300" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-35" height="430" showTickCounter="true" patchSize="6.0" fontSize="10" wrappingAllowedY="true" width="430" tickCounterLabel="ticks" maxPycor="35" updateMode="1" maxPxcor="35" minPxcor="-35"></view>
72-
<slider x="10" step="1" y="10" max="2000" display="number" height="33" min="0" direction="Horizontal" default="1500.0" variable="number" width="275" sizeVersion="0"></slider>
73-
<slider x="150" step="1" y="180" max="100" display="cycle-length" height="33" min="5" direction="Horizontal" default="10.0" variable="cycle-length" width="135" sizeVersion="0"></slider>
74-
<slider x="55" step="1" y="100" max="10" display="flash-length" height="33" min="1" direction="Horizontal" default="1.0" variable="flash-length" width="185" sizeVersion="0"></slider>
75-
<slider x="10" step="1" y="180" max="3" display="flashes-to-reset" height="33" min="1" direction="Horizontal" default="1.0" variable="flashes-to-reset" width="134" sizeVersion="0"></slider>
76-
<button x="55" y="140" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="setup" width="88" sizeVersion="0">setup</button>
77-
<switch x="55" y="220" height="33" on="false" variable="show-dark-fireflies?" display="show-dark-fireflies?" width="182" sizeVersion="0"></switch>
78-
<button x="150" y="140" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="go" width="90" sizeVersion="0">go</button>
79-
<plot x="11" autoPlotX="true" yMax="1500.0" autoPlotY="true" yAxis="Number" y="268" xMin="0.0" height="199" legend="false" xMax="100.0" yMin="0.0" xAxis="Time" display="Flashing Fireflies" width="275" sizeVersion="0">
71+
<view x="270" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-35" height="430" showTickCounter="true" patchSize="6.0" fontSize="10" wrappingAllowedY="true" width="430" tickCounterLabel="ticks" maxPycor="35" updateMode="1" maxPxcor="35" minPxcor="-35"></view>
72+
<slider x="10" step="1" y="10" max="2000" width="250" display="number" height="50" min="0" direction="Horizontal" default="1500.0" variable="number"></slider>
73+
<slider x="10" step="1" y="132" max="10" width="250" display="flash-length" height="50" min="1" direction="Horizontal" default="1.0" variable="flash-length"></slider>
74+
<chooser x="10" y="67" height="60" variable="strategy" current="0" width="250" display="strategy">
75+
<choice type="string" value="delay"></choice>
76+
<choice type="string" value="advance"></choice>
77+
</chooser>
78+
<slider x="10" step="1" y="241" max="3" width="250" display="flashes-to-reset" height="50" min="1" direction="Horizontal" default="1.0" variable="flashes-to-reset"></slider>
79+
<switch x="55" y="350" height="40" on="false" variable="show-dark-fireflies?" width="182" display="show-dark-fireflies?"></switch>
80+
<slider x="10" step="1" y="295" max="100" width="250" display="cycle-length" height="50" min="5" direction="Horizontal" default="10.0" variable="cycle-length"></slider>
81+
<button x="40" y="190" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="90" display="setup">setup</button>
82+
<button x="140" y="190" height="45" disableUntilTicks="true" forever="true" kind="Observer" width="95" display="go">go</button>
83+
<plot x="705" autoPlotX="true" yMax="1500.0" autoPlotY="true" yAxis="Number" y="75" xMin="0.0" height="265" legend="false" xMax="100.0" yMin="0.0" width="340" xAxis="Time" display="Flashing Fireflies">
8084
<setup>set-plot-y-range 0 number</setup>
8185
<update></update>
8286
<pen interval="1.0" mode="0" display="flashing" color="-2674135" legend="true">
8387
<setup></setup>
8488
<update>plot count turtles with [color = yellow]</update>
8589
</pen>
8690
</plot>
87-
<chooser x="55" y="50" height="45" variable="strategy" current="0" display="strategy" width="185" sizeVersion="0">
88-
<choice type="string" value="delay"></choice>
89-
<choice type="string" value="advance"></choice>
90-
</chooser>
9191
</widgets>
9292
<info><![CDATA[## WHAT IS IT?
9393

Sample Models/Earth Science/Fire.nlogox

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-internal1" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-internal1" snapToGrid="true">
33
<code><![CDATA[globals [
44
initial-trees ;; how many trees (green patches) we started with
55
burned-trees ;; how many have burned so far
@@ -55,12 +55,12 @@ end
5555
; Copyright 1997 Uri Wilensky.
5656
; See Info tab for full copyright and license.]]></code>
5757
<widgets>
58-
<view x="200" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-125" height="506" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="false" width="506" tickCounterLabel="ticks" maxPycor="125" updateMode="1" maxPxcor="125" minPxcor="-125"></view>
59-
<monitor x="43" precision="1" y="131" height="45" fontSize="11" display="percent burned" width="115" sizeVersion="0">(burned-trees / initial-trees)
58+
<view x="270" wrappingAllowedX="false" y="15" frameRate="30.0" minPycor="-125" height="506" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="false" width="506" tickCounterLabel="ticks" maxPycor="125" updateMode="1" maxPxcor="125" minPxcor="-125"></view>
59+
<slider x="10" step="1.0" y="15" max="99.0" width="250" display="density" height="50" min="0.0" direction="Horizontal" default="57.0" variable="density" units="%"></slider>
60+
<monitor x="75" precision="1" y="135" height="60" fontSize="11" width="115" display="percent burned">(burned-trees / initial-trees)
6061
* 100</monitor>
61-
<slider x="5" step="1.0" y="38" max="99.0" display="density" height="33" min="0.0" direction="Horizontal" default="57.0" variable="density" units="%" width="185" sizeVersion="0"></slider>
62-
<button x="106" y="79" height="36" disableUntilTicks="true" forever="true" kind="Observer" display="go" width="69" sizeVersion="0">go</button>
63-
<button x="26" y="79" height="36" disableUntilTicks="false" forever="false" kind="Observer" display="setup" width="70" sizeVersion="0">setup</button>
62+
<button x="135" y="75" height="45" disableUntilTicks="true" forever="true" kind="Observer" width="80" display="go">go</button>
63+
<button x="50" y="75" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="80" display="setup">setup</button>
6464
</widgets>
6565
<info><![CDATA[## WHAT IS IT?
6666

Sample Models/Networks/Virus on a Network.nlogox

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-internal1" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-internal1" snapToGrid="true">
33
<code><![CDATA[turtles-own
44
[
55
infected? ;; if true, the turtle is infectious
@@ -102,13 +102,17 @@ end
102102
; Copyright 2008 Uri Wilensky.
103103
; See Info tab for full copyright and license.]]></code>
104104
<widgets>
105-
<view x="265" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-20" height="455" showTickCounter="true" patchSize="11.0" fontSize="10" wrappingAllowedY="false" width="455" tickCounterLabel="ticks" maxPycor="20" updateMode="1" maxPxcor="20" minPxcor="-20"></view>
106-
<slider x="25" step="1" y="280" max="100" display="gain-resistance-chance" height="33" min="0.0" direction="Horizontal" default="5.0" variable="gain-resistance-chance" units="%" width="205" sizeVersion="0"></slider>
107-
<slider x="25" step="0.1" y="245" max="10.0" display="recovery-chance" height="33" min="0.0" direction="Horizontal" default="5.0" variable="recovery-chance" units="%" width="205" sizeVersion="0"></slider>
108-
<slider x="25" step="0.1" y="175" max="10.0" display="virus-spread-chance" height="33" min="0.0" direction="Horizontal" default="2.5" variable="virus-spread-chance" units="%" width="205" sizeVersion="0"></slider>
109-
<button x="25" y="125" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="95" sizeVersion="0">setup</button>
110-
<button x="135" y="125" height="40" disableUntilTicks="true" forever="true" kind="Observer" width="95" sizeVersion="0">go</button>
111-
<plot x="5" autoPlotX="true" yMax="100.0" autoPlotY="true" yAxis="% of nodes" y="325" xMin="0.0" height="164" legend="true" xMax="52.0" yMin="0.0" xAxis="time" display="Network Status" width="255" sizeVersion="0">
105+
<view x="270" wrappingAllowedX="false" y="7" frameRate="30.0" minPycor="-20" height="455" showTickCounter="true" patchSize="11.0" fontSize="10" wrappingAllowedY="false" width="455" tickCounterLabel="ticks" maxPycor="20" updateMode="1" maxPxcor="20" minPxcor="-20"></view>
106+
<slider x="10" step="1" y="415" max="100" width="250" display="gain-resistance-chance" height="50" min="0.0" direction="Horizontal" default="5.0" variable="gain-resistance-chance" units="%"></slider>
107+
<slider x="10" step="5" y="7" max="300" width="250" display="number-of-nodes" height="50" min="10" direction="Horizontal" default="150.0" variable="number-of-nodes"></slider>
108+
<slider x="10" step="1" y="61" max="number-of-nodes - 1" width="250" display="average-node-degree" height="50" min="1" direction="Horizontal" default="6.0" variable="average-node-degree"></slider>
109+
<slider x="10" step="1" y="115" max="number-of-nodes" width="250" display="initial-outbreak-size" height="50" min="1" direction="Horizontal" default="3.0" variable="initial-outbreak-size"></slider>
110+
<slider x="10" step="0.1" y="360" max="10.0" width="250" display="recovery-chance" height="50" min="0.0" direction="Horizontal" default="5.0" variable="recovery-chance" units="%"></slider>
111+
<slider x="10" step="1" y="305" max="20" width="250" display="virus-check-frequency" height="50" min="1" direction="Horizontal" default="1.0" variable="virus-check-frequency" units="ticks"></slider>
112+
<slider x="10" step="0.1" y="250" max="10.0" width="250" display="virus-spread-chance" height="50" min="0.0" direction="Horizontal" default="2.5" variable="virus-spread-chance" units="%"></slider>
113+
<button x="35" y="185" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="95">setup</button>
114+
<button x="140" y="185" height="45" disableUntilTicks="true" forever="true" kind="Observer" width="95">go</button>
115+
<plot x="735" autoPlotX="true" yMax="100.0" autoPlotY="true" yAxis="% of nodes" y="90" xMin="0.0" height="255" legend="true" xMax="52.0" yMin="0.0" width="315" xAxis="time" display="Network Status">
112116
<setup></setup>
113117
<update></update>
114118
<pen interval="1.0" mode="0" display="susceptible" color="-13345367" legend="true">
@@ -124,10 +128,6 @@ end
124128
<update>plot (count turtles with [resistant?]) / (count turtles) * 100</update>
125129
</pen>
126130
</plot>
127-
<slider x="25" step="5" y="15" max="300" display="number-of-nodes" height="33" min="10" direction="Horizontal" default="150.0" variable="number-of-nodes" width="205" sizeVersion="0"></slider>
128-
<slider x="25" step="1" y="210" max="20" display="virus-check-frequency" height="33" min="1" direction="Horizontal" default="1.0" variable="virus-check-frequency" units="ticks" width="205" sizeVersion="0"></slider>
129-
<slider x="25" step="1" y="85" max="number-of-nodes" display="initial-outbreak-size" height="33" min="1" direction="Horizontal" default="3.0" variable="initial-outbreak-size" width="205" sizeVersion="0"></slider>
130-
<slider x="25" step="1" y="50" max="number-of-nodes - 1" display="average-node-degree" height="33" min="1" direction="Horizontal" default="6.0" variable="average-node-degree" width="205" sizeVersion="0"></slider>
131131
</widgets>
132132
<info><![CDATA[## WHAT IS IT?
133133

Sample Models/Social Science/Economics/Hotelling's Law.nlogox

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,21 @@ end
176176
; Copyright 2009 Uri Wilensky.
177177
; See Info tab for full copyright and license.]]></code>
178178
<widgets>
179-
<view x="285" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-20" height="537" showTickCounter="true" patchSize="13.0" fontSize="10" wrappingAllowedY="false" width="537" tickCounterLabel="ticks" maxPycor="20" updateMode="1" maxPxcor="20" minPxcor="-20"></view>
180-
<button x="180" y="75" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="100" sizeVersion="0">setup</button>
181-
<button x="180" y="125" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="100" sizeVersion="0">go</button>
182-
<button x="180" y="175" height="33" disableUntilTicks="true" forever="false" kind="Observer" display="go once" width="100" sizeVersion="0">go</button>
183-
<plot x="855" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="revenue" y="400" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" xAxis="time" display="revenues" width="335" sizeVersion="0">
179+
<view x="295" wrappingAllowedX="false" y="7" frameRate="30.0" minPycor="-20" height="589" showTickCounter="true" patchSize="14.27" fontSize="10" wrappingAllowedY="false" width="589" tickCounterLabel="ticks" maxPycor="20" updateMode="1" maxPxcor="20" minPxcor="-20"></view>
180+
<slider x="10" step="1" y="10" max="10" width="275" display="number-of-stores" height="50" min="2" direction="Horizontal" default="3.0" variable="number-of-stores"></slider>
181+
<button x="200" y="130" height="45" disableUntilTicks="true" forever="true" kind="Observer" width="85">go</button>
182+
<chooser x="10" y="187" height="60" variable="rules" current="0" width="275" display="rules">
183+
<choice type="string" value="normal"></choice>
184+
<choice type="string" value="moving-only"></choice>
185+
<choice type="string" value="pricing-only"></choice>
186+
</chooser>
187+
<chooser x="10" y="65" height="60" variable="layout" current="0" width="275" display="layout">
188+
<choice type="string" value="plane"></choice>
189+
<choice type="string" value="line"></choice>
190+
</chooser>
191+
<button x="105" y="130" height="45" disableUntilTicks="true" forever="false" kind="Observer" width="90" display="go once">go</button>
192+
<button x="10" y="130" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="90">setup</button>
193+
<plot x="895" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="revenue" y="405" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" width="335" xAxis="time" display="revenues">
184194
<setup>ask turtles [
185195
create-temporary-plot-pen (word who)
186196
set-plot-pen-color color
@@ -190,8 +200,7 @@ end
190200
plot (area-count * price)
191201
]</update>
192202
</plot>
193-
<slider x="10" step="1" y="75" max="10" display="number-of-stores" height="33" min="2" direction="Horizontal" default="2.0" variable="number-of-stores" width="155" sizeVersion="0"></slider>
194-
<plot x="855" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="price" y="10" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" xAxis="time" display="prices" width="335" sizeVersion="0">
203+
<plot x="895" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="price" y="5" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" width="335" xAxis="time" display="prices">
195204
<setup>ask turtles [
196205
create-temporary-plot-pen (word who)
197206
set-plot-pen-color color
@@ -201,7 +210,7 @@ end
201210
plot (price)
202211
]</update>
203212
</plot>
204-
<plot x="855" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="area" y="205" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" xAxis="time" display="areas" width="335" sizeVersion="0">
213+
<plot x="895" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="area" y="205" xMin="0.0" height="195" legend="false" xMax="10.0" yMin="0.0" width="335" xAxis="time" display="areas">
205214
<setup>ask turtles [
206215
create-temporary-plot-pen (word who)
207216
set-plot-pen-color color
@@ -211,15 +220,6 @@ end
211220
plot (area-count)
212221
]</update>
213222
</plot>
214-
<chooser x="10" y="165" height="45" variable="rules" current="0" display="rules" width="155" sizeVersion="0">
215-
<choice type="string" value="normal"></choice>
216-
<choice type="string" value="moving-only"></choice>
217-
<choice type="string" value="pricing-only"></choice>
218-
</chooser>
219-
<chooser x="10" y="115" height="45" variable="layout" current="0" display="layout" width="155" sizeVersion="0">
220-
<choice type="string" value="plane"></choice>
221-
<choice type="string" value="line"></choice>
222-
</chooser>
223223
</widgets>
224224
<info><![CDATA[## WHAT IS IT?
225225

0 commit comments

Comments
 (0)