7 views

Skip to first unread message

Aug 25, 2021, 4:45:39 PM8/25/21

to slim-discuss

Hi Ben and everyone.

I have a couple of questions on what the values used by SLiM to define spatial interactions mean and how they should be properly interpreted.

Lets assume an example where I initiate a simulation with dimensionality = "xy" and then I set the spatial bounds of my population p1:

p1.setSpatialBounds(c(0.0, 0.0, 2.0, 2.0));

In this example I am creating a landscape that is a square of sides of 2 units, so the X-axis ranges from 0 to 2, and so does the Y-axis.

My first question is: there is not any relation between these units (2 in the example) to real world units, like one unit would be the equivalent of 1 meter, right? They are just artificial units of space used to generate the coordinates of each individual in simulated space, right?

My second question is regarding spatial interactions.

Let's assume an interaction type that uses the "xy" dimensionality with a maxDistance limit:

initializeInteractionType(1, "xy", maxDistance = 0.2);

How does the maxDistance value translate to the simulated space?

Is maxDistance = 0.2 a fraction of each spatial unit? (to illustrate the example, if 1 spatial unit = 1km, the maxDistance = 0.2 would set an interaction area of radius 0.2km around the individual?) Or is it in relation to the whole simulated space? In our example it would be 0.2 or 2 units (using the km analogy, it would be a 0.4km radius).

Cheers

JP

Aug 25, 2021, 9:46:34 PM8/25/21

to font...@gmail.com, slim-discuss

Hi, JP - good questions:

> Lets assume an example where I initiate a simulation with dimensionality = "xy" and then I set the spatial bounds of my population p1:

>

> p1.setSpatialBounds(c(0.0, 0.0, 2.0, 2.0));

>

> In this example I am creating a landscape that is a square of sides of 2 units, so the X-axis ranges from 0 to 2, and so does the Y-axis.

>

> My first question is: there is not any relation between these units (2 in the example) to real world units, like one unit would be the equivalent of 1 meter, right? They are just artificial units of space used to generate the coordinates of each individual in simulated space, right?

What those units mean is up to you. I prefer to set them so they mean

something real (eg, I will decide that the units are in kilometers),

but there is nothing in SLiM that knows what units you are using.

> My second question is regarding spatial interactions.

>

> Let's assume an interaction type that uses the "xy" dimensionality with a maxDistance limit:

>

> initializeInteractionType(1, "xy", maxDistance = 0.2);

>

> How does the maxDistance value translate to the simulated space?

>

> Is maxDistance = 0.2 a fraction of each spatial unit? (to illustrate the example, if 1 spatial unit = 1km, the maxDistance = 0.2 would set an interaction area of radius 0.2km around the individual?) Or is it in relation to the whole simulated space? In our example it would be 0.2 or 2 units (using the km analogy, it would be a 0.4km radius).

It's a distance, so it's in the same units as the spatial bounds - not

a proportion of the range. So, in your example, the maxDistance would

be one-tenth of the range width, not one-fifth.

happy slimulating,

--peter

> Lets assume an example where I initiate a simulation with dimensionality = "xy" and then I set the spatial bounds of my population p1:

>

> p1.setSpatialBounds(c(0.0, 0.0, 2.0, 2.0));

>

> In this example I am creating a landscape that is a square of sides of 2 units, so the X-axis ranges from 0 to 2, and so does the Y-axis.

>

> My first question is: there is not any relation between these units (2 in the example) to real world units, like one unit would be the equivalent of 1 meter, right? They are just artificial units of space used to generate the coordinates of each individual in simulated space, right?

something real (eg, I will decide that the units are in kilometers),

but there is nothing in SLiM that knows what units you are using.

> My second question is regarding spatial interactions.

>

> Let's assume an interaction type that uses the "xy" dimensionality with a maxDistance limit:

>

> initializeInteractionType(1, "xy", maxDistance = 0.2);

>

> How does the maxDistance value translate to the simulated space?

>

> Is maxDistance = 0.2 a fraction of each spatial unit? (to illustrate the example, if 1 spatial unit = 1km, the maxDistance = 0.2 would set an interaction area of radius 0.2km around the individual?) Or is it in relation to the whole simulated space? In our example it would be 0.2 or 2 units (using the km analogy, it would be a 0.4km radius).

a proportion of the range. So, in your example, the maxDistance would

be one-tenth of the range width, not one-fifth.

happy slimulating,

--peter

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu