diff --git a/src/main.cpp b/src/main.cpp index ae699a0..a249a8c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,8 +33,13 @@ int main (const int argc, char *argv[]) { } std::cout << std::endl; - std::random_device rd; - std::mt19937_64 rng(rd()); + std::mt19937_64 rng; + if (parameter.count("seed")) { + rng.seed(static_cast(parameter.at("seed"))); + } else { + std::random_device rd; + rng.seed(rd()); + } motions::BaseMotion *motion = motions::BaseMotion::createFromInput(args.motion_type, rng); times::BaseDistribution *dist = times::BaseDistribution::createFromInput(args.distribution_type, rng);