Dynamic values in widgets

Hello,

First of all thank you for NetLogo, I’ve been enjoying it a lot. However, I could not find a way to input dynamic values in widgets. My example is: I’m studying the inlfuence of different parameters on my agents so I do multiple runs of 120 ticks and I change a set-up parameter from the interface for each different run.

But now i want to have an dynamic parameter, nothing too complicated, just a linear evolution like a=1+1*tick. Do I need to build a dedicated procedure for that? Parameter a has its input widget in the interface and can be a constant sometimes, but not always, hence the need for a potential dynamic definition in the widget.

Can I do that or do I have to change the value manually every tick?

Thanks again

Hi @GUGO,

Great to hear that you are enjoying NetLogo! I think if you want it to be constant sometimes and dynamic at other times, you will need to manually assign its value each tick. However, if you want it to be dynamic no matter what, you could use the “String (reporter)” input widget type, enter 1 + 1 * ticks in the input field, then evaluate it with runresult each tick. For example, if the name of the input widget was num, you could use runresult num to get its value dynamically. Hopefully this answers your question!

Isaac B.

1 Like