Skip to content

Commit dfb5c16

Browse files
committed
fixing two failing tests with non-integer patch sizes
1 parent 0aa17db commit dfb5c16

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

Curricular Models/MaterialSim/MaterialSim Grain Growth.nlogox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ end
256256
; Copyright 2005 Uri Wilensky.
257257
; See Info tab for full copyright and license.]]></code>
258258
<widgets>
259-
<view x="345" wrappingAllowedX="false" y="5" frameRate="60.0" minPycor="-24" height="464" showTickCounter="true" patchSize="9.4" fontSize="10" wrappingAllowedY="false" width="464" tickCounterLabel="ticks" maxPycor="24" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
259+
<view x="345" wrappingAllowedX="false" y="5" frameRate="60.0" minPycor="-24" height="445" showTickCounter="true" patchSize="9.0" fontSize="9" wrappingAllowedY="false" width="445" tickCounterLabel="ticks" maxPycor="24" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
260260
<note x="30" y="570" backgroundDark="0" fontSize="11" width="139" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Run model</note>
261261
<note x="30" y="544" backgroundDark="0" fontSize="11" width="295" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">_____________________________________________</note>
262262
<note x="5" y="75" backgroundDark="0" fontSize="30" width="25" markdown="false" height="36" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">1</note>

Sample Models/Biology/Evolution/Echo.nlogox

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,8 @@ end
226226
; Copyright 2005 Uri Wilensky.
227227
; See Info tab for full copyright and license.]]></code>
228228
<widgets>
229-
<view x="275" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="-5" height="444" showTickCounter="true" patchSize="44.1" fontSize="10" wrappingAllowedY="true" width="444" tickCounterLabel="ticks" maxPycor="5" updateMode="1" maxPxcor="5" minPxcor="-5"></view>
230-
<slider x="12" step="25" y="23" max="1000" width="250" display="init-num-creatures" height="50" min="25" direction="Horizontal" default="400.0" variable="init-num-creatures"></slider>
231-
<switch x="43" y="135" height="37" on="false" variable="selective-mating?" width="185" display="selective-mating?"></switch>
232-
<slider x="8" step="0.1" y="335" max="10" width="250" display="mutation-rate" height="50" min="0" direction="Horizontal" default="0.0" variable="mutation-rate" units="%"></slider>
233-
<slider x="8" step="0.1" y="284" max="5" width="250" display="replenish-speed" height="50" min="0" direction="Horizontal" default="1.0" variable="replenish-speed"></slider>
234-
<slider x="8" step="0.1" y="230" max="10" width="250" display="replicate-chance" height="50" min="0" direction="Horizontal" default="0.0" variable="replicate-chance" units="%"></slider>
235-
<slider x="10" step="1" y="175" max="6" width="250" display="mating-selectivity" height="50" min="-6" direction="Horizontal" default="0.0" variable="mating-selectivity"></slider>
236-
<button x="35" y="85" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="100">setup</button>
237-
<button x="140" y="85" height="40" disableUntilTicks="true" forever="true" kind="Observer" width="95">go</button>
238-
<plot x="730" autoPlotX="true" yMax="1.0" autoPlotY="true" y="7" xMin="0.0" height="180" legend="true" xMax="50.0" yMin="0.0" width="605" xAxis="ticks" display="Populations">
229+
<view x="275" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="-5" height="488" showTickCounter="true" patchSize="44.0" fontSize="10" wrappingAllowedY="true" width="488" tickCounterLabel="ticks" maxPycor="5" updateMode="1" maxPxcor="5" minPxcor="-5"></view>
230+
<plot x="775" autoPlotX="true" yMax="1.0" autoPlotY="true" y="5" xMin="0.0" height="180" legend="true" xMax="50.0" yMin="0.0" width="610" xAxis="ticks" display="Populations">
239231
<setup></setup>
240232
<update><![CDATA[set-current-plot-pen "largest species"
241233
let biggest-mating modes [mating] of turtles
@@ -262,7 +254,7 @@ ifelse (length biggest-mating > 0)
262254
<update></update>
263255
</pen>
264256
</plot>
265-
<plot x="735" autoPlotX="true" yMax="1.0" autoPlotY="true" y="365" xMin="0.0" height="195" legend="true" xMax="50.0" yMin="0.0" width="600" xAxis="ticks" display="Speciation">
257+
<plot x="775" autoPlotX="true" yMax="1.0" autoPlotY="true" y="360" xMin="0.0" height="195" legend="true" xMax="50.0" yMin="0.0" width="610" xAxis="ticks" display="Speciation">
266258
<setup></setup>
267259
<update></update>
268260
<pen interval="1.0" mode="0" display="species" color="-2674135" legend="true">
@@ -278,23 +270,23 @@ ifelse (length biggest-mating > 0)
278270
<update>plot length remove-duplicates [defense] of turtles</update>
279271
</pen>
280272
</plot>
281-
<plot x="935" autoPlotX="true" yMax="1.0" autoPlotY="true" y="195" xMin="0.0" height="165" legend="false" xMax="39.0" yMin="0.0" width="200" display="Defense Tags">
273+
<plot x="775" autoPlotX="true" yMax="1.0" autoPlotY="true" y="190" xMin="0.0" height="165" legend="false" xMax="39.0" yMin="0.0" width="200" display="Offense Tags">
282274
<setup>set-plot-x-range 0 length all-tags</setup>
283275
<update></update>
284276
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
285277
<setup></setup>
286-
<update>histogram [position defense all-tags] of turtles</update>
278+
<update>histogram [position offense all-tags] of turtles</update>
287279
</pen>
288280
</plot>
289-
<plot x="733" autoPlotX="true" yMax="1.0" autoPlotY="true" y="195" xMin="0.0" height="165" legend="false" xMax="39.0" yMin="0.0" width="200" display="Offense Tags">
281+
<plot x="980" autoPlotX="true" yMax="1.0" autoPlotY="true" y="190" xMin="0.0" height="165" legend="false" xMax="39.0" yMin="0.0" width="200" display="Defense Tags">
290282
<setup>set-plot-x-range 0 length all-tags</setup>
291283
<update></update>
292284
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
293285
<setup></setup>
294-
<update>histogram [position offense all-tags] of turtles</update>
286+
<update>histogram [position defense all-tags] of turtles</update>
295287
</pen>
296288
</plot>
297-
<plot x="1137" autoPlotX="true" yMax="1.0" autoPlotY="true" y="195" xMin="0.0" height="165" legend="false" xMax="100.0" yMin="0.0" width="200" display="Species Counts">
289+
<plot x="1185" autoPlotX="true" yMax="1.0" autoPlotY="true" y="190" xMin="0.0" height="165" legend="false" xMax="100.0" yMin="0.0" width="200" display="Species Counts">
298290
<setup>set-plot-x-range 0 length all-tags</setup>
299291
<update></update>
300292
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
@@ -308,7 +300,15 @@ foreach all-tags [ the-tag ->
308300
]]]></update>
309301
</pen>
310302
</plot>
311-
<monitor x="1230" precision="17" y="125" height="60" fontSize="11" width="100" display="total pop.">count turtles</monitor>
303+
<slider x="10" step="25" y="10" max="1000" width="250" display="init-num-creatures" height="50" min="25" direction="Horizontal" default="400.0" variable="init-num-creatures"></slider>
304+
<button x="35" y="65" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="100">setup</button>
305+
<button x="140" y="65" height="40" disableUntilTicks="true" forever="true" kind="Observer" width="95">go</button>
306+
<switch x="45" y="110" height="40" on="false" variable="selective-mating?" width="185" display="selective-mating?"></switch>
307+
<slider x="10" step="1" y="155" max="6" width="250" display="mating-selectivity" height="50" min="-6" direction="Horizontal" default="0.0" variable="mating-selectivity"></slider>
308+
<slider x="10" step="0.1" y="210" max="10" width="250" display="replicate-chance" height="50" min="0" direction="Horizontal" default="0.0" variable="replicate-chance" units="%"></slider>
309+
<slider x="10" step="0.1" y="265" max="5" width="250" display="replenish-speed" height="50" min="0" direction="Horizontal" default="1.0" variable="replenish-speed"></slider>
310+
<slider x="10" step="0.1" y="320" max="10" width="250" display="mutation-rate" height="50" min="0" direction="Horizontal" default="0.0" variable="mutation-rate" units="%"></slider>
311+
<monitor x="1285" precision="17" y="120" height="60" fontSize="11" width="100" display="total pop.">count turtles</monitor>
312312
</widgets>
313313
<info><![CDATA[## WHAT IS IT?
314314

0 commit comments

Comments
 (0)