Search code examples
netlogobehaviorspace

How to make constrained combinations of scenarios in NetLogo Behavior Space?


In my problem I have seven global variables to be controlled by Behavior Space.

Variable weights are in a range of 0 to 1 with an increment of 0.1 like,

[“A” [0 0.1 1]], 
[“B” [0 0.1 1]], 
[“C” [0 0.1 1]], 
[“D” [0 0.1 1]], 
[“E” [0 0.1 1]], 
[“F” [0 0.1 1]], 
[“G” [0 0.1 1]]

The restriction in my problem is that in each scenario the combination of all seven weights must be equal to “1” e,g;

0.2+0.2+0.2+0.1+0.1+0.1+0.1=1

However Behavior Space, by default, makes all possible scenarios whether the sum of weights is equal to, greater than or lesser than “1”.

Can you please help me how to extract and use only those variable combinations in which the sum of weights is always equal to “1”. Bundle of Thanks in anticipation.

I am a new NetLogo user without any programming background and in a desperate need of your help.


Solution

  • You can use the stop condition in Behavior Space

    stop condition in BS

    like

    A + B + C + D != 1