MonteCarloSettings.Seed
property · MonteCarloSettings · cAlgo.API Since 5.10
DesktopCLICloud
Gets the random seed that makes the simulation reproducible. The same seed with the same inputs produces the same result, even across application restarts. The default value is 0.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public int Seed {get; set;}
monteCarloSettings.Seed: int
Returns int
Examples
var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @"C:\Temp\montecarlo-result.json") { Seed = 42 };
Print("Monte Carlo seed: {0}", monteCarlo.Seed);
monteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r"C:\Temp\montecarlo-result.json")
monteCarlo.Seed = 42
api.Print(f"Monte Carlo seed: {monteCarlo.Seed}")