Skip to content

Commit

Permalink
build based on 8bbebe6
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jun 8, 2024
1 parent e066c6a commit df7a051
Show file tree
Hide file tree
Showing 82 changed files with 183 additions and 181 deletions.
2 changes: 1 addition & 1 deletion previews/PR1034/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-12T23:50:04","documenter_version":"1.4.1"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-08T14:49:33","documenter_version":"1.4.1"}}
Binary file removed previews/PR1034/api/301e464a.png
Binary file not shown.
Binary file added previews/PR1034/api/4fa49633.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 33 additions & 33 deletions previews/PR1034/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR1034/comparison/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR1034/devdocs/index.html

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions previews/PR1034/examples/agents_visualizations/index.html

Large diffs are not rendered by default.

Binary file modified previews/PR1034/examples/celllistmap.mp4
Binary file not shown.
2 changes: 1 addition & 1 deletion previews/PR1034/examples/celllistmap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@
agent_color=p -> p.k
)</code></pre><video width="auto" controls autoplay loop>
<source src="../celllistmap.mp4" type="video/mp4">
</video></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../measurements/">« Measurements.jl</a><a class="docs-footer-nextpage" href="../../performance_tips/">Performance Tips »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.1 on <span class="colophon-date" title="Sunday 12 May 2024 23:50">Sunday 12 May 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
</video></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../measurements/">« Measurements.jl</a><a class="docs-footer-nextpage" href="../../performance_tips/">Performance Tips »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.1 on <span class="colophon-date" title="Saturday 8 June 2024 14:49">Saturday 8 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Binary file modified previews/PR1034/examples/covid_evolution.mp4
Binary file not shown.
Binary file modified previews/PR1034/examples/daisyworld.mp4
Binary file not shown.
Binary file removed previews/PR1034/examples/diffeq/19f07096.png
Binary file not shown.
Binary file added previews/PR1034/examples/diffeq/1d278aec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed previews/PR1034/examples/diffeq/4c6eb0b4.png
Binary file not shown.
Binary file removed previews/PR1034/examples/diffeq/5486f47a.png
Binary file not shown.
Binary file added previews/PR1034/examples/diffeq/6f69a20c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added previews/PR1034/examples/diffeq/a640716e.png
Binary file removed previews/PR1034/examples/diffeq/e4390ef0.png
Diff not rendered.
Binary file added previews/PR1034/examples/diffeq/f32e6c3c.png
10 changes: 5 additions & 5 deletions previews/PR1034/examples/diffeq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
title = &quot;Fishery Inventory&quot;,
)
lines!(ax, results.stock, linewidth = 2, color = :blue)
f</code></pre><img src="5486f47a.png" alt="Example block output"/><h3 id="Add-in-some-bureaucracy"><a class="docs-heading-anchor" href="#Add-in-some-bureaucracy">Add in some bureaucracy</a><a id="Add-in-some-bureaucracy-1"></a><a class="docs-heading-anchor-permalink" href="#Add-in-some-bureaucracy" title="Permalink"></a></h3><p>OK, so let&#39;s add in some annoyances for the fishers. Of course, they wish to go out and catch regularly, but regulators only want to do their job once a year! Since it&#39;s the regulators who will monitor the total stock condition and advise fishers as to whether or not they can continue fishing, a systematic blind spot is inadvertently introduced into the system. Yearly catch and regulation occur on one day a year, whilst the stock will of course grow on a daily basis.</p><p>To achieve this, we extend the model like so:</p><pre><code class="language-julia hljs">function agent_step!(agent, model)
f</code></pre><img src="a640716e.png" alt="Example block output"/><h3 id="Add-in-some-bureaucracy"><a class="docs-heading-anchor" href="#Add-in-some-bureaucracy">Add in some bureaucracy</a><a id="Add-in-some-bureaucracy-1"></a><a class="docs-heading-anchor-permalink" href="#Add-in-some-bureaucracy" title="Permalink"></a></h3><p>OK, so let&#39;s add in some annoyances for the fishers. Of course, they wish to go out and catch regularly, but regulators only want to do their job once a year! Since it&#39;s the regulators who will monitor the total stock condition and advise fishers as to whether or not they can continue fishing, a systematic blind spot is inadvertently introduced into the system. Yearly catch and regulation occur on one day a year, whilst the stock will of course grow on a daily basis.</p><p>To achieve this, we extend the model like so:</p><pre><code class="language-julia hljs">function agent_step!(agent, model)
if model.tick % 365 == 0
agent.yearly_catch = rand(abmrng(model), Poisson(agent.competence))
end
Expand Down Expand Up @@ -114,7 +114,7 @@
title = &quot;Fishery Inventory&quot;,
)
lines!(ax, results.stock, linewidth = 2, color = :blue)
f</code></pre><img src="e4390ef0.png" alt="Example block output"/><h3 id="Baseline-benchmark"><a class="docs-heading-anchor" href="#Baseline-benchmark">Baseline benchmark</a><a id="Baseline-benchmark-1"></a><a class="docs-heading-anchor-permalink" href="#Baseline-benchmark" title="Permalink"></a></h3><p>Lets get a baseline performance result for our model.</p><pre><code class="language-julia hljs">using BenchmarkTools
f</code></pre><img src="6f69a20c.png" alt="Example block output"/><h3 id="Baseline-benchmark"><a class="docs-heading-anchor" href="#Baseline-benchmark">Baseline benchmark</a><a id="Baseline-benchmark-1"></a><a class="docs-heading-anchor-permalink" href="#Baseline-benchmark" title="Permalink"></a></h3><p>Lets get a baseline performance result for our model.</p><pre><code class="language-julia hljs">using BenchmarkTools

