Skip to content

Commit 5f096dd

Browse files
committed
Merge in changes from ProbLab resizing
Resolves #424
1 parent 18cc06c commit 5f096dd

16 files changed

Lines changed: 354 additions & 354 deletions

Sample Models/Mathematics/Probability/ProbLab/Dice Stalagmite.nlogox

Lines changed: 7 additions & 7 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-beta2" snapToGrid="true">
33
<code><![CDATA[globals [
44
generators ;; agentset of two patches where the dice first appear
55
top-row ;; agentset of just the top row of patches
@@ -174,10 +174,8 @@ end
174174
; Copyright 2005 Uri Wilensky.
175175
; See Info tab for full copyright and license.]]></code>
176176
<widgets>
177-
<view x="177" wrappingAllowedX="true" y="39" frameRate="30.0" minPycor="0" height="524" showTickCounter="true" patchSize="10.0" fontSize="10" wrappingAllowedY="true" width="374" tickCounterLabel="ticks" maxPycor="51" updateMode="1" maxPxcor="26" minPxcor="-10"></view>
178-
<button x="11" y="10" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="Setup" width="79" sizeVersion="0">setup</button>
179-
<button x="92" y="10" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="Go" width="79" sizeVersion="0">go</button>
180-
<plot x="11" autoPlotX="true" yMax="51.0" autoPlotY="true" yAxis="Count" y="48" xMin="1.0" height="542" legend="false" xMax="7.0" yMin="0.0" xAxis="Die Value" display="Single Dice" width="160" sizeVersion="0">
177+
<view x="213" wrappingAllowedX="true" y="45" frameRate="30.0" minPycor="0" height="524" showTickCounter="true" patchSize="10.0" fontSize="10" wrappingAllowedY="true" width="374" tickCounterLabel="ticks" maxPycor="51" updateMode="1" maxPxcor="26" minPxcor="-10"></view>
178+
<plot x="5" autoPlotX="true" yMax="51.0" autoPlotY="true" yAxis="Count" y="45" xMin="1.0" height="526" legend="false" xMax="7.0" yMin="0.0" width="200" xAxis="Die Value" display="Single Dice">
181179
<setup></setup>
182180
<update></update>
183181
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
@@ -188,7 +186,7 @@ let maxrange length filter [ outcome -> outcome = item 0 maxbar ] single-outcome
188186
set-plot-y-range 0 max list 51 maxrange]]></update>
189187
</pen>
190188
</plot>
191-
<plot x="562" autoPlotX="true" yMax="51.0" autoPlotY="true" yAxis="Count" y="49" xMin="2.0" height="544" legend="false" xMax="13.0" yMin="0.0" xAxis="Dice Total" display="Pair Sums" width="221" sizeVersion="0">
189+
<plot x="595" autoPlotX="true" yMax="51.0" autoPlotY="true" yAxis="Count" y="45" xMin="2.0" height="526" legend="false" xMax="13.0" yMin="0.0" width="221" xAxis="Dice Total" display="Pair Sums">
192190
<setup></setup>
193191
<update></update>
194192
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
@@ -199,7 +197,9 @@ let maxrange length filter [ outcome -> outcome = item 0 maxbar ] pair-outcomes
199197
set-plot-y-range 0 max list 51 maxrange]]></update>
200198
</pen>
201199
</plot>
202-
<switch x="374" y="4" height="33" on="false" variable="stop-at-top?" display="stop-at-top?" width="124" sizeVersion="0"></switch>
200+
<button x="4" y="4" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="100" display="Setup">setup</button>
201+
<switch x="338" y="4" height="40" on="false" variable="stop-at-top?" width="124" display="stop-at-top?"></switch>
202+
<button x="108" y="4" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="95" display="Go">go</button>
203203
</widgets>
204204
<info><![CDATA[## WHAT IS IT?
205205

Sample Models/Mathematics/Probability/ProbLab/Dice.nlogox

Lines changed: 25 additions & 25 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-beta2" snapToGrid="true">
33
<code><![CDATA[globals [
44
instructions ; the user instructions that appear in the monitor on the top left
55
@@ -173,19 +173,28 @@ end
173173
; Copyright 2004 Uri Wilensky.
174174
; See Info tab for full copyright and license.]]></code>
175175
<widgets>
176-
<view x="430" wrappingAllowedX="false" y="65" frameRate="30.0" minPycor="-18" height="411" showTickCounter="true" patchSize="11.0" fontSize="12" wrappingAllowedY="false" width="367" tickCounterLabel="ticks" maxPycor="18" updateMode="1" maxPxcor="16" minPxcor="-16"></view>
177-
<monitor x="82" precision="3" y="196" height="45" fontSize="11" display="+ # Rolls" width="82" sizeVersion="0">count-steps</monitor>
178-
<monitor x="230" precision="3" y="195" height="45" fontSize="11" display="Combinations" width="92" sizeVersion="0">count-combi-successes</monitor>
179-
<switch x="275" y="75" height="33" on="false" variable="single-success?" display="single-success?" width="145" sizeVersion="0"></switch>
180-
<monitor x="9" precision="0" y="196" height="45" fontSize="11" display="#Samples" width="70" sizeVersion="0">samples-counter</monitor>
181-
<monitor x="325" precision="3" y="195" height="45" fontSize="11" display="Permutations" width="93" sizeVersion="0">count-permis-successes</monitor>
182-
<note x="232" y="177" height="18" textColorLight="-16777216" fontSize="11" width="175" markdown="false">Successes in this sample:</note>
183-
<button x="7" y="61" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="Setup" width="110" sizeVersion="0">setup</button>
184-
<button x="7" y="96" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="Pick Values" width="110" sizeVersion="0">pick-values</button>
185-
<button x="7" y="131" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="Roll Dice" width="110" sizeVersion="0">search</button>
186-
<monitor x="7" precision="0" y="10" height="45" fontSize="11" display="Instructions" width="795" sizeVersion="0">instructions</monitor>
187-
<monitor x="10" precision="2" y="440" height="45" fontSize="11" display="Mean-Combination" width="115" sizeVersion="0">mean #combi-successes-per-sample-list</monitor>
188-
<plot x="9" autoPlotX="true" yMax="50.0" autoPlotY="true" yAxis="count" y="246" xMin="0.0" height="185" legend="true" xMax="16.0" yMin="0.0" xAxis="successes per sample" display="Successes-per-Sample Distributions" width="410" sizeVersion="0">
176+
<view x="500" wrappingAllowedX="false" y="190" frameRate="30.0" minPycor="-18" height="374" showTickCounter="true" patchSize="10.0" fontSize="12" wrappingAllowedY="false" width="334" tickCounterLabel="ticks" maxPycor="18" updateMode="1" maxPxcor="16" minPxcor="-16"></view>
177+
<button x="5" y="110" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="110" display="Pick Values">pick-values</button>
178+
<button x="5" y="150" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="110" display="Roll Dice">search</button>
179+
<slider x="120" step="10" y="130" max="10000" width="200" display="total-samples" height="55" min="0" direction="Horizontal" default="5000.0" variable="total-samples"></slider>
180+
<slider x="120" step="10" y="70" max="1000" width="200" display="sample-size" height="55" min="10" direction="Horizontal" default="10.0" variable="sample-size"></slider>
181+
<chooser x="325" y="130" height="60" variable="analysis-type" current="0" width="165" display="analysis-type">
182+
<choice type="string" value="Permutations"></choice>
183+
<choice type="string" value="Combination"></choice>
184+
<choice type="string" value="Both"></choice>
185+
</chooser>
186+
<switch x="325" y="70" height="55" on="true" variable="single-success?" width="165" display="single-success?"></switch>
187+
<monitor x="7" precision="0" y="10" height="60" fontSize="11" width="830" display="Instructions">instructions</monitor>
188+
<monitor x="500" precision="0" y="70" height="60" fontSize="11" width="100" display="#Samples">samples-counter</monitor>
189+
<monitor x="500" precision="3" y="130" height="60" fontSize="11" width="100" display="+ # Rolls">count-steps</monitor>
190+
<monitor x="730" precision="3" y="130" height="60" fontSize="11" width="105" display="Permutations">count-permis-successes</monitor>
191+
<button x="5" y="70" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="110" display="Setup">setup</button>
192+
<button x="610" y="360" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="111" display="Hide/Reveal">ask user-dice [ set hidden? (not hidden?) ]</button>
193+
<monitor x="730" precision="3" y="70" height="60" fontSize="11" width="105" display="Combinations">count-combi-successes</monitor>
194+
<monitor x="5" precision="2" y="510" height="60" fontSize="11" width="135" display="Mean-Combination">mean #combi-successes-per-sample-list</monitor>
195+
<monitor x="145" precision="2" y="510" height="60" fontSize="11" width="145" display="Mean-Permutations">mean #permis-successes-per-sample-list</monitor>
196+
<monitor x="295" precision="2" y="510" height="60" fontSize="11" width="195" display="Combinations : Permutations">ratio</monitor>
197+
<plot x="5" autoPlotX="true" yMax="50.0" autoPlotY="true" yAxis="count" y="190" xMin="0.0" height="315" legend="true" xMax="16.0" yMin="0.0" width="485" xAxis="successes per sample" display="Successes-per-Sample Distributions">
189198
<setup></setup>
190199
<update><![CDATA[if ticks > 0 [
191200
ifelse analysis-type = "Both"
@@ -225,17 +234,8 @@ ifelse analysis-type = "Both"
225234
]</update>
226235
</pen>
227236
</plot>
228-
<monitor x="125" precision="2" y="440" height="45" fontSize="11" display="Mean-Permutations" width="122" sizeVersion="0">mean #permis-successes-per-sample-list</monitor>
229-
<monitor x="245" precision="2" y="440" height="45" fontSize="11" display="Combinations : Permutations" width="175" sizeVersion="0">ratio</monitor>
230-
<slider x="125" step="10" y="85" max="1000" display="sample-size" height="33" min="10" direction="Horizontal" default="10.0" variable="sample-size" width="143" sizeVersion="0"></slider>
231-
<slider x="125" step="10" y="120" max="10000" display="total-samples" height="33" min="0" direction="Horizontal" default="5000.0" variable="total-samples" width="143" sizeVersion="0"></slider>
232-
<chooser x="275" y="120" height="45" variable="analysis-type" current="0" display="analysis-type" width="145" sizeVersion="0">
233-
<choice type="string" value="Permutations"></choice>
234-
<choice type="string" value="Combination"></choice>
235-
<choice type="string" value="Both"></choice>
236-
</chooser>
237-
<switch x="325" y="395" height="33" on="true" variable="bars?" display="bars?" width="91" sizeVersion="0"></switch>
238-
<button x="565" y="275" height="34" disableUntilTicks="true" forever="false" kind="Observer" display="Hide/Reveal" width="111" sizeVersion="0">ask user-dice [ set hidden? (not hidden?) ]</button>
237+
<switch x="400" y="465" height="40" on="true" variable="bars?" width="90" display="bars?"></switch>
238+
<note x="635" y="105" backgroundDark="0" fontSize="14" width="110" markdown="false" height="45" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Successes in the Sample:</note>
239239
</widgets>
240240
<info><![CDATA[## WHAT IS IT?
241241

Sample Models/Mathematics/Probability/ProbLab/Prob Graphs Basic.nlogox

Lines changed: 32 additions & 32 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-beta2" snapToGrid="true">
33
<code><![CDATA[globals [
44
event
55
total-attempts
@@ -100,56 +100,56 @@ end
100100
; Copyright 2004 Uri Wilensky.
101101
; See Info tab for full copyright and license.]]></code>
102102
<widgets>
103-
<view x="243" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="0" height="11" showTickCounter="true" patchSize="7.0" fontSize="10" wrappingAllowedY="true" width="249" tickCounterLabel="ticks" maxPycor="0" updateMode="1" maxPxcor="17" minPxcor="-17"></view>
104-
<button x="102" y="35" height="46" disableUntilTicks="true" forever="true" kind="Observer" display="Go" width="79" sizeVersion="0">go</button>
105-
<button x="7" y="35" height="46" disableUntilTicks="false" forever="false" kind="Observer" display="Setup" width="79" sizeVersion="0">setup</button>
106-
<plot x="204" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Successes per Attempts" y="35" xMin="0.0" height="183" legend="false" xMax="100.0" yMin="0.0" xAxis="Attempts" display="m/n convergence to limiting value" width="342" sizeVersion="0">
103+
<view x="285" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="0" height="11" showTickCounter="true" patchSize="7.0" fontSize="10" wrappingAllowedY="true" width="249" tickCounterLabel="ticks" maxPycor="0" updateMode="1" maxPxcor="17" minPxcor="-17"></view>
104+
<note x="10" y="80" backgroundDark="0" fontSize="11" width="139" markdown="false" height="104" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">The program will
105+
record and plot the
106+
random occurrence
107+
of the event "1"
108+
among other integers
109+
in the sample space
110+
of size...</note>
111+
<monitor x="140" precision="3" y="100" height="60" fontSize="11" width="100">event</monitor>
112+
<button x="5" y="7" height="46" disableUntilTicks="false" forever="false" kind="Observer" width="100" display="Setup">setup</button>
113+
<slider x="5" step="1" y="190" max="10" width="235" display="sample-space-size" height="55" min="1" direction="Horizontal" default="2.0" variable="sample-space-size"></slider>
114+
<monitor x="479" precision="3" y="661" height="60" fontSize="11" width="105" display="max">max successes-per-sample-list</monitor>
115+
<monitor x="364" precision="3" y="661" height="60" fontSize="11" width="110" display="mean">mean successes-per-sample-list</monitor>
116+
<plot x="244" autoPlotX="true" yMax="25.0" autoPlotY="true" yAxis="Frequency" y="456" xMin="0.0" height="200" legend="false" xMax="10.0" yMin="0.0" width="342" xAxis="Successes" display="Successes-per-Sample Distribution">
107117
<setup></setup>
108118
<update></update>
109-
<pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
119+
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
110120
<setup></setup>
111121
<update></update>
112122
</pen>
113123
</plot>
114-
<plot x="204" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Frequency" y="219" xMin="1.0" height="160" legend="false" xMax="50.0" yMin="0.0" xAxis="Run Length" display="Attempts-until-Success Distribution" width="342" sizeVersion="0">
124+
<monitor x="589" precision="3" y="326" height="60" fontSize="11" width="149" display="mean">mean counter-list</monitor>
125+
<monitor x="589" precision="3" y="266" height="60" fontSize="11" width="149">counter</monitor>
126+
<monitor x="589" precision="3" y="456" height="60" fontSize="11" width="147">successes-this-sample</monitor>
127+
<plot x="244" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Frequency" y="266" xMin="1.0" height="185" legend="false" xMax="50.0" yMin="0.0" width="342" xAxis="Run Length" display="Attempts-until-Success Distribution">
115128
<setup></setup>
116129
<update></update>
117130
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
118131
<setup></setup>
119132
<update></update>
120133
</pen>
121134
</plot>
122-
<slider x="9" step="1" y="203" max="10" display="sample-space-size" height="33" min="1" direction="Horizontal" default="2.0" variable="sample-space-size" width="175" sizeVersion="0"></slider>
123-
<plot x="204" autoPlotX="true" yMax="25.0" autoPlotY="true" yAxis="Frequency" y="378" xMin="0.0" height="161" legend="false" xMax="10.0" yMin="0.0" xAxis="Successes" display="Successes-per-Sample Distribution" width="342" sizeVersion="0">
135+
<plot x="244" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Successes per Att" y="21" xMin="0.0" height="240" legend="false" xMax="100.0" yMin="0.0" width="342" xAxis="Attempts" display="m/n convergence to limiting value">
124136
<setup></setup>
125137
<update></update>
126-
<pen interval="1.0" mode="1" display="default" color="-16777216" legend="true">
138+
<pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
127139
<setup></setup>
128140
<update></update>
129141
</pen>
130142
</plot>
131-
<slider x="12" step="5" y="461" max="100" display="sample-size" height="33" min="0" direction="Horizontal" default="10.0" variable="sample-size" width="172" sizeVersion="0"></slider>
132-
<slider x="10" step="10" y="375" max="1000" display="how-many-samples?" height="33" min="0" direction="Horizontal" default="1000.0" variable="how-many-samples?" width="174" sizeVersion="0"></slider>
133-
<monitor x="550" precision="3" y="112" height="45" fontSize="11" width="99" sizeVersion="0">total-attempts</monitor>
134-
<monitor x="705" precision="3" y="70" height="45" fontSize="11" display="rate" width="57" sizeVersion="0">total-successes / total-attempts</monitor>
135-
<monitor x="550" precision="0" y="35" height="45" fontSize="11" display="total-successes" width="99" sizeVersion="0">total-successes</monitor>
136-
<note x="551" y="89" height="18" textColorLight="-16777216" fontSize="11" width="143" markdown="false">________________ =</note>
137-
<monitor x="549" precision="3" y="379" height="45" fontSize="11" width="147" sizeVersion="0">successes-this-sample</monitor>
138-
<monitor x="12" precision="3" y="495" height="45" fontSize="11" width="172" sizeVersion="0">attempts-this-sample</monitor>
139-
<monitor x="549" precision="3" y="219" height="45" fontSize="11" width="57" sizeVersion="0">counter</monitor>
140-
<monitor x="11" precision="3" y="409" height="45" fontSize="11" width="173" sizeVersion="0">samples-counter</monitor>
141-
<monitor x="445" precision="3" y="540" height="45" fontSize="11" display="max" width="101" sizeVersion="0">max successes-per-sample-list</monitor>
142-
<monitor x="204" precision="3" y="540" height="45" fontSize="11" display="min" width="104" sizeVersion="0">min successes-per-sample-list</monitor>
143-
<monitor x="325" precision="3" y="540" height="45" fontSize="11" display="mean" width="104" sizeVersion="0">mean successes-per-sample-list</monitor>
144-
<note x="9" y="87" height="104" textColorLight="-16777216" fontSize="11" width="139" markdown="false">The program will
145-
record and plot the
146-
random occurrence
147-
of the event "1"
148-
among other integers
149-
in the sample space
150-
of size...</note>
151-
<monitor x="549" precision="3" y="270" height="45" fontSize="11" display="mean" width="57" sizeVersion="0">mean counter-list</monitor>
152-
<monitor x="142" precision="3" y="93" height="45" fontSize="11" width="50" sizeVersion="0">event</monitor>
143+
<monitor x="245" precision="3" y="660" height="60" fontSize="11" width="115" display="min">min successes-per-sample-list</monitor>
144+
<monitor x="5" precision="3" y="635" height="60" fontSize="11" width="235">attempts-this-sample</monitor>
145+
<slider x="5" step="5" y="575" max="100" width="235" display="sample-size" height="55" min="0" direction="Horizontal" default="10.0" variable="sample-size"></slider>
146+
<slider x="5" step="10" y="455" max="1000" width="235" display="how-many-samples?" height="55" min="0" direction="Horizontal" default="1000.0" variable="how-many-samples?"></slider>
147+
<monitor x="5" precision="3" y="515" height="60" fontSize="11" width="235">samples-counter</monitor>
148+
<monitor x="590" precision="0" y="20" height="60" fontSize="11" width="149" display="total-successes">total-successes</monitor>
149+
<note x="591" y="84" backgroundDark="0" fontSize="11" width="143" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">________________ =</note>
150+
<monitor x="590" precision="3" y="107" height="60" fontSize="11" width="149">total-attempts</monitor>
151+
<monitor x="745" precision="3" y="60" height="60" fontSize="11" width="100" display="rate">total-successes / total-attempts</monitor>
152+
<button x="109" y="7" height="46" disableUntilTicks="true" forever="true" kind="Observer" width="130" display="Go">go</button>
153153
</widgets>
154154
<info><![CDATA[## WHAT IS IT?
155155

0 commit comments

Comments
 (0)