Beispiel #1
0
 public SimulationSystem()
 {
     DayTypeDistributions = new List <DayTypeDistribution>();
     DemandDistributions  = new List <DemandDistribution>();
     SimulationTable      = new List <SimulationCase>();
     PerformanceMeasures  = new PerformanceMeasures();
 }
Beispiel #2
0
 public System()
 {
     invalidprob = new bool[3] {
         false, false, false
     };
     fb = new fileBuffer();
     importDataFromFile   = false;
     DayTypeDistributions = new List <DayTypeDistribution>();
     DemandDistributions  = new List <DemandDistribution>();
     SimulationCases      = new List <SimulationCase>();
     PerformanceMeasures  = new PerformanceMeasures();
 }
        public PerformanceMeasures CalculatePerformance()
        {
            var performanceMeasures = new PerformanceMeasures
            {
                TotalCost            = NumOfRecords * NumOfNewspapers * PurchasePrice,
                TotalLostProfit      = SimulationTable.Sum(itm => itm.LostProfit),
                TotalSalesProfit     = SimulationTable.Sum(itm => itm.SalesProfit),
                TotalScrapProfit     = SimulationTable.Sum(itm => itm.ScrapProfit),
                TotalNetProfit       = SimulationTable.Sum(itm => itm.DailyNetProfit),
                DaysWithMoreDemand   = SimulationTable.Count(itm => itm.LostProfit != 0),
                DaysWithUnsoldPapers = SimulationTable.Count(itm => itm.ScrapProfit != 0)
            };

            return(PerformanceMeasures = performanceMeasures);
        }
Beispiel #4
0
 public SimulationSystem()
 {
     DayTypeDistributions = new List <DayTypeDistribution>();
     DemandDistributions  = new List <DemandDistribution>();
     // this will be shown;
     SimulationTable = new List <SimulationCase>();
     //tasnam task;
     PerformanceMeasures = new PerformanceMeasures();
     //this for files
     this.file         = new List <string>();
     this.input_inform = new List <string>();
     this.DayTypeDistributions_table = new List <string>();
     this.DemandDistributions_table  = new List <string>();
     read_from_file();
     set_day_distripution_table(DayTypeDistributions, DayTypeDistributions_table, DayTypeDistributions_table.Count);
     set_demand(DemandDistributions, DemandDistributions_table, DemandDistributions_table.Count);
     set_simulation_case();
     CalculateDailyCost();
     CaculateDailySales();
     CalculateScrapProfit();
     CalculateLostProfit();
     CalculateDailyNetProfit();
 }