Page 470 - Advanced Mine Ventilation
P. 470
Appendix C: Ventilation Network Analyzer in Cþþ With Input and Output 439
HMineDeclarations_sc
#include "HMineDeclarations.h"
int main()
{
// Read Identification of the Problem
cout << "ynInput title of the problem : " << endl;
getline(cin, title);
cout << "ynEnter nb, nj, maxj, nf, maxit, nbwnvp, nfixb values :
" << endl;
cin >> nb >> nj >> maxj >> nf >> maxit
>> nbwnvp >> nfixb;
cout << "ynEnter acceptable error value : " << endl ;
cin >> e;
// Number of branches should be a positive value
if (nb <¼ 0)
exit(0);
cout << endl << title << endl;
1;
nm ¼ nb - nj þ
nf;
nfbpf ¼ nfixb þ
cout << "nb" << setw(10) << "nj" << setw(10) << "maxj" <<
setw(10) << "nm" << setw(10) << "nf" << setw(10) << "maxit" <<
setw(10) << "nbwnvp" << setw(10) << "nfixb" << setw(10) << "e" <<
endl;
cout << nb << setw(10) << nj << setw(10) << maxj <<
setw(10) << nm << setw(10) << nf << setw(10) << maxit
<< setw(10) << nbwnvp << setw(10) << nfixb << setw(10) <<
e << endl ;
// Read Branch Characteristics
readBranchCharacteristics();
printBranchCharacteristics();
// Arrange General Branches in Decending Order of Resistance
sortBranches();
// Determine Branch Characteristics
toFindBasicBranches();