@btime Agents.step!(model, 20 * 365) setup = (model = initialise())</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">StandardABM with 50 agents of type Fisher
agents container: Dict
Expand Down Expand Up @@ -185,7 +185,7 @@
title = &quot;Fishery Inventory&quot;,
)
lines!(ax, resultsdeq.stock, linewidth = 2, color = :blue)
f</code></pre><img src="4c6eb0b4.png" alt="Example block output"/><p>The small complexity addition yields us a generous speed up of around 4.5x.</p><pre><code class="language-julia hljs">@btime Agents.step!(model, 20) setup = (model = initialise_diffeq())</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">StandardABM with 50 agents of type Fisher
f</code></pre><img src="1d278aec.png" alt="Example block output"/><p>The small complexity addition yields us a generous speed up of around 4.5x.</p><pre><code class="language-julia hljs">@btime Agents.step!(model, 20) setup = (model = initialise_diffeq())</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">StandardABM with 50 agents of type Fisher
agents container: Dict
space: nothing (no spatial structure)
scheduler: fastest
Expand All @@ -200,7 +200,7 @@
lineE = lines!(ax, results.stock, linewidth = 2, color = :blue)
lineTS = lines!(ax, resultsdeq.stock, linewidth = 2, color = :red)
leg = f[1, end+1] = Legend(f, [lineE, lineTS], [&quot;Euler&quot;, &quot;TSit5&quot;])
f</code></pre><img src="19f07096.png" alt="Example block output"/><p>That&#39;s an average discrepancy of 30 fish! Optimising the step size in the Euler method can close this gap, but this is yet more analysis overhead we&#39;d prefer to avoid by using better solutions.</p><p>In addition, the ODE solver will be faster most of the time, regardless of how many steps it needs to take. If not, there are other, more effective solvers that can be used for your particular case.</p><h2 id="Coupling-Agents.jl-to-DifferentialEquations.jl"><a class="docs-heading-anchor" href="#Coupling-Agents.jl-to-DifferentialEquations.jl">Coupling Agents.jl to DifferentialEquations.jl</a><a id="Coupling-Agents.jl-to-DifferentialEquations.jl-1"></a><a class="docs-heading-anchor-permalink" href="#Coupling-Agents.jl-to-DifferentialEquations.jl" title="Permalink"></a></h2><p>Perhaps you&#39;re more familiar to the <code>DifferentialEquations</code> <code>solve</code> interface and you&#39;re new to <code>Agents</code>?</p><p>We can also couple the two systems the other way. Let&#39;s use <a href="https://docs.sciml.ai/stable/features/callback_functions/#Using-Callbacks-1">callbacks</a> to handle the agent based aspects of our problem.</p><pre><code class="language-julia hljs">function agent_cb_step!(agent, model)
f</code></pre><img src="f32e6c3c.png" alt="Example block output"/><p>That&#39;s an average discrepancy of 30 fish! Optimising the step size in the Euler method can close this gap, but this is yet more analysis overhead we&#39;d prefer to avoid by using better solutions.</p><p>In addition, the ODE solver will be faster most of the time, regardless of how many steps it needs to take. If not, there are other, more effective solvers that can be used for your particular case.</p><h2 id="Coupling-Agents.jl-to-DifferentialEquations.jl"><a class="docs-heading-anchor" href="#Coupling-Agents.jl-to-DifferentialEquations.jl">Coupling Agents.jl to DifferentialEquations.jl</a><a id="Coupling-Agents.jl-to-DifferentialEquations.jl-1"></a><a class="docs-heading-anchor-permalink" href="#Coupling-Agents.jl-to-DifferentialEquations.jl" title="Permalink"></a></h2><p>Perhaps you&#39;re more familiar to the <code>DifferentialEquations</code> <code>solve</code> interface and you&#39;re new to <code>Agents</code>?</p><p>We can also couple the two systems the other way. Let&#39;s use <a href="https://docs.sciml.ai/stable/features/callback_functions/#Using-Callbacks-1">callbacks</a> to handle the agent based aspects of our problem.</p><pre><code class="language-julia hljs">function agent_cb_step!(agent, model)
agent.yearly_catch = rand(abmrng(model), Poisson(agent.competence))
end

Expand Down Expand Up @@ -255,4 +255,4 @@
title = &quot;Fishery Inventory&quot;,
)
lines!(ax, discrete, linewidth = 2, color = :blue)
f</code></pre><p>The results are different here, since the construction of this version and the one above are quite different and cannot be randomly seeded in the same manner.</p><p>However, as you can see, it is for the most part just a re-arranged implementation of the integrator method - giving users flexibility in their architecture choices.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../optim/">« BlackBoxOptim.jl</a><a class="docs-footer-nextpage" href="../schoolyard/">Graphs.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.1 on <span class="colophon-date" title="Sunday 12 May 2024 23:50">Sunday 12 May 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
f</code></pre><p>The results are different here, since the construction of this version and the one above are quite different and cannot be randomly seeded in the same manner.</p><p>However, as you can see, it is for the most part just a re-arranged implementation of the integrator method - giving users flexibility in their architecture choices.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../optim/">« BlackBoxOptim.jl</a><a class="docs-footer-nextpage" href="../schoolyard/">Graphs.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.1 on <span class="colophon-date" title="Saturday 8 June 2024 14:49">Saturday 8 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit df7a051

Please sign in to comment.