Heads up - weighted stringlists
Posted: Thu Nov 19, 2015 9:22 pm
Hi Everyone,
This is a short heads up, from me, regarding if you want to have the ATG engine select a random stringlist, from among those you used a column to determine the weight of them. Does that make sense? If not what I am trying to say is this. If you choose to have the ATG engine select a weighted stringlist (a stringlist where you used a specific column as the value of the weight of the stringlist row), then if you select a number below 1 it will automatically be assumed that this number is 1.
Say you want to have a different way of using the randomization engine. You make a stringlist of 4 rows, but you want some of them to be selected more often than others. You could do it like this.
This will work out like this. The stringlist weights will be added together and the value 4 would come out twice as many times as 1, 2 or 3.
If however you wanted to have a value like 2 not come out at all... it might seem intuitive to set the weight to 0.
Now because the engine for ATG wants the values to be minimum 1, it will interpret the 0 to be a 1. So the actual results will be exactly like the first table i showed.... Which may cause errors in your programming. Like it did to me...
Instead what you do is make a NEW stringlist (with code) and then simply omit the lines that had 0 in them.
Just FYI, since there is no documentation, this might be the first place you read this info.
This is a short heads up, from me, regarding if you want to have the ATG engine select a random stringlist, from among those you used a column to determine the weight of them. Does that make sense? If not what I am trying to say is this. If you choose to have the ATG engine select a weighted stringlist (a stringlist where you used a specific column as the value of the weight of the stringlist row), then if you select a number below 1 it will automatically be assumed that this number is 1.
Say you want to have a different way of using the randomization engine. You make a stringlist of 4 rows, but you want some of them to be selected more often than others. You could do it like this.
Code: Select all
Value Weight
1 1
2 1
3 1
4 2
This will work out like this. The stringlist weights will be added together and the value 4 would come out twice as many times as 1, 2 or 3.
If however you wanted to have a value like 2 not come out at all... it might seem intuitive to set the weight to 0.
Code: Select all
Value Weight
1 1
2 0
3 1
4 2
Now because the engine for ATG wants the values to be minimum 1, it will interpret the 0 to be a 1. So the actual results will be exactly like the first table i showed.... Which may cause errors in your programming. Like it did to me...
Instead what you do is make a NEW stringlist (with code) and then simply omit the lines that had 0 in them.
Just FYI, since there is no documentation, this might be the first place you read this info.