Skip to content

A little WeightedResponseTimeRule bug #375

@shunminli

Description

@shunminli

image

as shown above, the d >= randomWeight should be d > randomWeight
It is going to cause a probability error.
if totalWeight == X+Y+Z , weights = [X, X+Y, X+Y+Z]

d >= randomWeight split ranges like [0, X], (X, X+Y], (X+Y, X+Y+Z)
d > randomWeight split ranges like [0, X), [X, X+Y),[X+Y, X+Y+Z)

as we know, the randomWeight is a random number in [0, X+Y+Z)

it means when d >= randomWeight first range's probability will be large than the weight/totalWeight
and last range's probability will be less than the weight/totalWeight

so the correct is d > randomWeight

the fix commit #376

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions