Esempio n. 1
0
        private void generateRandomMachine()
        {
            if (d_pDays.Count == 0 || d_pDemands.Count == 0)
            {
                throw new Exception("You must enter atleast one row as input");
            }

            double[] p    = new double[d_pDays.Count];
            double[] good = new double[d_pDemands.Count];
            double[] fair = new double[d_pDemands.Count];
            double[] poor = new double[d_pDemands.Count];

            for (int i = 0; i < p.Length; ++i)
            {
                p[i] = d_pDays[i].DayProbability;
            }

            for (int i = 0; i < good.Length; ++i)
            {
                good[i] = d_pDemands[i].Good;
                fair[i] = d_pDemands[i].Fair;
                poor[i] = d_pDemands[i].Poor;
            }

            var randomMachine = new RandomMachine(p, good, fair, poor);

            simulator2000 = new Simulator2000(randomMachine);
        }
Esempio n. 2
0
        private void generateRandomMachine()
        {
            if(d_pDays.Count == 0 || d_pDemands.Count == 0)
                throw new Exception("You must enter atleast one row as input");

            double[] p = new double[d_pDays.Count];
            double[] good = new double[d_pDemands.Count];
            double[] fair = new double[d_pDemands.Count];
            double[] poor = new double[d_pDemands.Count];

            for (int i = 0; i < p.Length; ++i)
                p[i] = d_pDays[i].DayProbability;

            for (int i = 0; i < good.Length; ++i)
            {
                good[i] = d_pDemands[i].Good;
                fair[i] = d_pDemands[i].Fair;
                poor[i] = d_pDemands[i].Poor;
            }

            var randomMachine = new RandomMachine(p,good,fair,poor);
            simulator2000 = new Simulator2000(randomMachine);
        }
Esempio n. 3
0
 private void clearToolStripMenuItem_Click(object sender, EventArgs e)
 {
     d_pDays.Clear();
     d_pDemands.Clear();
     simulator2000 = null;
 }
Esempio n. 4
0
 private void clearToolStripMenuItem_Click(object sender, EventArgs e)
 {
     d_pDays.Clear();
     d_pDemands.Clear();
     simulator2000 = null;
 }