In reply to dave_59:
Thanks Dave!
I know that using these specific dist values I’ve wrote, the inside constraint is redundant.
Actually, the desired average which I’ve tried to simplify first, can be any value in the range [1:7], and it’s derived from the “credit_prob” value which is in the range [50:87]. i.e. the user sets the desired “credit_prob” he wants (using the new function), and from it I need to extract the desired average (using “calc_credit_high_duration_desired_avg” function) and the distribution for the randomized values.
For example, the value 4.882 that I’ve originally wrote is for “credit_prob”=83. The dist values were given as an example of the desired “triangular shaped” distribution.
So, clarifying the above, what I actually need is:
- All numbers are inside [1:7]
- User sets “credit_prob” in the range [50:87] → calculate desired average (in the range [1:7]) - “credit_high_duration_desired_avg”
- “triangular shaped” distribution around the array average. i.e. majority of the numbers (>90%) should be in the range [$floor(avg):$ceil(avg)], and then with lower probability the numbers {$floor(avg)-1,$ceil(avg)+1}, and then with the least probability (~1%) the numbers {[1:$floor(avg)-2],[$ceil(avg)+2:7]}
Please note that currently I assume “credit_low_duration_desired_avg”=1 (it may change later).
Hopefully now it’s more clear :)