/Це метод який генерує розподіл ймовірностей щодо попиту
///
///
/// double [] Probability (int n, double c_z, double h, double loss)
{[] proba = new double [n + 1]; [] condition = new double [n + 1]; mul = 1; lambda = rnd.Next (1,10); p>
// double res; a = n; (int j = 0; j
{[j] = c_z * + h * a; = a - 1/2;
}
// for (int i = 0; i
// {
// if (i == 0)
// {
// mul = 1;
//}
// else
// {
// mul * = i;
//}
// proba [i] = Math.Pow (lambda, i) * Math.Pow (Math.E,-lambda)/mul;
//// a -;
//// rnd = new Random ();
//} (int i = 0; i
{[i] = condition [i]/condition.Sum ();
}
// do
// {
// for (int i = 0; i
// {
//// res = proba.Length;
// res = rnd.Next (1, proba.Length);
//// double r = rnd.Next (0, 1);
//// res = proba.Length;
// proba [i] = 1/res;
// if (proba [i] == 1)
// {
// res = rnd.Next (1, proba.Length);
// proba [i] = 1/res;
// if (proba [i] == 0.5)
// {
// res = rnd.Next (1, proba.Length);
// proba [i] = 0.5/res;
//}
// a = proba.Sum ();
// if (a! = 1.0)
// {
// res = rnd.Next (1, proba.Length);
// proba [i] = 1/res;
//}
//}
//}
// a = proba.Sum ();
//} while (a == 1.0);
// proba = new double [3] {0.2, 0.5, 0.3}; proba;
}
///
///Generation FutureProbability
///
///
/// double [] FutureProbability (double [,] condition)
{[] futureProba = new double [condition.GetLength (0)]; [] proba = new double [condition.GetLength (0)]; [] help = new double [condition.G...