Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use restricted distribution instead of a posteriori cutoff in createVehTypeDistribution #4193

Closed
leoluecken opened this issue Jun 8, 2018 · 0 comments

Comments

@leoluecken
Copy link
Contributor

commented Jun 8, 2018

Currently, a sample is drawn from the specified distribution and if it lies out of the specified bounds of desired values it is plainly minmaxed to the next bound. This creates singular points of concentrated probability weight, which is very ugly.
The correct way to draw a sample is to draw again from the original distribution until the drawn value lies in the specified range. This requires a check that the given interval of admissible values is not empty and perhaps a maximal number of tries until the simple fallback of cutting the value is applied, if no sample within the bounds is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.