Individual-based

Individual particle based diffusion model

ModelId: 
diffusion
SimileVersion: 
diffusion

 This models molecules in a lattice. They are held in their lattice positions by mutual repulsion. It starts with a low vibrational energy which gradually increases. They are divided into two types for display purposes to illustrate diffusion. To start with they vibrate around their intital positions, then occasionally exchange positions until above a certain energy the fixed positions are lost and they all get mixed.

 

Equations: 

 

 

Contained submodel(s)
others  
balls  

Submodel others


Submodel others is a relation submodel for a relation between balls and itself.

 

Condition for existence of submodel

effect

Units: boolean
effect = hypots<bounce_distance and rightway
Where:
bounce_distance is the variable bounce distance in this submodel.
hypots is the variable hypots in this submodel.
rightway is the variable rightway in this submodel.

Variable(s)

comps

Units: array(1,2)
comps = forces*[distances]/hypots
Where:
forces is the variable forces in this submodel.
hypots is the variable hypots in this submodel.
[distances] is the variable distances in this submodel.


bounce distance

Units: 1
bounce distance = sizes_b1+sizes_b2
Where:
sizes_b1 is the variable sizes in balls
sizes_b2 is the variable sizes in balls


distances

Units: array(1,2)
distances = [posns_b1]-[posns_b2]
Where:
[posns_b1] is the variable posns in balls
[posns_b2] is the variable posns in balls


hypots

Units: 1
hypots = hypot(element([distances],1),element([distances],2))
Where:
[distances] is the variable distances in this submodel.


forces

Units: 1
forces = pow(bounce_distance/hypots,4)
Where:
bounce_distance is the variable bounce distance in this submodel.
hypots is the variable hypots in this submodel.


rightway

Units: boolean
rightway = index(1)<index(2)

Submodel balls


Submodel balls is a fixed membership submodel with 32 members.

 

Variable(s)

Actions

Units: array(1,2)
Actions = sum({[comps_b1]})-sum({[comps_b2]})
Where:
{[comps_b1]} is the variable comps in others
{[comps_b2]} is the variable comps in others


green?

any(index(1)==[2,3,4,5,7,8,9])
Units: boolean
green? = any(index(1)==[2,3,4,5,7,8,9,12,13,14,17,18,22,23,27,32])

posns

Units: array(1,2)
posns = [p]
Where:
[p] is the compartment p in balls/dims


x

Units: 1
x = element([p],1)
Where:
[p] is the compartment p in balls/dims


y

Units: 1
y = element([p],2)
Where:
[p] is the compartment p in balls/dims


sizes

Units: 1
sizes = 15

wees

Units: 1
wees = sizes/10
Where:
sizes is the variable sizes in this submodel.


weex

Units: 1
weex = x/10+45
Where:
x is the variable x in this submodel.


weey

Units: 1
weey = y/10+45
Where:
y is the variable y in this submodel.

Contained submodel(s)
green  
dims  
orange  

Submodel balls/green


Submodel green is a conditional submodel.

 

Condition for existence of submodel

cond1

Units: boolean
cond1 = green_
Where:
green_ is the variable green? in balls

Variable(s)

size

Units: 1
size = sizes
Where:
sizes is the variable sizes in balls


x

Units: 1
x = x
Where:
x is the variable x in balls


y

Units: 1
y = y
Where:
y is the variable y in balls

Submodel balls/dims


Submodel dims is a fixed membership submodel with 2 members.

 

Compartment(s)

p
Units: 1
    Initial value: if index(1)==1 then fmod(25*(index(2)-1),112.5) else 16.66*int((index(2)-1)/4.5)
    Inflows: 
move


v
Units: 1
    Initial value: 0
    Inflows: 
flow1

Flow(s)

move
Units: 1
move = v
Where:
v is the compartment 
v in this submodel.


flow1
Units: 1
flow1 = force/mass
Where:
force is the variable 
force in this submodel.
mass is the variable mass in this submodel.

Variable(s)

gravity

Units: 1
gravity = 10*mass*if p<0 then 0-p elseif p>100 then 100-p else 0
Where:
mass is the variable mass in this submodel.
p is the compartment p in this submodel.


force

Units: 1
force = a+element([Actions],index(1))+rand_var(-10,10)

mass

Units: 1
mass = sizes*sizes/100
Where:
sizes is the variable sizes in balls

Submodel balls/orange


Submodel orange is a conditional submodel.

 

Condition for existence of submodel

cond1

Units: 
cond1 = missing

Variable(s)

size

Units: 1
size = sizes
Where:
sizes is the variable sizes in balls


x

Units: 1
x = x
Where:
x is the variable x in balls


y

Units: 1
y = y
Where:

 

Results: 

These images show the positions of particles at the start and end of the run.

 Image showing the positions of particles at the start of the runImage showing the positions of particles at the end of the run

Banker/broker/consumer multi-agent model

ModelId: 
dave1
SimileVersion: 
3.1+

 This model was developed in relation to the SLIE project (Sustainable Lifecycles for Information Ecosystems).

Equations: 

 Equations in submodel Bank

creation: initial number = 2
compartment: money = 100000
flow: revenue = 0.1*money
flow: allocation = 0
variable: bank ID = index(1)

Equations in submodel Consumer
creation: initial number = 4
compartment: money = 0
flow: allocation = 0
flow: expenditure = 100
variable: consumer ID = index(1)
variable: request = (if rand_var(0,1)<0.2 then 1 else 0)
variable: mediator chosen = greatest({mediator})
variable: bank = sum({bank})

Equations in submodel Mediator
variable: mediator ID = index(1)
variable: bank = -1*floor(rand(1,2.9999))

Equations in submodel CM
condition: condition = (rand_const(0,1)<0.5)
variable: request = (if mediator==mediator_chosen then request else 0)
variable: mediator = mediator_id
variable: mediator chosen = mediator_chosen [in submodel Consumer]
variable: bank = (if mediator==mediator_chosen then bank else 0)

Equations in submodel MB
condition: condition = (bank==bank_id)

Equations in submodel CB request
condition: condition = (bank==bank_id&&request>0)

Equations in submodel CB account
compartment: money = 0 

 

Individual-based model of population dynamics with movement of individual animals

ModelId: 
animal1
SimileVersion: 
5.9

 This models the dynamics of a population of animals, represented as a set of individuals that come into existence, live for a while, then die. When the animals are alive, they move around according to a simple random walk.

Equations: 

 Equations in Desktop

N = sum({one})

Equations in ANIMAL
X: initial value = rand(30,70)
Y: initial value = rand(30,70)
Dir: initial value = rand(0,6.28)

create = 100
r = rand(0,2*0.7)
m = 0.6

xchange = (if outside == 1 then speed*cos(dir+3.14) else speed*cos(dir))
dirchange = (if outside == 1 then 3.14/dt(1) else rand(-0.4,0.4)/dt(1))
ychange = (if outside == 1 then speed*sin(dir+3.14) else speed*sin(dir))

speed = 5
size = 3
outside = (if (x<0;x>100;y<0;y>100)then 1 else 0)
one = 1

Results: 

 

Syndicate content