Page 486 - Advanced Mine Ventilation
P. 486

Appendix C: Ventilation Network Analyzer in Cþþ With Input and Output  455

                             sigma2[1];
                    small ¼
                  tmp ¼ 1;

                    for(int j¼2; j<¼n1; jþþ)
                    {
                      if(small - sigma2[j] >  0)
                      {
                          tmp  ¼ j;
                          small ¼  sigma2[j];
                      }
                    }


                label78: cout << endl << setw(15) << "SIGMA2 ¼     " << sigma2
           [tmp] << endl;
                    n1 ¼  tmp;
                    n  ¼  n1-1;

                    if(n <¼ 0)
                    {
                                 1;
                        nd[l] ¼
                                   s[1];
                        c[l][1] ¼
                                   0;
                        c[l][2] ¼
                        printc(l);
                        continue;
                    }
                    else
                    {
                                 n;
                        nd[l] ¼
                        for(int i¼1; i<¼n1; iþþ)
                        {
                          for(int j¼1; j<¼i; jþþ)
                          {
                             p[i][j] ¼   0;
                          }
                          p[i][iþ1] ¼  1;
                    }

                    for(int j¼1; j<¼n; jþþ)
                    {
                      p[1][jþ2] ¼  -p[1][jþ1] * alpha[j] - p[1][j] * beta[j];
                    }
   481   482   483   484   485   486   487   488   489   490   491