コード例 #1
0
        public void ConstructSystem()
        {
            RngStream.SetPackageSeed(this.parameter.Seed);
            this.layoutManager.ReadLayout(new FileStream(this.parameter.LayoutPath, FileMode.Open));
            this.jobManager.ReadJobMix(new FileStream(this.parameter.JobPath, FileMode.Open));
            this.ConnectJobTypesAndOperations();
            this.ConnectComponentTypesAndOperations();
            this.ConnectStationsAndOperations();
            this.ConnectOperationsAndProcessors();
            this.ConnectNodesAndBinMagazines();
            this.ConnectInventoryPoliciesAndBinMagazines();
            ConfigurationParameter configuration = this.parameter.Configuration;

            configuration.InitializeStreams();
            if (configuration.JobArrivalType != JobArrivalType.HOPBased)
            {
                this.ChangeBinLoading(new FileStream(configuration.ToolPath, FileMode.Open));
            }
            this.algorithms.InitializeAlgorithms(this);

            if (configuration.InputState != null)
            {
                configuration.InputState.PreOperation();
                this.ReadSimulationManagerState(configuration.InputState.GetStream(), configuration.FromExecutionToPlanning);
                configuration.InputState.PostOperation();
            }

            TextOutput text = new TextOutput("JobMix.txt");

            WriteJobMix(text);
            TextOutput text2 = new TextOutput("Layout.txt");

            this.LayoutManager.WriteLayout(text2);
        }
コード例 #2
0
 public virtual void Initialize(SimulationManager managerIn)
 {
     this.manager = managerIn;
     this.stream  = new RngStream();
 }
コード例 #3
0
 /// <summary>
 /// Set the seed for all random number generators created based on the current system time.  This
 /// method should be called before any random number instances are created.
 /// </summary>
 /// <returns>True if the seed is successfully set, false otherwise</returns>
 public static bool SetSeed()
 {
     return(RngStream.setPackageSeed());
 }
コード例 #4
0
 // ************************* Constructors *************************************
 /// <summary>
 ///	Default constructor.
 /// </summary>
 public cRandomBase()
 {
     Rnd = new RngStream();
 }
コード例 #5
0
 /// <summary>
 /// Set the seed for all random number generators created.  This method should be called
 /// before any random number instances are created.
 /// </summary>
 /// <param name="SeedVal">The seed value</param>
 /// <returns>True if the seed is successfully set, false otherwise</returns>
 public static bool SetSeed(long SeedVal)
 {
     return(RngStream.setPackageSeed(SeedVal));
 }