Skip to content

Commit c40833d

Browse files
committed
A bunch of more changes to models
1 parent f424dd1 commit c40833d

20 files changed

Lines changed: 519 additions & 520 deletions

Sample Models/Biology/Evolution/Bacterial Infection.nlogox

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,48 @@ end
337337
; Copyright 2016 Uri Wilensky.
338338
; See Info tab for full copyright and license.]]></code>
339339
<widgets>
340-
<view x="415" wrappingAllowedX="true" y="100" frameRate="30.0" minPycor="-10" height="277" showTickCounter="true" patchSize="13.0" fontSize="10" wrappingAllowedY="true" width="641" tickCounterLabel="minutes" maxPycor="10" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
341-
<button x="40" y="10" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="75" sizeVersion="0">setup</button>
342-
<button x="120" y="10" height="41" disableUntilTicks="true" forever="true" kind="Observer" display="go/pause" width="90" sizeVersion="0">go</button>
343-
<plot x="15" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="150" xMin="3.0" height="160" legend="false" xMax="7.0" yMin="0.0" xAxis="# pores" display="Patient A" width="195" sizeVersion="0">
340+
<view x="480" wrappingAllowedX="true" y="130" frameRate="30.0" minPycor="-10" height="277" showTickCounter="true" patchSize="13.0" fontSize="10" wrappingAllowedY="true" width="641" tickCounterLabel="minutes" maxPycor="10" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
341+
<monitor x="260" precision="17" y="132" height="60" fontSize="11" width="112" display="doses given to B">doses-given-to-b</monitor>
342+
<monitor x="290" precision="17" y="7" height="60" fontSize="11" width="100" display="# of hrs">#-hours</monitor>
343+
<monitor x="185" precision="17" y="7" height="60" fontSize="11" width="100" display="# of days">#-days</monitor>
344+
<slider x="185" step="0.5" y="75" max="4" width="205" display="reproduce-every" height="50" min="0.5" direction="Horizontal" default="2.0" variable="reproduce-every" units="hrs"></slider>
345+
<button x="85" y="7" height="45" disableUntilTicks="true" forever="true" kind="Observer" width="90" display="go/pause">go</button>
346+
<button x="5" y="7" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="75">setup</button>
347+
<switch x="45" y="80" height="37" on="true" variable="reproduce?" width="135" display="reproduce?"></switch>
348+
<monitor x="55" precision="17" y="135" height="60" fontSize="11" width="112" display="doses given to A">doses-given-to-a</monitor>
349+
<chooser x="980" y="7" height="60" variable="auto-dose-B?" current="4" width="155" display="auto-dose-B?">
350+
<choice type="string" value="no, skip all dosing"></choice>
351+
<choice type="string" value="yes, skip no doses"></choice>
352+
<choice type="string" value="yes, but skip dose 2"></choice>
353+
<choice type="string" value="yes, but skip dose 3"></choice>
354+
<choice type="string" value="yes, but skip dose 4"></choice>
355+
</chooser>
356+
<note x="555" y="525" backgroundDark="0" fontSize="12" width="195" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Initial Infection for Patient A</note>
357+
<slider x="480" step="1" y="469" max="16" width="150" display="init#-4pores-a" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-4pores-a"></slider>
358+
<slider x="635" step="1" y="416" max="16" width="150" display="init#-5pores-a" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-5pores-a"></slider>
359+
<slider x="635" step="1" y="469" max="16" width="150" display="init#-6pores-a" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-6pores-a"></slider>
360+
<slider x="480" step="1" y="416" max="16" width="150" display="init#-3pores-a" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-3pores-a"></slider>
361+
<note x="890" y="525" backgroundDark="0" fontSize="12" width="190" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Initial Infection for Patient B</note>
362+
<slider x="820" step="1" y="469" max="16" width="150" display="init#-4pores-b" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-4pores-b"></slider>
363+
<slider x="975" step="1" y="416" max="16" width="150" display="init#-5pores-b" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-5pores-b"></slider>
364+
<slider x="975" step="1" y="469" max="16" width="150" display="init#-6pores-b" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-6pores-b"></slider>
365+
<slider x="820" step="1" y="416" max="16" width="150" display="init#-3pores-b" height="50" min="0" direction="Horizontal" default="4.0" variable="init#-3pores-b"></slider>
366+
<button x="825" y="15" height="45" disableUntilTicks="true" forever="false" kind="Observer" width="145" display="manual dose B">dose-region "B" b-dosage
367+
set doses-given-to-b doses-given-to-b + 1</button>
368+
<slider x="825" step="50" y="70" max="200" width="150" display="b-dosage" height="50" min="50" direction="Horizontal" default="50.0" variable="b-dosage" units="mg"></slider>
369+
<slider x="980" step="4" y="70" max="24" width="150" display="dose-b-every" height="50" min="4" direction="Horizontal" default="4.0" variable="dose-b-every" units="hrs"></slider>
370+
<chooser x="625" y="7" height="60" variable="auto-dose-A?" current="4" width="155" display="auto-dose-A?">
371+
<choice type="string" value="no, skip all dosing"></choice>
372+
<choice type="string" value="yes, skip no doses"></choice>
373+
<choice type="string" value="yes, but skip dose 2"></choice>
374+
<choice type="string" value="yes, but skip dose 3"></choice>
375+
<choice type="string" value="yes, but skip dose 4"></choice>
376+
</chooser>
377+
<slider x="625" step="2" y="70" max="24" width="155" display="dose-a-every" height="50" min="4" direction="Horizontal" default="4.0" variable="dose-a-every" units="hrs"></slider>
378+
<button x="475" y="15" height="45" disableUntilTicks="true" forever="false" kind="Observer" width="140" display="manual dose A">dose-region "A" a-dosage
379+
set doses-given-to-a doses-given-to-a + 1</button>
380+
<slider x="470" step="50" y="70" max="200" width="150" display="a-dosage" height="50" min="50" direction="Horizontal" default="50.0" variable="a-dosage" units="mg"></slider>
381+
<plot x="15" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="200" xMin="3.0" height="180" legend="false" xMax="7.0" yMin="0.0" width="200" xAxis="# pores" display="Patient A">
344382
<setup>make-variation-pens 1 ; 1 means use bar mode</setup>
345383
<update><![CDATA[;; the `histogram` primitive can't make a multi-colored histogram,
346384
;; so instead we plot each bar individually
@@ -353,7 +391,7 @@ if (plot-y-max - floor plot-y-max) != 0 [
353391
set-plot-y-range 0 floor plot-y-max + 1
354392
]]]></update>
355393
</plot>
356-
<plot x="215" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="150" xMin="3.0" height="160" legend="false" xMax="7.0" yMin="0.0" xAxis="# pores" display="Patient B" width="195" sizeVersion="0">
394+
<plot x="220" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="200" xMin="3.0" height="180" legend="false" xMax="7.0" yMin="0.0" width="200" xAxis="# pores" display="Patient B">
357395
<setup>make-variation-pens 1 ; 1 means use bar mode</setup>
358396
<update><![CDATA[;; the `histogram` primitive can't make a multi-colored histogram,
359397
;; so instead we plot each bar individually
@@ -366,56 +404,18 @@ if (plot-y-max - floor plot-y-max) != 0 [
366404
set-plot-y-range 0 floor plot-y-max + 1
367405
]]]></update>
368406
</plot>
369-
<note x="825" y="485" height="18" backgroundDark="0" fontSize="12" width="190" markdown="false" textColorLight="-16777216" backgroundLight="0">Initial Infection for Patient B</note>
370-
<note x="500" y="485" height="18" backgroundDark="0" fontSize="12" width="195" markdown="false" textColorLight="-16777216" backgroundLight="0">Initial Infection for Patient A</note>
371-
<slider x="180" step="0.5" y="60" max="4" display="reproduce-every" height="33" min="0.5" direction="Horizontal" default="2.0" variable="reproduce-every" units="hrs" width="200" sizeVersion="0"></slider>
372-
<button x="415" y="10" height="45" disableUntilTicks="true" forever="false" kind="Observer" display="manual dose A" width="140" sizeVersion="0">dose-region "A" a-dosage
373-
set doses-given-to-a doses-given-to-a + 1</button>
374-
<monitor x="305" precision="17" y="10" height="45" fontSize="11" display="# of hrs" width="70" sizeVersion="0">#-hours</monitor>
375-
<monitor x="235" precision="17" y="10" height="45" fontSize="11" display="# of days" width="65" sizeVersion="0">#-days</monitor>
376-
<plot x="15" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="310" xMin="0.0" height="185" legend="false" xMax="100.0" yMin="0.0" xAxis="time (min.)" display="population in A vs. time" width="195" sizeVersion="0">
407+
<plot x="220" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# indiv." y="390" xMin="0.0" height="195" legend="false" xMax="100.0" yMin="0.0" width="200" xAxis="time (min)." display="population in B vs. time">
377408
<setup>make-variation-pens 0 ; 0 means use line mode</setup>
378409
<update><![CDATA[foreach [ 3 4 5 6 ] [ v ->
379410
set-current-plot-pen (word v)
380-
plotxy ticks item (v - 3) bacteria-counts-region-a
411+
plotxy ticks item (v - 3) bacteria-counts-region-b
381412
]]]></update>
382413
</plot>
383-
<button x="755" y="10" height="45" disableUntilTicks="true" forever="false" kind="Observer" display="manual dose B" width="140" sizeVersion="0">dose-region "B" b-dosage
384-
set doses-given-to-b doses-given-to-b + 1</button>
385-
<slider x="415" step="50" y="60" max="200" display="a-dosage" height="33" min="50" direction="Horizontal" default="50.0" variable="a-dosage" units="mg" width="140" sizeVersion="0"></slider>
386-
<slider x="755" step="50" y="60" max="200" display="b-dosage" height="33" min="50" direction="Horizontal" default="50.0" variable="b-dosage" units="mg" width="140" sizeVersion="0"></slider>
387-
<slider x="560" step="2" y="60" max="24" display="dose-a-every" height="33" min="4" direction="Horizontal" default="4.0" variable="dose-a-every" units="hrs" width="155" sizeVersion="0"></slider>
388-
<slider x="900" step="4" y="60" max="24" display="dose-b-every" height="33" min="4" direction="Horizontal" default="4.0" variable="dose-b-every" units="hrs" width="160" sizeVersion="0"></slider>
389-
<monitor x="55" precision="17" y="100" height="45" fontSize="11" display="doses given to A" width="112" sizeVersion="0">doses-given-to-a</monitor>
390-
<monitor x="255" precision="17" y="100" height="45" fontSize="11" display="doses given to B" width="112" sizeVersion="0">doses-given-to-b</monitor>
391-
<switch x="40" y="60" height="33" on="true" variable="reproduce?" display="reproduce?" width="135" sizeVersion="0"></switch>
392-
<chooser x="560" y="10" height="45" variable="auto-dose-A?" current="0" display="auto-dose-A?" width="155" sizeVersion="0">
393-
<choice type="string" value="no, skip all dosing"></choice>
394-
<choice type="string" value="yes, skip no doses"></choice>
395-
<choice type="string" value="yes, but skip dose 2"></choice>
396-
<choice type="string" value="yes, but skip dose 3"></choice>
397-
<choice type="string" value="yes, but skip dose 4"></choice>
398-
</chooser>
399-
<chooser x="900" y="10" height="45" variable="auto-dose-B?" current="0" display="auto-dose-B?" width="160" sizeVersion="0">
400-
<choice type="string" value="no, skip all dosing"></choice>
401-
<choice type="string" value="yes, skip no doses"></choice>
402-
<choice type="string" value="yes, but skip dose 2"></choice>
403-
<choice type="string" value="yes, but skip dose 3"></choice>
404-
<choice type="string" value="yes, but skip dose 4"></choice>
405-
</chooser>
406-
<slider x="425" step="1" y="410" max="16" display="init#-3pores-a" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-3pores-a" width="150" sizeVersion="0"></slider>
407-
<slider x="425" step="1" y="445" max="16" display="init#-4pores-a" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-4pores-a" width="150" sizeVersion="0"></slider>
408-
<slider x="580" step="1" y="410" max="16" display="init#-5pores-a" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-5pores-a" width="150" sizeVersion="0"></slider>
409-
<slider x="580" step="1" y="445" max="16" display="init#-6pores-a" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-6pores-a" width="150" sizeVersion="0"></slider>
410-
<slider x="755" step="1" y="410" max="16" display="init#-3pores-b" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-3pores-b" width="150" sizeVersion="0"></slider>
411-
<slider x="755" step="1" y="445" max="16" display="init#-4pores-b" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-4pores-b" width="150" sizeVersion="0"></slider>
412-
<slider x="910" step="1" y="410" max="16" display="init#-5pores-b" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-5pores-b" width="150" sizeVersion="0"></slider>
413-
<slider x="910" step="1" y="445" max="16" display="init#-6pores-b" height="33" min="0" direction="Horizontal" default="4.0" variable="init#-6pores-b" width="150" sizeVersion="0"></slider>
414-
<plot x="215" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# indiv." y="310" xMin="0.0" height="185" legend="false" xMax="100.0" yMin="0.0" xAxis="time (min)." display="population in B vs. time" width="195" sizeVersion="0">
414+
<plot x="15" autoPlotX="true" yMax="16.0" autoPlotY="true" yAxis="# of indiv." y="390" xMin="0.0" height="195" legend="false" xMax="100.0" yMin="0.0" width="200" xAxis="time (min.)" display="population in A vs. time">
415415
<setup>make-variation-pens 0 ; 0 means use line mode</setup>
416416
<update><![CDATA[foreach [ 3 4 5 6 ] [ v ->
417417
set-current-plot-pen (word v)
418-
plotxy ticks item (v - 3) bacteria-counts-region-b
418+
plotxy ticks item (v - 3) bacteria-counts-region-a
419419
]]]></update>
420420
</plot>
421421
</widgets>

0 commit comments

Comments
 (0)