Skip to content

Commit f424dd1

Browse files
committed
Converted some Chemistry & Physics and Computer Science sample models
1 parent 381dcd6 commit f424dd1

5 files changed

Lines changed: 89 additions & 89 deletions

File tree

Sample Models/Chemistry & Physics/Materials Science/Heat Diffusion.nlogox

Lines changed: 14 additions & 14 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-beta0" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[globals [
44
plate-size ; the size of the plate on which heat is diffusing
55
; Used for scaling the color of the patches
@@ -161,30 +161,30 @@ end
161161
; Copyright 1998 Uri Wilensky.
162162
; See Info tab for full copyright and license.]]></code>
163163
<widgets>
164-
<view x="307" wrappingAllowedX="true" y="145" frameRate="30.0" minPycor="-25" height="259" showTickCounter="true" patchSize="5.0" fontSize="10" wrappingAllowedY="true" width="259" tickCounterLabel="ticks" maxPycor="25" updateMode="1" maxPxcor="25" minPxcor="-25"></view>
165-
<slider x="0" step="1.0E-4" y="171" max="10.0" display="alpha" height="33" min="0.0010" direction="Horizontal" default="0.8418" variable="alpha" width="135" sizeVersion="0"></slider>
166-
<slider x="349" step="1.0" y="103" max="100.0" display="top-temp" height="33" min="1.0" direction="Horizontal" default="50.0" variable="top-temp" width="155" sizeVersion="0"></slider>
167-
<slider x="577" step="1.0" y="210" max="100.0" display="right-temp" height="155" min="1.0" direction="Vertical" default="50.0" variable="right-temp" width="33" sizeVersion="0"></slider>
168-
<slider x="349" step="1.0" y="433" max="100.0" display="bottom-temp" height="33" min="1.0" direction="Horizontal" default="50.0" variable="bottom-temp" width="160" sizeVersion="0"></slider>
169-
<slider x="5" step="1.0" y="50" max="100.0" display="initial-plate-temp" height="33" min="1.0" direction="Horizontal" default="44.0" variable="initial-plate-temp" width="135" sizeVersion="0"></slider>
170-
<button x="230" y="10" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="Go" width="65" sizeVersion="0">go</button>
171-
<slider x="267" step="1.0" y="215" max="100.0" display="left-temp" height="155" min="1.0" direction="Vertical" default="1.0" variable="left-temp" width="33" sizeVersion="0"></slider>
172-
<button x="5" y="10" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="Setup" width="116" sizeVersion="0">setup</button>
173-
<button x="137" y="10" height="33" disableUntilTicks="true" forever="false" kind="Observer" display="Go Once" width="73" sizeVersion="0">go</button>
174-
<button x="160" y="173" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="Update Alpha" width="98" sizeVersion="0">update-alpha</button>
175-
<chooser x="3" y="119" height="45" variable="material-type" current="3" display="material-type" width="135" sizeVersion="0">
164+
<view x="490" wrappingAllowedX="true" y="215" frameRate="30.0" minPycor="-25" height="259" showTickCounter="true" patchSize="5.0" fontSize="10" wrappingAllowedY="true" width="259" tickCounterLabel="ticks" maxPycor="25" updateMode="1" maxPxcor="25" minPxcor="-25"></view>
165+
<button x="5" y="7" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="115" display="Setup">setup</button>
166+
<button x="130" y="7" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="75" display="Go Once">go</button>
167+
<button x="215" y="7" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="65" display="Go">go</button>
168+
<slider x="5" step="1.0" y="50" max="100.0" width="275" display="initial-plate-temp" height="50" min="1.0" direction="Horizontal" default="44.0" variable="initial-plate-temp"></slider>
169+
<chooser x="5" y="110" height="60" variable="material-type" current="3" width="275" display="material-type">
176170
<choice type="string" value="wood"></choice>
177171
<choice type="string" value="stone"></choice>
178172
<choice type="string" value="iron"></choice>
179173
<choice type="string" value="aluminum"></choice>
180174
<choice type="string" value="silver"></choice>
181175
<choice type="string" value="other"></choice>
182176
</chooser>
183-
<note x="155" y="90" height="73" backgroundDark="0" fontSize="11" width="160" markdown="false" textColorLight="-16777216" backgroundLight="0">Choose a material and
177+
<slider x="5" step="1.0E-4" y="180" max="10.0" width="275" display="alpha" height="50" min="0.0010" direction="Horizontal" default="0.8418" variable="alpha"></slider>
178+
<button x="290" y="195" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="98" display="Update Alpha">update-alpha</button>
179+
<note x="290" y="110" backgroundDark="0" fontSize="11" width="160" markdown="false" height="73" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Choose a material and
184180
then press UPDATE ALPHA
185181
based on that material,
186182
or set ALPHA directly
187183
from the slider.</note>
184+
<slider x="760" step="1.0" y="215" max="100.0" width="50" display="right-temp" height="259" min="1.0" direction="Vertical" default="50.0" variable="right-temp"></slider>
185+
<slider x="430" step="1.0" y="215" max="100.0" width="50" display="left-temp" height="259" min="1.0" direction="Vertical" default="1.0" variable="left-temp"></slider>
186+
<slider x="490" step="1.0" y="155" max="100.0" width="259" display="top-temp" height="50" min="1.0" direction="Horizontal" default="50.0" variable="top-temp"></slider>
187+
<slider x="490" step="1.0" y="485" max="100.0" width="259" display="bottom-temp" height="50" min="1.0" direction="Horizontal" default="50.0" variable="bottom-temp"></slider>
188188
</widgets>
189189
<info><![CDATA[## WHAT IS IT?
190190

Sample Models/Chemistry & Physics/Waves/Lattice Gas Automaton.nlogox

Lines changed: 8 additions & 8 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-beta0" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[globals [
44
lattice ;; only those patches where both pxcor and pycor are even
55
]
@@ -68,13 +68,13 @@ end
6868
; Copyright 2002 Uri Wilensky.
6969
; See Info tab for full copyright and license.]]></code>
7070
<widgets>
71-
<view x="298" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="0" height="324" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="true" width="324" tickCounterLabel="ticks" maxPycor="159" updateMode="1" maxPxcor="159" minPxcor="0"></view>
72-
<button x="179" y="41" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="101" sizeVersion="0">setup</button>
73-
<button x="20" y="89" height="46" disableUntilTicks="true" forever="true" kind="Observer" width="124" sizeVersion="0">go</button>
74-
<slider x="7" step="1" y="41" max="100" display="density" height="33" min="0" direction="Horizontal" default="20.0" variable="density" units="%" width="172" sizeVersion="0"></slider>
75-
<button x="180" y="164" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="101" sizeVersion="0">draw-circle</button>
76-
<slider x="8" step="1" y="164" max="20" display="radius" height="33" min="0" direction="Horizontal" default="10.0" variable="radius" width="172" sizeVersion="0"></slider>
77-
<button x="147" y="89" height="46" disableUntilTicks="true" forever="true" kind="Observer" display="reverse" width="124" sizeVersion="0">go-reverse</button>
71+
<view x="375" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="0" height="324" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="true" width="324" tickCounterLabel="ticks" maxPycor="159" updateMode="1" maxPxcor="159" minPxcor="0"></view>
72+
<slider x="5" step="1" y="7" max="100" width="250" display="density" height="50" min="0" direction="Horizontal" default="20.0" variable="density" units="%"></slider>
73+
<button x="265" y="7" height="50" disableUntilTicks="false" forever="false" kind="Observer" width="101">setup</button>
74+
<button x="35" y="75" height="50" disableUntilTicks="true" forever="true" kind="Observer" width="124" display="reverse">go-reverse</button>
75+
<button x="170" y="75" height="50" disableUntilTicks="true" forever="true" kind="Observer" width="124">go</button>
76+
<slider x="5" step="1" y="145" max="20" width="250" display="radius" height="50" min="0" direction="Horizontal" default="10.0" variable="radius"></slider>
77+
<button x="265" y="145" height="50" disableUntilTicks="true" forever="true" kind="Observer" width="101">draw-circle</button>
7878
</widgets>
7979
<info><![CDATA[## WHAT IS IT?
8080

Sample Models/Chemistry & Physics/Waves/Wave Machine.nlogox

Lines changed: 16 additions & 16 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-beta0" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[globals [
44
membrane-edge-x ;; horizontal distance from center to edge of membrane
55
membrane-edge-y ;; vertical distance from center to edge of membrane
@@ -99,21 +99,21 @@ end
9999
; Copyright 1997 Uri Wilensky.
100100
; See Info tab for full copyright and license.]]></code>
101101
<widgets>
102-
<view x="299" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-40" height="490" showTickCounter="true" patchSize="6.0" fontSize="10" wrappingAllowedY="false" width="490" tickCounterLabel="ticks" maxPycor="40" updateMode="1" maxPxcor="40" minPxcor="-40"></view>
103-
<button x="71" y="41" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="78" sizeVersion="0">setup</button>
104-
<button x="152" y="41" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="77" sizeVersion="0">go</button>
105-
<slider x="10" step="1" y="114" max="50" display="stiffness" height="33" min="0" direction="Horizontal" default="50.0" variable="stiffness" width="140" sizeVersion="0"></slider>
106-
<slider x="11" step="1" y="181" max="11" display="driver-x" height="33" min="-11" direction="Horizontal" default="-11.0" variable="driver-x" width="140" sizeVersion="0"></slider>
107-
<slider x="152" step="1" y="181" max="11" display="driver-y" height="33" min="-11" direction="Horizontal" default="0.0" variable="driver-y" width="140" sizeVersion="0"></slider>
108-
<switch x="11" y="324" height="33" on="true" variable="three-d?" display="three-d?" width="118" sizeVersion="0"></switch>
109-
<slider x="11" step="1" y="215" max="10" display="driver-size" height="33" min="0" direction="Horizontal" default="2.0" variable="driver-size" width="140" sizeVersion="0"></slider>
110-
<slider x="152" step="1" y="215" max="30" display="driver-amplitude" height="33" min="0" direction="Horizontal" default="9.0" variable="driver-amplitude" width="140" sizeVersion="0"></slider>
111-
<slider x="71" step="1" y="249" max="100" display="driver-frequency" height="33" min="0" direction="Horizontal" default="100.0" variable="driver-frequency" width="163" sizeVersion="0"></slider>
112-
<slider x="151" step="1" y="114" max="99" display="friction" height="33" min="0" direction="Horizontal" default="10.0" variable="friction" width="141" sizeVersion="0"></slider>
113-
<slider x="130" step="1" y="324" max="90" display="view-angle" height="33" min="0" direction="Horizontal" default="45.0" variable="view-angle" width="162" sizeVersion="0"></slider>
114-
<note x="14" y="92" height="20" textColorLight="-16777216" fontSize="11" width="121" markdown="false">Membrane settings</note>
115-
<note x="13" y="161" height="18" textColorLight="-16777216" fontSize="11" width="90" markdown="false">Driver settings</note>
116-
<note x="11" y="306" height="18" textColorLight="-16777216" fontSize="11" width="121" markdown="false">Display settings</note>
102+
<view x="525" wrappingAllowedX="false" y="7" frameRate="30.0" minPycor="-40" height="490" showTickCounter="true" patchSize="6.0" fontSize="10" wrappingAllowedY="false" width="490" tickCounterLabel="ticks" maxPycor="40" updateMode="1" maxPxcor="40" minPxcor="-40"></view>
103+
<note x="14" y="94" backgroundDark="0" fontSize="11" width="121" markdown="false" height="20" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Membrane settings</note>
104+
<note x="13" y="180" backgroundDark="0" fontSize="11" width="90" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Driver settings</note>
105+
<note x="11" y="376" backgroundDark="0" fontSize="11" width="121" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Display settings</note>
106+
<switch x="10" y="395" height="50" on="true" variable="three-d?" width="120" display="three-d?"></switch>
107+
<slider x="10" step="1" y="200" max="11" width="250" display="driver-x" height="50" min="-11" direction="Horizontal" default="-11.0" variable="driver-x"></slider>
108+
<slider x="265" step="1" y="200" max="11" width="250" display="driver-y" height="50" min="-11" direction="Horizontal" default="0.0" variable="driver-y"></slider>
109+
<slider x="138" step="1" y="310" max="100" width="250" display="driver-frequency" height="50" min="0" direction="Horizontal" default="100.0" variable="driver-frequency"></slider>
110+
<slider x="10" step="1" y="255" max="10" width="250" display="driver-size" height="50" min="0" direction="Horizontal" default="2.0" variable="driver-size"></slider>
111+
<slider x="265" step="1" y="255" max="30" width="250" display="driver-amplitude" height="50" min="0" direction="Horizontal" default="9.0" variable="driver-amplitude"></slider>
112+
<slider x="10" step="1" y="115" max="50" width="250" display="stiffness" height="50" min="0" direction="Horizontal" default="50.0" variable="stiffness"></slider>
113+
<slider x="265" step="1" y="115" max="99" width="250" display="friction" height="50" min="0" direction="Horizontal" default="10.0" variable="friction"></slider>
114+
<slider x="135" step="1" y="395" max="90" width="250" display="view-angle" height="50" min="0" direction="Horizontal" default="45.0" variable="view-angle"></slider>
115+
<button x="264" y="30" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="77">go</button>
116+
<button x="180" y="30" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="78">setup</button>
117117
</widgets>
118118
<info><![CDATA[## WHAT IS IT?
119119

Sample Models/Computer Science/Particle Swarm Optimization.nlogox

Lines changed: 19 additions & 19 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-beta0" snapToGrid="true">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[patches-own
44
[
55
val ; each patch has a "fitness" value associated with it
@@ -155,28 +155,28 @@ end
155155
; Copyright 2008 Uri Wilensky.
156156
; See Info tab for full copyright and license.]]></code>
157157
<widgets>
158-
<view x="265" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-100" height="406" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="true" width="406" tickCounterLabel="ticks" maxPycor="100" updateMode="1" maxPxcor="100" minPxcor="-100"></view>
159-
<button x="175" y="95" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="80" sizeVersion="0">setup</button>
160-
<button x="175" y="175" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="80" sizeVersion="0">go</button>
161-
<slider x="10" step="1" y="50" max="100" display="population-size" height="33" min="1" direction="Horizontal" default="50.0" variable="population-size" width="215" sizeVersion="0"></slider>
162-
<slider x="10" step="0.1" y="220" max="2" display="attraction-to-personal-best" height="33" min="0" direction="Horizontal" default="2.0" variable="attraction-to-personal-best" width="215" sizeVersion="0"></slider>
163-
<slider x="10" step="0.1" y="260" max="2" display="attraction-to-global-best" height="33" min="0" direction="Horizontal" default="1.0" variable="attraction-to-global-best" width="215" sizeVersion="0"></slider>
164-
<slider x="10" step="0.01" y="140" max="1.0" display="particle-inertia" height="33" min="0" direction="Horizontal" default="0.98" variable="particle-inertia" width="155" sizeVersion="0"></slider>
165-
<button x="175" y="135" height="33" disableUntilTicks="true" forever="false" kind="Observer" display="step" width="80" sizeVersion="0">go</button>
166-
<chooser x="130" y="395" height="45" variable="trails-mode" current="0" display="trails-mode" width="95" sizeVersion="0">
167-
<choice type="string" value="None"></choice>
168-
<choice type="string" value="Tails"></choice>
169-
<choice type="string" value="Traces"></choice>
170-
</chooser>
171-
<slider x="10" step="1" y="180" max="20" display="particle-speed-limit" height="33" min="1" direction="Horizontal" default="10.0" variable="particle-speed-limit" width="155" sizeVersion="0"></slider>
172-
<chooser x="20" y="395" height="45" variable="highlight-mode" current="0" display="highlight-mode" width="105" sizeVersion="0">
158+
<view x="360" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="-100" height="406" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="true" width="406" tickCounterLabel="ticks" maxPycor="100" updateMode="1" maxPxcor="100" minPxcor="-100"></view>
159+
<slider x="10" step="1" y="10" max="100" width="250" display="landscape-smoothness" height="50" min="0" direction="Horizontal" default="20.0" variable="landscape-smoothness"></slider>
160+
<slider x="10" step="1" y="65" max="100" width="250" display="population-size" height="50" min="1" direction="Horizontal" default="50.0" variable="population-size"></slider>
161+
<slider x="10" step="0.01" y="120" max="1.0" width="250" display="particle-inertia" height="50" min="0" direction="Horizontal" default="0.98" variable="particle-inertia"></slider>
162+
<slider x="10" step="1" y="175" max="20" width="250" display="particle-speed-limit" height="50" min="1" direction="Horizontal" default="10.0" variable="particle-speed-limit"></slider>
163+
<slider x="10" step="0.1" y="230" max="2" width="250" display="attraction-to-personal-best" height="50" min="0" direction="Horizontal" default="2.0" variable="attraction-to-personal-best"></slider>
164+
<slider x="10" step="0.1" y="285" max="2" width="250" display="attraction-to-global-best" height="50" min="0" direction="Horizontal" default="1.0" variable="attraction-to-global-best"></slider>
165+
<monitor x="80" precision="4" y="345" height="60" fontSize="11" width="112" display="best-value-found">global-best-val</monitor>
166+
<note x="65" y="410" backgroundDark="0" fontSize="14" width="165" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Visualization Options</note>
167+
<chooser x="10" y="430" height="60" variable="highlight-mode" current="0" width="250" display="highlight-mode">
173168
<choice type="string" value="None"></choice>
174169
<choice type="string" value="Best found"></choice>
175170
<choice type="string" value="True best"></choice>
176171
</chooser>
177-
<monitor x="65" precision="4" y="305" height="45" fontSize="11" display="best-value-found" width="112" sizeVersion="0">global-best-val</monitor>
178-
<slider x="10" step="1" y="10" max="100" display="landscape-smoothness" height="33" min="0" direction="Horizontal" default="20.0" variable="landscape-smoothness" width="215" sizeVersion="0"></slider>
179-
<note x="50" y="370" height="18" backgroundDark="0" fontSize="14" width="165" markdown="false" textColorLight="-16777216" backgroundLight="0">Visualization Options</note>
172+
<chooser x="265" y="430" height="60" variable="trails-mode" current="0" width="250" display="trails-mode">
173+
<choice type="string" value="None"></choice>
174+
<choice type="string" value="Tails"></choice>
175+
<choice type="string" value="Traces"></choice>
176+
</chooser>
177+
<button x="270" y="155" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="80" display="step">go</button>
178+
<button x="270" y="115" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="80">setup</button>
179+
<button x="270" y="195" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="80">go</button>
180180
</widgets>
181181
<info><![CDATA[## WHAT IS IT?
182182

0 commit comments

Comments
 (0)