Skip to content

Java 'Collections.shuffle(List<>) functionality does not use a fixed seed -> the ordered collections are different for each simulation -> results differ when using certain sliders on same value #199

@AteZenmo

Description

@AteZenmo

I discovered this issue recently, after disabeling the shuffel the outcomes where always the same again.

//Collections.shuffle(c_orderedPublicChargers);
//Collections.shuffle(c_orderedVehiclesPrivateParking);
//Collections.shuffle(allPublicParkedCars);
//Collections.shuffle(c_orderedParkingSpaces);

I agree with the intention, we just need to find a way for it to have a fixed seed. Maybe our own 'shuffle' function based on anylogic 'randomtrue' (that has a fixed seed) is needed.

For now i have disabled the shuffles.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions