Covarying variables in behaviorspace

11 views
Skip to first unread message

Wannes...@hotmail.be

unread,
Apr 21, 2023, 1:05:28 PM4/21/23
to netlogo-users
Hey all,

I am currently setting up an experiment where I want to covary some of my behaviorspace inputs, for example in some runs, I want my world to be a square. I have a world-x-dimensions and a world-y-dimensions slider on my interface for easy access and manipulation. 

Ideally, I would just like to be able to write  `["world-y-dimensions" world-x-dimensions]` in my behaviorspace variables box, but Netlogo seems to be very strict about what I can and can't put in there, and doesn't allow any reporters.

Different methods I tried:
-`Set world-y-dimensions world-x-dimensions` in the setup commands box of behaviorspace. While this does work, my problem with this is that it doesn't actually alter the value for world-y-dimensions in my results table. As such, I could very easily see it leading to errors while handling that data.

-A separate switch called `square-world?` on the interface, which ensures the shape of the world during setup if it is changed to true. I still have my wrong world-y-dimensions showing up on my results file, but at least I also have the square-world? value to signal that the y-value is inaccurate. This one worked well as long as I had just one value that I wanted to covary. The problem here is that I don't want to make a new one of these for every single variable that I want to covary, since it might lead to confusion quite quickly while also not always varying it in the same way

-A third option I was thinking off was to create an extra input variable, parameter-covariance, in which I store a string that is then run in the setup commands box. I can then use this string as an output so that I can check which variables covaried during the run.

Still, I am not fully satisfied with any of these and was wondering how others went about this. 

Best wishes,
Wannes

Aaron Andre Brandes

unread,
Apr 21, 2023, 2:02:53 PM4/21/23
to Wannes...@hotmail.be, netlogo-users

Hi

I did the following and the correct dimensions showed in my output files.

resize-world -15 15 -15 15

setup

- Aaron

-- 

Aaron Brandes, Software Developer

Center for Connected Learning and Computer-Based Modeling

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/13598f23-0fcc-49f4-b3d7-63b94fad7bb1n%40googlegroups.com.

Wade Schuette

unread,
Apr 21, 2023, 2:48:21 PM4/21/23
to Wannes...@hotmail.be, netlogo-users
If you have a  make-y-equal-x?  variable  in behavior space that can be true or false,
and you manage setting y = x in your code if that variable is true,
AND you use y as an output variable,it should have the correct value there,
yes?      And you can ignore the value of y shown as an input variable.



Wannes...@hotmail.be

unread,
Apr 21, 2023, 2:50:12 PM4/21/23
to netlogo-users
Hi Aaron,

I should clarify that I am specifically trying to vary my own variables, not the ones that are already built-in. For that world size might have been a poor example.
One of the others for example would be co-varying my juvenile survival to always be 50% of my adult survival.

I could admittedly ask behaviorspace to write every since input variable as an output variable as well. It's a lot of extra columns in my table, but it would give me certainty as to what is going on with the model.

Wannes


Op vrijdag 21 april 2023 om 20:02:53 UTC+2 schreef aaron....@northwestern.edu:

Wannes...@hotmail.be

unread,
Apr 21, 2023, 2:52:11 PM4/21/23
to netlogo-users
Hi Wade, 

Yes, that was the approach I was using up until now since I only had a single variable that I wanted to covary. But I'm starting to think of covarying multiple variables and not always in an x=y way, so I didn't think it would be a good idea to go rewrite my code for each separate behaviorspace run.

Wannes

Op vrijdag 21 april 2023 om 20:48:21 UTC+2 schreef wade.s...@gmail.com:
Reply all
Reply to author
Forward
0 new messages