Skip to content

Commit

Permalink
Updates to TerraME version 1.6. Close #14.
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-andrade-inpe committed Oct 15, 2015
1 parent 4649c78 commit ea50051
Show file tree
Hide file tree
Showing 20 changed files with 398 additions and 100 deletions.
4 changes: 2 additions & 2 deletions description.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version = "0.1"
version = "0.2"
package = "logo"
license = "GPL"
title = "Simple spatial ABM"
depends = "terrame (>= 1.5)"
depends = "terrame (>= 1.6)"
authors = "Pedro R. Andrade"
contact = "pedro.andrade@inpe.br"
content = "Implements ABM paradigm for spatial models with at most one agent per cell."
110 changes: 101 additions & 9 deletions doc/files/LogoAgent.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ <h1><a href="../files/models.html">Models</a></h1>








Expand All @@ -111,6 +113,9 @@ <h1>Types</h1>



<li><strong>LogoAgent</strong></li>



<li>
<a href="../files/LogoModel.html">LogoModel</a>
Expand All @@ -136,8 +141,6 @@ <h1>Types</h1>








Expand All @@ -161,9 +164,6 @@ <h1>Functions</h1>



<li><strong>LogoAgent</strong></li>





Expand Down Expand Up @@ -210,6 +210,51 @@ <h1>LogoAgent



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<span class="description">Basic Agent for Logo models.</span>




<!-- Function arguments -->
<h3>Arguments</h3>
<ul><span class="arg">

<li>
<strong>execute</strong>: A function that gets the agent itself as argument and is called every time step.
</li>


<li>
<strong>init</strong>: A function that gets the agent itself as argument and will be executed when the agent is initialized.
</li>


</span></ul>







<h3>Usage</h3>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="function">LogoAgent</span>{}</code></pre>




</dd>






<h2 class="function_list">Functions</h2>
Expand Down Expand Up @@ -291,7 +336,19 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">agent</span>:<span class="function">breed</span>()</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">Breed</span> = <span class="function">LogoModel</span>{
<span class="id">quantity</span> = <span class="number">10</span>,
<span class="id">dim</span> = <span class="number">10</span>,
<span class="id">finalTime</span> = <span class="number">10</span>,
<span class="id">changes</span> = <span class="reserved">function</span>(<span class="id">agent</span>)
<span class="id">agent</span>:<span class="function">breed</span>()
<span class="id">agent</span>:<span class="id">relocate</span>()
<span class="reserved">end</span>
}

<span class="id">Breed</span>:<span class="id">execute</span>()</code></pre>



Expand Down Expand Up @@ -336,7 +393,18 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">quantity</span> = <span class="function">countNeighbors</span>(<span class="id">agent</span>)</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">Count</span> = <span class="function">LogoModel</span>{
<span class="id">quantity</span> = <span class="number">3</span>,
<span class="id">dim</span> = <span class="number">3</span>,
<span class="id">finalTime</span> = <span class="number">2</span>,
<span class="id">changes</span> = <span class="reserved">function</span>(<span class="id">agent</span>)
<span class="id">print</span>(<span class="id">agent</span>:<span class="function">countNeighbors</span>())
<span class="reserved">end</span>
}

<span class="id">Count</span>:<span class="id">execute</span>()</code></pre>



Expand Down Expand Up @@ -381,7 +449,20 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">neigh</span> = <span class="function">emptyNeighbor</span>(<span class="id">agent</span>)</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">Empty</span> = <span class="function">LogoModel</span>{
<span class="id">quantity</span> = <span class="number">6</span>,
<span class="id">dim</span> = <span class="number">3</span>,
<span class="id">finalTime</span> = <span class="number">10</span>,
<span class="id">changes</span> = <span class="reserved">function</span>(<span class="id">agent</span>)
<span class="reserved">if</span> <span class="reserved">not</span> <span class="id">agent</span>:<span class="function">emptyNeighbor</span>() <span class="reserved">then</span>
<span class="id">print</span>(<span class="string">"not empty"</span>)
<span class="reserved">end</span>
<span class="reserved">end</span>
}

<span class="id">Empty</span>:<span class="id">execute</span>()</code></pre>



Expand Down Expand Up @@ -426,7 +507,18 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">agent</span>:<span class="function">relocate</span>()</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">Relocate</span> = <span class="function">LogoModel</span>{
<span class="id">quantity</span> = <span class="number">10</span>,
<span class="id">dim</span> = <span class="number">10</span>,
<span class="id">finalTime</span> = <span class="number">10</span>,
<span class="id">changes</span> = <span class="reserved">function</span>(<span class="id">agent</span>)
<span class="id">agent</span>:<span class="function">relocate</span>()
<span class="reserved">end</span>
}

<span class="id">Relocate</span>:<span class="id">execute</span>()</code></pre>



Expand Down
14 changes: 7 additions & 7 deletions doc/files/LogoModel.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ <h1><a href="../files/models.html">Models</a></h1>








Expand All @@ -111,6 +113,11 @@ <h1>Types</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>



<li><strong>LogoModel</strong></li>

Expand All @@ -134,8 +141,6 @@ <h1>Types</h1>








Expand All @@ -159,11 +164,6 @@ <h1>Functions</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>





Expand Down
22 changes: 13 additions & 9 deletions doc/files/Utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ <h1><a href="../files/models.html">Models</a></h1>








Expand All @@ -111,6 +113,11 @@ <h1>Types</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>



<li>
<a href="../files/LogoModel.html">LogoModel</a>
Expand All @@ -136,8 +143,6 @@ <h1>Types</h1>








Expand All @@ -161,11 +166,6 @@ <h1>Functions</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>





Expand Down Expand Up @@ -277,7 +277,9 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">cs</span> = <span class="function">getLabyrinth</span>(<span class="string">"room"</span>)</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">room</span> = <span class="function">getLabyrinth</span>(<span class="string">"room"</span>)</code></pre>



Expand Down Expand Up @@ -322,7 +324,9 @@ <h3>Arguments</h3>


<h3>Usage</h3>
<pre class="example"><code><span class="id">cs</span> = <span class="function">getSugar</span>(<span class="string">"room"</span>)</code></pre>
<pre class="example"><code><span class="id">import</span>(<span class="string">"logo"</span>)

<span class="id">room</span> = <span class="function">getSugar</span>(<span class="string">"default"</span>)</code></pre>



Expand Down
14 changes: 7 additions & 7 deletions doc/files/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ <h1><a href="../files/models.html">Models</a></h1>








Expand All @@ -111,6 +113,11 @@ <h1>Types</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>



<li>
<a href="../files/LogoModel.html">LogoModel</a>
Expand All @@ -136,8 +143,6 @@ <h1>Types</h1>








Expand All @@ -161,11 +166,6 @@ <h1>Functions</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>





Expand Down
14 changes: 7 additions & 7 deletions doc/files/font.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ <h1><a href="../files/models.html">Models</a></h1>








Expand All @@ -114,6 +116,11 @@ <h1>Types</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>



<li>
<a href="../files/LogoModel.html">LogoModel</a>
Expand All @@ -139,8 +146,6 @@ <h1>Types</h1>








Expand All @@ -164,11 +169,6 @@ <h1>Functions</h1>



<li>
<a href="../files/LogoAgent.html">LogoAgent</a>
</li>





Expand Down

0 comments on commit ea50051

Please sign in to comment.