I am unsure of where to ask this. I guess since the implementation will be in ASP im landing it here.
I need some form of percentage based decision making algorithm.
What I am going to do is have a set of percentages in a SQL database....based on those percentages there I want to do something.
Example:
Action A: 40%
Action B: 20%
Action C: 25%
Action D: 15%
so basically I want action A performed 2 out of 5 times, Action B performed 1 out of 5 times, Action C I want to happen 1 in four times, and so on.
There can be N number of actions with percentages totaling 100%.
I have seen a recommendation of using the MSWC.ContentRotator which I am looking into. I have also seen a recommendation of using a string vector, then index into it using modulo.
If I were to use the string vector, and still wanted to support percentages that are not multiples of ten then my string vector would contain 100 indexes, and it would not be possible to do a round robin on this...
Help please.
I need some form of percentage based decision making algorithm.
What I am going to do is have a set of percentages in a SQL database....based on those percentages there I want to do something.
Example:
Action A: 40%
Action B: 20%
Action C: 25%
Action D: 15%
so basically I want action A performed 2 out of 5 times, Action B performed 1 out of 5 times, Action C I want to happen 1 in four times, and so on.
There can be N number of actions with percentages totaling 100%.
I have seen a recommendation of using the MSWC.ContentRotator which I am looking into. I have also seen a recommendation of using a string vector, then index into it using modulo.
If I were to use the string vector, and still wanted to support percentages that are not multiples of ten then my string vector would contain 100 indexes, and it would not be possible to do a round robin on this...
Help please.