Home
User's Manual for a Measurement Simulation Code Los
Contents
1. ICGF 4 NPVCNT IPVNAR A UA O ro DIMENSION IPV 1 ICTRN ICTRN 1 Fig D 1 cont 141 2854 2855 2856 2857 2888 2859 2868 2861 2862 2863 2864 2865 2866 2867 2868 2869 2878 2871 2872 2873 2874 2875 2876 2877 2878 2879 2889 2881 2882 2883 2384 2884 2884 2884 2884 2885 2886 2887 2888 2889 2892 2891 2892 2893 2893 2893 2893 2893 2893 2893 2894 2895 2896 2897 2898 2899 2908 2981 2922 2973 2904 2905 2986 2997 2998 142 18 1 20 3g IFCICTRN LE NCT GO TO 22 1 10 IPV 1 WRITE NPROUT 12 IPV 1 FORMAT RUN TERMINATED IN SUBROUTINE TRAN1 WITH ICTRN GT NCT PROCESS VARIABLE NUMBER I3 CALL CLOSEM CONTINUE IPVTI NPVIT IPV 1 DO 38 151 TMCI ICTRN 1 1 1 IPVTI CONTINUE CWwwwwwwwwwwkkwww TRANSFER C C C O0000000 a 48 5g 68 MR ke e r 1 2 2 4 Ol i QO I 0 18 DO 40 151 1 TMCI ICTRN 1 2 ITRANCITRINO TMCI ICTRN 1 TCI ICTRNOSTMCI ICTRN 1 CONTINUE IF NMT EQ i GO TO 68 DO 58 151 1 TM I ICTRN 2 71 CONTINUE RETURN END SUBROUTINE TRAN2 IPV ITRIN x x BATCH TRANSFER MODEL WITH TWO MEASUREMENTS PARAMETER NBALMX 185 NBMX
2. 2 y uu g n u H 00000000000000 COMMON VAR XI NBMXP2 NCIMX S2I NBMXP1 CVI NBMXP1 T NTMXP1 NCTMX XIMCNBMXP2 NCIMX NMIMXO 1 S2TCNTRNMX CVTCNTRNMX CSCNBMXPI S2CS NBMXP1 TTCNTRNMX XITCNBMXP1 S2IR ONBMXP 1 S2IB NBMXP1 S2TRONTRNMX S2TBCNTRNMX TTSUMCNBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL MBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMX JBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC ITRANCNPVMX NPVMXD NTRIN MASPRT TTIPRP IMESPR ICLAPS YCTRN ICINV NCOL NPVMX HCC 5 NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCTCNPVMX NPVI NPVT NCGF ICGF VA NPVCNT IPVNARCNPVMX Pune 69 aoa DIMENSION CCNTMXP2 FCNTMKP2 1PV 1 COMMON WORK X NTMXP2 3 o Fig D 1 cont 143 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2999 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3981 3882 3883 3884 3005 3996 3897 3408 3009 3818 3811 3812 3213 3814 3015 3016 3017 3818
3. RARER ERA INITIAL RANDOM NUMBER SEEDS 1842839332 273785626 1973287924 1291185537 2963994014 164960264 491400187 1352537143 271703562 1141288589 763526641 225695886 1653987289 1673892674 1567589483 1739823648 1986540383 2898759873 1796576548 1876948846 HXSSRARRATARHARASRSHREAERRERRATARANARRARRRANRESARARER SUMHARY FOR ALL INVENTORIES AND TRANSFERS RASARARSAARAERSANRSHARARRANARRRSARARARARRATENHASTAR I XI evr T s2T MAT BAL 2XMB CUSUM S2CUSU 8 1 2420 BB 6G 8445E 83 4 8488 86 8 0800 081 8 088 1 8 8988 01 8088 1 8 000 01 8 0 00 021 g 0Z7BEt 1 1 2428E 00 6 8446E 83 4 8400 06 2 9731 04 7 5221 80 2 7868 00 2 9731 84 7 5342E 2 9731 04 7 5342E 2 1 2420 00 6 0446 0 4 8480 06 2 9731 04 7 5221 80 2 7860 00 2 9731E 84 7 5342 00 5 9462E 84 2 0468E 3 1 2420 80 6 8446E 83 4 840 6 2 9731 04 7 5221 88 2 7060 08 2 9731 4 7 5342 00 8 9192 04 3 B815E 4 1 2420t 08 0446 03 4 8400 06 2 9731 04 7 5221 88 2 7860E 00 2 9731 04 7 5342 00 1 1892E 83 6 2574 5 1 2420E 88 044 02 4 8400 06 2 9731 04 7 5221 00 2 7860 00 2 9731 04 7 5342 88 1 4865 03 9 1745E 6 1 2420 20 6 0446 0 4 9400 06 2 9731 04 7 5221 80 2 7860 00 2 9731E 04 7 5342 80 1 7839 03 1 2633 7 1 2420 BB 6 0446 03 4 8400 06 2 9731 84 7 5221 20 2 7068 Dg 2 973 E 84 7 5342 2 8812 83 1 5632 1 2420 6 044 03 4
4. BAO IGE y1 Dor the D1 8 IGE 01 aeara RATIO OUTSIDE INTERVAL OK BAL 0 0000 01 4 QNBLE 81 GU4BE 91 B A8G0E G1 Y Mont GI A onont 1 d ADUOT B1 0 USOBE 1 8 0008E 01 M guadpDt gl S2XMB B8 89P0E 01 8 3993E 22 9 3993 02 9 3993E 82 9 3992 2 9 3993E 22 9 3993 2 9 3993E 42 9 3993 02 9 3953 2 9 39 3 92 CUSUM 0000 01 8 0088E 21 B 2828E 21 8 000BE B1 8 800 01 20VuE 81 Y BEBE B B JUSBE 01 8 Ug9UBE 01 SOBBE B1 S2CUSUM 0 1 3 1294 01 3 1284E 01 3 1294 01 3 1294 01 3 1294 01 3 1294E 01 3 1234 01 3 1294 01 3 1294E 421 3 1294 01 S2CUSUM B 0930L 81 9 3993 02 9 3993 2 9 39 3 02 9 3993E 2 9 39892 2 9 3993E 2 8 3892 2 9 39 2 9 3993 02 9 3593 02 OTT TTT E RESULTS OF MONTE CARLO SIMULATION WITH 188 SAMPLES A RWAWRARTHARRARRRRRRARHAARRRARAARARARARNARSHRKERAARARRAXWAT CHI SQUARE N I1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 4 735473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 2 3228380 82 9 399260 02 8 262150 02 073821 2 2 4533170 22 9 399258E 02 9 903030 02 1 25368 OK 3 71 925673D 22 9 29926BF B82 8 116366 1 23 97 4 1 8768480 22 9 399 260 82 8 633649 02 8 915545
5. INPUT PROCESS CONTROL PARAMETERS Pee e meee EES SASL ASSL SEER SERS TLRS Se Ke a fe Ke Ke a Te Ke ia ae Ke K Ta K ae Ya Wa a ia K Se ia RARA CALL BLANKS 3 WRITECGNPROUT 82 FORMAT Y k Te e k We Yk ke k fa We k K k K He K Y TR k K fa K Sa Ye Ye e Ye ee K Ya Ye Y e i i e W K e oe ef 1 INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA READ NDAT NPV WRITE NPROUT 98 NPV FORMAT 5X NUMBER OF PROCESS VARIABLES NPV 13 READ NDAT NTRIN WRITE NPROUT 182 NTRIN FORMAT 5X NUMBER OF TRANSFER INVENTORIES 13 DO 118 I 1 NTRIN ITIN I 1 DO 118 J 1 5 IPVNO J I g CONTINUE CALL BLANKS 2 READ CNDAT CITINCID I 1 NTRIN WRITE NPROUT 128 ITINCID Iz 1 NTRIN lt ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 5X 4013 wwsx SET TRANSFER DIRECTION INDICATORS DO 148 151 ITRAN I IF ITIN I LT 0 GO TO 139 IF ITIN I LT 5 GO TO 14 ITRAN I 1 GO TO 148 1TIN I ITIN I ITRAN I 1 CONTINUE SET PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH Fig D 1 cont 1728 1729 wee TRANSEER INVENTORY NUMBER CALL BLANKS 2 WRITECNPROUT 158 158 FORMAT 5X ARRAY OF PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH ITRANSFER OR INVENTORY IPVNO 18X TRANSFER 18X INVENTORY 12X 2 PROCESS VARIABLE NUMBER 11X NUMBER 8X 1 5X 2 2 5X 3 5X 4 3 5X 5 DO 178 J 1 NTRIN READ NDA
6. de Ya fe fe SESE SESS EEL e SER ER Ye Ye Ya Ye a Wa Ye He e he e eg CONTROLLER FOR PROCESS MEASUREMENT ROUTINES We ke Ye Ye Ye ae Ye a a ka K Ya We e ka K k SK k Ya k a k e Ke e K Ye Ya k k k e Ya Ya K SE SSE SESS ESE Ke k k k K k K ke k ie Ke k K K K He e K kk k k k Sk PARAMETER NBALMX 185 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 18 NCTMX B NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX22 Fig D 1 cont 1459 1460 1461 1462 1463 1464 1464 1464 1464 1464 1464 1464 1465 1466 1467 1468 1469 1479 1471 1472 1473 1474 1475 1476 1477 1478 1479 1489 1481 1482 1483 1484 1485 1486 1487 1488 1489 1492 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1521 1502 WEIER 1594 1595 1506 1507 1508 18 28 3g 48 59 69 74 82 9g 148 118 COMMON VAR XI NBMXP2 NCIMX S2I NBMXP1 1 NCTMX XIM NBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX S2TCNTRNMX CVTCNTRNMX CS NBMXP1 S2CS NBMXP1 TT NTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TRONTRNMX S2TBCNTRNMX TTSUM NBMXP 1 S2TRSM NBMXP1 S2TBSM NBMXP 1 COMMON CON NBAL NBAELP1 NBALP2 NTRPBL NTRN NTRNP1I NTRNP2
7. 00080 681 g 9080E 21 8 890gE 21 8 88 08E 21 8 BRICE 81 8 2408 01 8 98U0gE 2l 8 90880E 21 TTT RESULTS OF MONTE CARLO SIMULATION WITH 188 SAMPLES RAMA RAR AR RANA AAA RA AREA CHI SQUARE N 1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 8 736473 CUSUM BALANCE SAMPLE NUMBER AVERAGE 1 5 9532000 01 2 4 1059800 01 3 1 2915780 39 4 3 5733950 01 5 1 8427020 6 6 4184460 01 7 2 9704700 01 3 8337840 81 9 1 4652980 gg 18 7 9587440 21 il 1 5863240 1 12 8 9164610 01 3 0451620 g1 14 4 147478D 29 15 1 595286D 06 16 1 173356h og 17 8 8842980 1 18 2 4553460 88 19 7 988228N 81 20 2 3132760 02 21 3 7989870 91 22 1 132591D g 23 1 132678D 20 24 3 8681750 89 25 2 4799440 00 26 1 2836510 08 2 996128D 89 CUSUM PROPAGATED VARIANCE 281 618 294 248 295 898 288 561 210 252 212 963 214 694 217 446 219 217 222 889 223 821 226 653 228 585 231 378 233 271 235 184 238 117 241 878 243 644 246 837 248 051 251 085 253 139 256 214 258 388 261 423 263 558 CUSUM SAMPLE VARIANCE 228 185 221 576 222 249 262 815 251 656 312 859 261 898 217 763 264 458 248 874 288 293 257 636 234 551 266 892 253 491 271 735 244 115 251 568 267 295 282 811 289 917 238 949 384 132 296 293 226 348 281 388 334 159 Fig S2T 8 0 01 1 6181 1 6181 1 6181 1 6181 1 6181 1 6181 1 6181E 1 6181 1 6181E
8. 18 FORMAT 1X 8A2 5X 4A2 KKK 20 3g 48 DIE www 50 6g READ AND PRINT TITLE FROM PV ARRAY FILE READ NPVIN 22 ITITLE 1 1 1 49 FORMAT 442A2 1 30 ITITLECI 1 1 48 WRITECNPROUT 4 ITITLE I I I 40 FORMAT PEE e ve Ke e e k e e e ae e k LER ERE SESE SESE ESE e Ya e SE Ya ie Ka e ee e e ke Wa e e e e 1 3X 40A2 Ye k k Ye e Ya Ye k je Ye e je je Ye e Tk Ye e YK Ye YK Yk e e k eve de e Ye Ye e Ye e e Ya Ya We ie e de e e je ee ye ye o ee FORMAT 1X 48A2 y W w W we w we W W W k K Ye ve ve ve ve ve k k e e e Ve e e Wa Wa e e i a Ya e Ya K k t e Ye e e Ye vie Ye Ye ve Ya Ye e Ya We e Ye Ye ae Ye We ae e Se Ye e Ye ie We ie c Wr Wa e c k READ INPUT DATA FROM MESDAT FILE e e Ve e W Ye Ye Ye We e ie Ve e e K le k K k a K a a Ya Ke Se k ka Ya Ya e le Ye e ge K le Ye We k Ya kr Ye c e n We k c e K Sk k W W k k CO W SK CALL BLANKSC6 READ NDAT 52 ITITLE ID 171 42 FORMAT 49A2 WRITE NPROUT 62DCITITLECID I 1 49 FORMATC 1X 49A2 IZE 9 IRNSCH 9 NRUN 1 NTRIN 1 ISPNTI 9 NBAL x1 NTRPBL 1 DT 1 MASPRT 9 ITIPRP 9 IMESPR3g ICLAPS 9 NPV 1 READ NDAT IBLANK READ NDAT IZE Fig D 1 cont 121 1638 1639 1649 1641 1642 1643 1644 1645 1646 1547 1657 1658 1659 1662 1661 1662 1663 1664 1665 1666 1667 1668 1669 1678 1671 1672 1673 1674
9. NOUT g DO 78 I 2 NBALP1 SMPVAR SUMSQ 1 PRPVAR S2CS 1 RATIO SMPVAR PRPVAR IVIOL 1 1 1 1 IFCRATIO LT X2LOW GO TO 5g IF RATIO LT X2UP GO TO 60 58 IVIOL 2 68 CONTINUE WEITECNPROUT 0 JIMI EE J 1 14 78 CONTINUE 88 FORMAT 3X 14 3X 1P014 6 3X G14 6 3X G14 6 3X G14 6 1 5X 14A2 RETURN END SUBROUTINE TRAN1 IPV ITRIN CARR RR RR MODELS TRANSFER WITH ONE MEASUREMENT C PARAMETER NBALMX 125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 12 NPVIMX 19 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 COMMON PVCOM PVI NBMXP3 NPVIMX PVT NTMXP2 NPVTMX IPVTRNCNPVMX COMMON VARY XI NBMXP2 NCIMX S2I NBMXP1 CVI NBMXP1 T NTMXP1 NCTMX XIM NBMXP2 NCIMX NMIMX2 TMCNTMXP1 NCTMX NMTMX S2TCNTRNMX CS NBMXP1 S2CS NBMXP1 TT NTRNMX XIT NBMXP12 S2IR NBMXP1 S2IB NBMXP1 S2TR NTRNMX SZTBONTRNMX TTSUMCNBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCALCNCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX NCITST NFSEED INTRNC ITRAN NPVMX IPVNO 5 NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOLC NPVMX HCCCB NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST MXP NNSTRM NCOLUM NCFRC ICFR A
10. NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX COMMON RUNCOM NRUN IRUN ISPNTI DIMENSION XMB NBMXP1 S2XMBCGNBMXP1 Teun 69 TRACE 300 SUM INDIVIDUAL INVENTORY AND TRANSFER COMPONENTS 19 24 3g wee RE 48 DO 10 T 1 NBALP1 XITC 1 8 DO 18 J 1 NCI XIT I X1T I XI I J CONTINUE DO 28 I 1 NTRN 12 0 DO 28 J 1 NCT TT 1I TT 1 T 1 3 CONTINUE I XI 521 T 52 MAT BAL S2XMB CUSUM S2CUS 1UM TTT TTT We Ya Ye Ya ye e Wk Ye ye ye e e e Ve TEEN COMPUTE CUSUM W ve We e Ye ve ve Ye ke Ya ve Ya e ve je Se se se Ya je ve ve ge ve We Ye e Ye e je Wa Ye We e e ve ve ye Ye Ya Se ve Ye ve e e ve e ve We K KK e e ve je k W e e k KO W oe k k CALL CUSUM CONTINUE IFCIRUN GT 1 GO TO 119 IFCIRNSCH GT 1 GO TO 118 NAAR COMPUTE MATERIAL BALANCES Fig 0 1 cont QD 1D 0 0 0 0 5 IN tat iam 1010 0 0 O Q 2 2 2 2 2 2 2 2 2 2 2 202 2203 2294 2285 2286 2207 2208 2209 2218 2211 2212 2213 2214 2215 2216 2217 2218 2219 2228 2221 2222 2223 2224 2225 2226 2227 2228 2229 2239 2231 2232 2233 2234 2235 2236 2236 2236 2236 2236 2237 2238 2239 2240 2241
11. gi 6 9389 81 6 6683 SAMPLE PROPAGATED s2T 1 85534 1 83747 1 86451 1 19744 1 11158 1 19987 1 19244 1 89761 1 28261 1 11197 0280PE 81 6 9111 6 9186 01 6 682E 81 6 6353 6 9186E 1 6 7882E 9186 2 6 63o3E 6 9186 81 6 76821 6 9186 81 5 6353 5 9186 81 6 76NZE 6 3186E 6 91 Bl B E55u3E 81 6 76820 91 6 1 6 6363 13 cont 8 9 78888E 92 01 gi EI 4 gi 91 01 81 EU 01 81 ED Bl BL Bt 81 81 gl gi MAT BAL 88g8E 91 9957E 82 9957E 92 9957E 92 9957t 92 9967 5 996 2 5 9960 1 22 9 99676 442 5 9967E i2 5 9967t 92 MAT BAL 8 80086 21 5 7452 5 7452E 81 5 7452 B 5 7452 81 5 7452F 1 5 452E 01 5 745et Bl 5 7452E 41 5 74528 81 5 7452t oi 8 133098E 03 1352537143 S2XMB 8 800 81 7 2418E 1 7 2551 1 7 2551 81 551E 51E 01 ai Zait 61 7 2551E ul 7 2551F dl Z 5518 vi S2XMB A030E 81 6 9111 01 6 9196E 01 918 01 6 9186E di B 91u6E vi 6 9186E d 9156 dl 6 9 9 41 6 91ubE 1 6 9185Ek 3 271783562 198909E 03 0 6008009 01 8 482898 81 CUSUM 9967 02 1993E 21 7998E 18 3987 01 9984 01 5950 1 19778 81 7974 01 5 2978
12. mac N Y NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC ITRANCNPVMX IPVNOC B NPVMX NTRIN ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX gt HCC S NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX 3NPV NCI NCT NMI NMT NSI NST NNSTRM NCOLUM NCFRC ICFR 4 lt NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX COMMON PVCOM 2 IPVTRNCNPVMX COMMON PVCOMS PVIS NBMXP3 NPVIMX PVTSCNTMXP2 NPVTMX COMMON MESPAR SIGMAE NPYMX SIGMAN NPVMX 2 SIGZEX NPVMX SIG2N NPVMX 2 MESTYP NPVMX INTCALCNPVMX 2 ISTRPVCNPVMX D IZE IMTI NCIMX NMIMX IMTT NCTMX NMTMX ISTRNRCNPVMX ISTRNSCNPVMX COMMON RUNCOM NRUN TRUN ISPNTI COMMON WORK X NTMXP2 3 TRACE 1988 ICINV 9 ICTRN 8 CALL ZERO IFCIZE EQ 2 GO TO 58 DO 48 II 1 NPVCNT I IPVNARCII IPVN NPVIT I IF IPVTRN I GT 0 GO TO 28 DO 18 J 1 NBALP2 PVICJ IPVNDSPVISCO IPVN CONTINUE GO TO 49 DO 38 J 1 NTRNP2 PVT J IPVN PVTSC J IPVN CONTINUE CONTINUE GO TO 118 CONTINUE DO 188 II 1 NPVCNT I IPVNAR II IPVN NPVIT I IFCIPVTRN 1 69 80 98 DO 70 J 1 NBALP2 PVI J IPVN PVIS J IPVN CONTINUE GO TO 122 CONTINUE ZERO OUT ARRAYS k e k e Ye a k k k e CONVERT PROCESS VALUES TO MEASURED VALUES CALL MEA
13. 1675 1676 1677 1678 1679 1689 1681 1682 1683 1684 51685 1686 1687 1688 1689 1698 1691 1692 1693 1694 1695 1696 1697 1698 1699 1788 1781 1782 122 78 kkk de dede 8g 98 188 118 128 138 148 Kee READ NDAT IRNSCH READ NDAT NRUN READ NDAT NBAL READ NDAT NTRPBL READ CNDAT READ NDAT READ NDAT ITIPRP READ NDAT IMESPR READ NDAT IPVPRT READ NDAT ICLAPS WRITE NFROUT 72 IZE IRNSCH NRUN NBAL NTRPBL DT MASPRT ITIPRP IMESPR PVPRT ICLAPS FORMAT 5X ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE IZE 12 SX FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH I2 SX NUMBER OF RUNS NRUN I4 SX NUMBER OF BALANCES NBAL 13 SX NUMBER OF TRANSFERS PER BALANCE NTRPBL 13 SX TIME INTERVAL DT FB 3 5X MASSAGE DEBUGG PRINT FLAG MASPRT I2 SX TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG ITIPR SP 12 7 5X PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR 12 8 SX PRINTOUT FLAG FOR INPUT PROCESS VARIABLES IPVPRT 12 9 5X ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN GT g gt I2 wxxxx x READ IN PROCESS DEPENDENT DATA We k We Ye Ye Ye Ye S EE SESE h YK r Ya YK Sk k k SESE SESE SS St Sta ve k K
14. 2995 9096 2997 02098 4099 2128 2121 8182 0193 8194 0105 2106 8107 0108 8189 0110 0111 0112 311 gi 01 81 01 21 gi 012 212 57122 wo di au 0125 8126 0127 0128 0129 9138 G G G IF NINV LE NINVMX 0GO TO 90 IDUM NINVMX WRITE 1 82 IDUM 80 FORMAT NUMBER OF INVENTORIES NINY IS LARGER THAN NINVMX 1 14 GO TO 168 99 IF NTRN LE NTRNMX GO TO 118 IDUM NTRNMX 1 100 IDUM 100 FORMAT NUMBER OF TRANSFERS NTRN IS ARGER THAN NTRNMX 14 GO TO 168 112 CONTINUE Wwawwwwwwwwwww COUNT UP NUMBER OF TRANSFER AND INVENTORY P V S NTRNPV g DO 128 1 IFC 0 1 128 CONTINUE NINVPV NPV NTRNPV IF NTRNPV LE 60 TO 148 IDUM NPVTMX WRITE 1 130 IDUM 139 FORMAT NUMBER OF TRANSFER P V S IS LARGER THAN 14 GO TO 168 148 IF NINVPV LE NPVIMX GO TO 180 IDUM NPVIMX 158 IDUM 150 FORMAT NUMBER OF INVENTORY P V S 15 LARGER THAN NPVIMX 4 169 WRITE 1 179 178 FORMAT 88 aaa AA RR e e RUN TERMINATED NO GO TO 358 182 CONTINUE WRITE 1 199 198 FORMATC ENTER TITLE READC1 208 C ITITLE 1 1 1 42 288 2 WRITE 6 288 ITITLE 1 1 1 40 wk ree CHECK FOR IPVTRN lt g IPTNEG DO 218 1 1 N
15. Dn Bo AB mo ga De 98 gg gg en 08 ga en 08 ga 06 pG 60 eu go 00 56 at el Pi EU 01 el gl 91 el 01 gl gl 21 81 31 RESULTS OF MONTE CARLO SIMULATION WITH 188 SAMPLES AIAAAAARERARARANAARARARARARARARARARAARA LECH CH1 SQUARE N 1 RATIO FOR 95X CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 34 736473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 4 8982130 23 3 498881 2 4 178171E 92 1 19445 OK 1 3687670 82 6 494947E 02 6 673788 92 1 82768 OK 3 1 5113540 02 9 189989 9 982821E 92 8 988446 OK 4 4 881990D 92 g 169888 8 165844 8 982588 OK 5 2 5393350 2 8 244788 8 264282 1 88982 OK 6 3 461915D 92 8 334588 8 359888 1 87861 H 2 1395790 82 439441 8 486818 1 89232 a 3 1311960 82 8 559281 8 627889 1 12118 OK 9 2 9524560 82 9 694121 8 756659 1 89813 18 1 5715780 82 843991 8 925688 1 89591 OK 11 4 273133D 82 1 88868 2 23954 1 12973 OK 12 3 1673940 82 1 18844 1 33268 1 12138 OK 13 1 6938310 82 1 38318 1 53882 1 19616 14 4 8417890 82 1 59298 1 79938 1 12398 OK 18 1 979237 82 1 81768 2 849889 1 12236 16 1 976359D 82 2 85728 2 33121 1 13315 17 2 368842D 82 2 31194 2 65347 1 14773 18 3 8925020 92 2 58158 2 91311 1 12842 19 3 9788350 82 2 86628 3 28614 1 14651 OK 28 2 5447370 83
16. Ks function of transfers only If the process is operating near a steady state condition then the initial and final inventories will be almost equal In addition the summation of the input and output transfers will be almost equal that is 79 1 10 I t I o I t and 27 4 Under these conditions the constants Kj Ky and K will be close to zero hence correlated inventory errors will have very little effect upon the CUSUM variance This important conclusion is valid for the simple UPAA shown in Fig A 1 Simi lar conclusions could be derived for more complicated UPAAs under steady state operating conditions Two zero mean random variables X and Y are said to be corre lated if E xy o Thus if inventories Ii and I have the same correlated error n then 2 El I E end the two inventories are correlated Similarly if an inven tory and transfer have the same correlated error then they are correlated In deriving Eq 5 all the inventories and transfers were assumed to have the same correlated error Thus all the inventories and transfers are correlated Among the constants K in Eq A 5 Kj is caused by correlations between dif ferent inventories whereas K3 and K4 result from inventory and transfer correlations Inventory variances caused by corre lated errors are taken into account by e The MEASIM code includes effects of correlat
17. Process Model Code Los Alamos National Laboratory report LA 8761 M March 1981 2 J T Markin 1 Baker and J P Shipley Implementing Advanced Data Analysis Techniques in Near Real Time Materials Accounting Nucl Mater Manage IX 236 244 1980 3 A Papoulis Probability Random Variables and Stochastic Processes McGraw Hill Book Company Inc New York 1965 4 M R Spiegel Probability and Statistics Schaum s Outline Series in Mathematics McGraw Hill Book Company Inc New York 1975 5 W J Dixon and F J Massey Jr Introduction to Statis tical Analysis McGraw Hill Book Company Inc New York 1969 145 Y U S GOVERNMENT PRINTING OFFICE 1982 0 576 020 119
18. 0465 0466 0467 0468 0469 8478 2471 0472 0473 0474 0475 0476 102 118 DO 48 J JST JF IF T J K EQ 2 GO TO A8 CALL MTFIX 4 J K L M XX1 CALL 4 IR KK L M XX2 CVXsCVX XKX 1 XX2 STSCK L M STSCKK L MD CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE S2TBSM I SS2TBSMCIO 2 CVX CONTINUE 1 1 1 CS I CS IM1 XIT IM1 XIT I TTSUM I IFCIRUN EQ 1 GO TO 119 DCSsDBLE CSCI SUM I SUM I DCS SUMSQ I SUMSQ I DCS 2 TO 228 CONTINUE CUSUM VARIANCE S2CST S2CST S21 1 1 521 1 S2TRSM 1 S2TBSM 1 FOCO tk TRANSFER COVARIANCE 129 138 149 159 169 178 189 DO 188 II 1 NTRPBL IRC IRC 1 IRCM1 IRC 1 IFCI EQ 2 GO TO 188 IFCIRC LT 3 GO TO 188 JF 1 2 NTRPBL TCV 8 DO 172 KK 1 NCT IFCTCIRCMI KK EQ 8 GO TO 178 DO 168 K 1 NCT DO 158 Lz1 NMT DO 148 M 1 NST IFCTCICK KK L LT M GO TO 149 JST JS OK KK L M JINT JF JST 1 IFCJINT LT NCAL CK L M2 2GO TO 120 YS K KK L M JF 1 GO TO 148 CONTINUE IF JF LT JST GO TO 148 DO 138 J JST JF IF T 9 K EQ B G0 TO 138 CALL MTFIX A J K L M XX1 CALL MTFIX 4 IRCM1 KK L M XX2 TCVsTCV XX1 XX2 STSCK LI M STSCKK L M CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE S2CST S2CST 2 TCV CONTINUE Ye o Se k e e je e k k e ee e INVENTORY COVARIANCE 198 XICV 2 DO 218 K 1 NCI Fig D 1 cont 8477 8478 8479 2482 24
19. 218 CONTINUE C TRANSFER CORRELATION INDICATORS IFsIS 3 Fig D 1 cont 137 On Oh On m r eo OO P Se f 628 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2659 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2653 2664 2665 2656 2667 2668 2669 2678 2671 2672 2673 2674 2675 2676 2677 2678 138 eOO00000 220 230 240 0 230 1 1 2 DO 230 Jz1 NST IF VTSCIS I J EQ 2 GO TO 230 DO 228 II IS IF TSCI II I J DO 228 JJ IS IF TCI II JJ I J CONTINUE CONTINUE NCFRC NCFRC 1 515 GO TO 338 CONTINUE Wwx TRANSFER AS PRODUCT OF CONCENTRATION AND WEIGHT CHANGE 250 260 278 280 290 300 CFI FF NPVT NPVT 3 NCT NCT 2 NMT 2 IS NCTNOW 1 DO 388 I 1 2 NCTNOW NCTNOW 1 DO 388 J 1 NMT 2 GO TO 258 IF J EQ 1 0GO TO 300 JJ JPNTRCI 2 NPVCNT NPVCNT 1 IPVNAR NPVCNT IPVN JJ NRNS NRNS ISTRNRCIPVNC2J 2 NRNS VTRCONCTNOWV J SSIGZECIPVNCJIJ D STR NCTNOW J SORT VTRINCTNOW J IMTT NCTNOW J MESTYP IPVN JJ DO 388 K 1 2 NCAL NCTNOW J K INTCAL I
20. BB 5 9462E 83 1 1787E m nwwwaawswwasawaasnananasanawaqawawanana RESULTS OF MONTE CARLO SIMULATION WITH 198 SAMPLES ENSSRANERAESERKSRRKARKORNEOHASARRORERSERSSRESHERSREATAAA CHI SOUARE N 1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 2 736473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 3 161461D 91 7 53416 9 38718 1 24595 2 5 8691210 81 28 4684 27 8989 1 31954 RATIO OUTSIDE INTERVAL 3 7 8051350 01 38 8149 42 3287 1 99032 4 1 1318210 98 62 5737 67 4899 1 87729 OK 5 9 8898490 01 91 7445 181 419 1 10545 6 1 1568110 88 126 327 142 979 2 23274 1 3535910 90 166 322 291 182 1 28959 OK 8 1 635189D Y8 211 729 251 653 1 18856 or 9 2 8265520 262 548 315 435 1 28144 18 2 0848990 88 318 279 393 534 1 23482 11 2 3191470 8 384 423 471 675 1 23987 12 2 488884D 88 447 478 557 128 1 24584 13 2 5666540 00 519 945 654 563 1 25891 14 2 685358D dd 597 824 751 526 1 25718 OK 15 2 803769D0 581 116 D44 364 1 23968 OK 16 2 7834 9D 0 769 818 953 715 1 23888 17 3 295523 88 863 933 1888 69 1 25079 OK ig 3 837237D 8A 953 461 1189 90 1 23503 19 3 4643160 8 1868 48 1383 69 1 22822 2 3 3161180 90 1178 75 1444 85 1 22575 OK Fig 19 cont M l 88 Bi gl gi 71 is artificially set to zero to allow for modeling of the output transfer as previously dis
21. 1 6181 1 6181 1 6181E 1 6181 1 5181E 1 6181E 1 6181 1 6181 1 6181 1 6181 1 6101 1 6181E 1 6191E 1 6191E 1 6181 1 5181 1 6181 1 6101 J 5121E 1 6181E 1 6181 1 61g1E 1 6101 1 6101 1 6181 1 6181E 1 6181 1 6191 1 6181E 1 6181E 1 6101 1 6181 1 6181 1 6181 1 6131E 1 61g1E 1 6181E 1 5181E 1 181 1 6181E 1 6101E 10 gc 9g gg gg ge BAL 0 01 2 088 01 2 6000 83 8 0080 01 2 6098E 83 8088E 91 2 6888E 03 8948E 81 e 8808E 03 6 0000 r 2 6000 03 0 8098U9E B1 2 6888E 83 0 000 01 2 6888E 83 8888E 1 2 5080E 03 9 0090 01 2 6888E 83 9 0008E 21 2 680DE H3 D BBBBE B1 2 6808E 03 0 8008E 81 2 6000 03 0 0800 81 2 6888E 83 8 08000 2 6880 03 8 20898E 81 2 6800E 03 2 0000 081 2 6888E 23 0 0090 81 2 6080 03 8 0000 01 2 6000 03 8 8808E 81 2 B LBBLE 01 1 0000 04 9 0898 81 2 6000 03 6 0000 81 2 608 03 8 0000 81 2 B889E 03 8 0000 01 2 6888E 03 B 8880t 81 2 6808 03 8 8080 0 2 6808E 03 M B0B9E B1 2 6880E 03 8 0000 01 2 6P808E 03 8 8888 81 2 60080 03 0 0090 01 2 6000 03 8 0988E 81 2 6800E 03 8 ABBBE B1 2 6088E 03 8 0088E 21 2 6880 03 0 9000 01 2 68908E 03 8 8002E 81 2 6800E 83 6 00086 81 2 6808t 03 2 0 0 1 2 6 80 03 8 0000 81 2 6800 03 G0 8028E 1 2 6808E 83 0 0880 01 1 8888t 84 8 8088L 21 2 6H78E 83 B BOBBE 81
22. 18 FORMAT RUN TERMINATED IN SUBROUTINE INV2 WITH ICINV NCITS 1T PROCESS VARIABLE NUMBER 13 CALL CLOSEM 28 CONTINUE DO 60 251 2 IPVJ IPV J IPVTI NPVIT IPVI IFCIPVTRNCIPVJ EQ 2 0GO TO 48 DO 30 I 1 NBALP2 ITCz1 I 1 NTRPBL XIMCI ICINV JOzPVTCITC IPVTI 38 CONTINUE GO TO 68 44 CONTINUE DO 50 I 1 NBALP2 XIMCI ICINV J OsPVICI IPVTI 58 CONTINUE 62 CONTINUE DO 78 I 1 NBALP2 XI I ICINV XIM 1 ICINV 1 XIM 1 ICINV 2 78 CONTINUE 82 RETURN END SUBROUTINE MASAGE 18 1T 111 COMPUTES VARIANCES AND COVARIANCES FOR INDIVIDUAL KEK TRANSFER AND INVENTORY COMPONENTS PARAMETER NBALMX 185 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXPIZNTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 12 NPVTMX 8 NCIMX z18 NCTMX 8 NMIMX 2 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 26 4 NCOLMX 2 PARAMETER DEFINITIONS NBALMX MAXIMUM NUMBER OF BALANCES NP VMX MAXIMUM NUMBER OF PV VARIABLES NCIMX MAXIMUM NUMBER OF INVENTORY COMPONENTS NCTMX MAXIMUM NUMBER OF TRANSFER COMPONENTS NMIMX MAXIMUM NUMBER OF INVENTORY MEASUREMENTS NMTMX MAXIMUM NUMBER OF TRANSFER MEASUREMENTS NSIMX MAXIMUM NUMBER OF INVENTORY SYSTEMATIC ERRORS NSTMX MAXIMUM NUMBER OF TRANSFER SYSTEMATIC ERRORS NCMX MINIMUM OF NMIMX AND NMTMX MXPMX MAXIMUM OF NSIMX AND NSTMX Fig D 1 cont 8783 0704 0705 0706 2797 2788 0709 8718 07112 0712
23. 2241 2241 2241 2241 2241 2241 2242 2243 XMB 1 98 E9 S2XMB 1 8 IT 1 DO 58 I 2 NBALP1 XMB I XIT I 1 XIT I TTSUM I S2XMB I S2I I 1 S2I I 2 CVI I 1 S2TRSM I S2TBSM I 59 CONTINUE WRITE NPROUT 69 IFC ISPNTI EQ 9 WRITE CNPROUT 78 IF ISPNTI NE WRITE NPROUT 88 ISPNTI WRITE NPROUT 97 68 FORMAT IHI 78 FORMAT SUMMARY FOR ALL INVENTORIES AND TRANSFERS 80 FORMAT SUMMARY FOR INVENTORY AND TRANSFER NUMBER I2 99 FORMAT A WRITE NPROUT 32 DO 190 I 1 NBALPI 5250 52 5 1 52 5 1 1M1 1 1 199 WRITECNPROUT 12 IMI XIT CID S2ICIO CVICIO TTSUMC I2 S2S8UM XMB I S2XMB CID CS CIQ S2CS CID WRITE NPROUT 98 NBAL 98 FORMAT 1H1 COMPARISON OF SAMPLED AND PROPAGATED VARIANCES OVER TH 1 14 MATERIALS BALANCES SYSTEMATIC ERRORS SHOULD BE SET TO 1 ZERO FOR BEST COMPARISONS WRITECNPROUT 100 189 FORMAT 6X INVENTORY WRITE NPROUT 112 821S S2IA 110 FORMAT 11X SAMPLED VARIANCE iPD14 6 1 11X AVERAGE PROPAGATED VARIANCE 1 14 6 WRITE CNPROUT 1248 120 FORMAT 6X TRANSFER WRITE NPROUT 119 S2TS S2TA WRITE NPROUT 125 125 FORMAT 6X MATERIALS BALANCE WRITE NPROUT 118 82X4MBS S2XMBA 118 CONTINUE 120 FORMAT 1X 14 2X 18 1PE12 4 RETURN END SUBROUTINE READEM IPV c ce e k e e e de e e e oe Ye e Wa ik k e e e e e ee e Ye e ole RC cc
24. 2910 0911 2912 0013 0014 9915 0016 0917 8818 0019 2920 2921 0922 09923 0024 0025 5126 2927 0028 9929 0930 8831 29032 2033 2934 0035 0936 8837 9238 2939 8048 0041 9942 8843 8944 0045 0046 2847 8848 9249 8838 WICH 0052 0053 0054 0055 0056 0057 0058 8959 0868 8061 8062 02063 8064 1 90 0040000 PROGRAM PVGEN SRR RNR e e e e wm wm www x COMPUTES PROCESS VARIABLE ARRAYS FOR INPUT TO MEASIM CODE INPUTS IN ORDER OF OCCURRENCE NPV NINV NTRN CIPVTRN 1 1 1 NPV FREE FORMAT NUMBER OF PROCESS VARIABLES NUMBER OF INVENTORIES FOR EACH INVENTORY NUMBER OF TRANSFERS FOR EACH TRNASFER P V TRANSFER INDICATOR ARRAY I INDICATES A TRANSFER C 1 1 1 NPV PROCESS VARIABLE VALUES PARAMETER 12 10 8 105 NTRNMX2515 PARAMETER DEFINITIONS NPVMX MAXIMUM NUMBER OF NPVIMX MAXIMUM NUMBER OF NPVTMX MAXIMUM NUMBER OF NINVMX MAXIMUM NUMBER OF NTRNMX MAXIMUM NUMBER OF PROCESS VARIABLES INVENTORY PROCESS VARIABLES TRANSFER PROCESS VARIABLES INVENTORIES FOR EACH INVENTORY P V TRANSFERS FOR EACH TRANSFER P V PVICNINVMX MPVIMX ITITLE 48 DIMENSION C NPVMX NPVCT NP MX IPVTRNONPVMX I
25. 3 8 00007 01 0888 91 B BRUBE 81 1 1 6163bE l 1 6451 01 8 0398 03 3B9 88J0J E 81 22 02080E 91 0088 61 2 1 6163 81 1 6451E 81 8 8308 03 0 0088 01 0888 8 1 8 0820 1 3 1 6163E 1 1 6451E Z1 8 0398 03 B 880RE 81 0 09000 01 B UNCOL 41 4 1 6163E 01 1 6451E 91 8 8398 83 2 90800E 801 9 0000 01 1 S JGCOE g1 5 1 6163 1 1 6451E 81 8 0398 3 28 8 579E 01 8 9580E G1 G8 20000r 01 6 1 6163bE 01 1 6451 1 8 0398E 03 8 LUBLE D1 988 81 8 H 1 6163E 1 6451 1 8 A394 93 0 1 8008 01 8 7091 21 8 1 6163E 1 1 6451 81 8 398E 83 0 0000 01 atl 9 1 6163 91 1 6451E 81 8 398 03 0 0 092 01 8 gpnut ui 1 6163E l 1 645tE 21 8 0390 3 4 OUBUE 41 1 6 80 81 CEEE EE E ELELEE EE LGT RESULTS OF MONTE CARLO SIMULATION WITH 188 SAMPLES WARRRNRMETQNWASTNERTATRNAYAROENEMNNENENENSEAXF AnwENRERAMTREARNRERTA CH1 SQUARE LN 1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 736473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 4 9746906D 82 8 312945 8 284804 8 987528 2 3 4748340 02 8 212945 8 393534 1 25752 3 5 5763360 92 8 312945 8 248648 8 794543 4 2 612787D 82 9 312945 8 268862 8 856578 5 2 4981870 02 8 312945 8 293676 8 938429 5 3 7647610 82 8 312945 8 222961 8 712462 7 5 58424 0 03 8 312945 8 342351 1 89397 8 9 8816320
26. 3819 3828 3021 3022 3023 3024 3025 3226 3027 3828 144 EQUIVALENCE X 1 1 W ve ve ve se c ve de ve ee xv FLOW RATES NBALP3 NBALP2 1 IPVTI1 NPVIT IPV 1 IPVTIZRNPVIT IPV Z DO 10 I 1 NTRNP2 IP1 I 1 C I PVT IP1 IPVTI1 FCI PVTCIP1 IPVTI2 18 CONTINUE CONZITRAN CITRIN DT 3 DO 28 1 2 C 1 C I CON 20 CONTINUE IC1 ICTRN 1 IC2 ICTRN 2 IC3 ICTRN 3 IC4 ICTRN 4 ICTRN IC4 IF ICTRN LE NCT GO TO 4g 1 30 WRITECNPROUT 3 39 FORMAT A CALL CLOSEM 40 CONTINUE DO 58 I 1 NTRNP1 IP1 1 1 TM 1 1C1 1 C 1 TMCI ICI 2 8F I TM I IC2 1 C I TM I IC2 2 F I TM I IC3 1 C I TM 1 IC3 2 F I TM I IC4 1 C I TM I 1C4 2 FC1 5g CONTINUE aan DO 88 I 1 NTRNP1 DO 62 J IC1 1C4 TCI J 8TMCIIJ 1 TMCI 2 2 68 CONTINUE RETURN END SUBROUTINE TRANACIPV ITRIN XC1 2 F DETERMINE MEASURED VALUES FOR CONCENTRATIONS AND MULTIPLY THE CONCENTRATIONS BY A CONSTANT OOOO RR RR FORM THE 8 TRANSFER MEASUREMENTS RUN TERMINATED IN SUBROUTINE TRAN3 WITH ICTRN MET PROCESS VARIABLE NUMBER 13 FORM THE FOUR TRANSFER COMPONENTS MODELS THE PRODUCT OF CONCENTRATION AND THE DIFFERENCE Coe ier ie e e e IN WEIGHTS G FI FF C C WHERE Fig 0 1 cont REFERENCES 1 E Kern and D P Martinez Users Manual for
27. 8839 0040 8941 8942 9943 9044 9945 8846 8847 2048 9849 2058 8851 8052 8053 8054 0855 ve he vie ie ie ve W we we ve ve e e vee www w wwwww HORROR NONI Cwwwwwwwwww MEASUREMENT CODE FOR MODIFIED COPRECAL MODEL O 000000000 PARAMETER NBALMX 125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 PARAMETER DEFINITIONS NBALMX MAXIMUM NUMBER OF BALANCES NP VMX MAXIMUM NUMBER OF PV VARIABLES NCIMX MAXIMUM NUMBER OF INVENTORY COMPONENTS NCTMX MAXIMUM NUMBER OF TRANSFER COMPONENTS NMIMX MAXIMUM NUMBER OF INVENTORY MEASUREMENTS MAXIMUM NUMBER OF TRANSFER MEASUREMENTS NSIMX MAXIMUM NUMBER OF INVENTORY SYSTEMATIC ERRORS NSTMX MAXIMUM NUMBER OF TRANSFER SYSTEMATIC ERRORS NCMX MINIMUM OF NMIMX AND NMTMX MXPMX MAXIMUM OF NSIMX AND NSTMX NSTRMX MAXIMUM NUMBER OF RANDOM NUMBER STREAMS NCOLMX MAXIMUM NUMBER OF PULSE COLUMNS INTEGER 4 ISEED LSEED DOUBLE PRECISION SUM SUMSQ DIMENSION ITIME 4 INTEGER 2 PVARA DCNLIN COMMON SAMPLE SUM NBMXP 1 SUMSQ NBMXP1 COMMON SEED ISEED NSTRMX LSEED NSTRMX COMMON C
28. IC IA MIC COMMON SEED ISEED NSTRMX LSEED NSTRMX DRAND IS A UNIFORM RANDOM NUMBER GENERATOR BASED ON THEORY AND SUGGESTIONS GIVEN IN D E KNUTH 1969 VOL 2 THE INTEGER ISTRM SHOULD BE INITIALIZED TO AN ARBITARY INTEGER PRIOR TO THE FIRST CALL TO DRAND THE CALLING PROGRAM SHOULD NOT ALTER THE VALUE OF ISTRM BETWEEN SUBSEQUENT CALLS TO DRAND VALUES OF DRAND WILL BE RETURNED IN THE INTERVAL 9 1 DOUBLE PRECISION HALFM DATA 2 1073741824 1 0 2 14 843314861 1 453816693 S MIC 169366955 DATA HALFM 18737418240D 190 S 4656613E 09 PARAMETER M2 1273741824 ITWO 2 A 843314861 IC 453816693 MIC 169366955 107374182400 10 5 4656613 09 IFCISTRM GT 2 GO TO 30 IFCISTRM LT 8 GO TO 28 WRITE 1 10 WRITE NPROUT 18 18 FORMAT YOU HAVE CALLED DRAND WITH ISTRM 9 ooo nac RUN TERMINATED CALL CLOSEM 28 ISTRGz ISTRM LSEEDCISTRG ZzISEED CISTRG RETURN 38 ISTRG ISTRM COMPUTE NEXT RANDOM NUMBER LSEEDCISTRG LSEEDCISTRG IA LSEEDCISTRG LSEED ISTRG IC THE FOLLOWING STATEMENT IS FOR COMPUTERS WHERE INTEGER OVERFLOW AFFECTS THE SIGN BIT IF LSEED ISTRG LT 9 LSEED ISTRG LSEED ISTRG M2 M2 DRAND FLOAT LSEED 1STRG S 40 RETURN END SUBROUTINE INVENTORY MODEL WITH ONE MEASUREMENT PARAMETER 185 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 1
29. RNSMES 6 9 0 0 9176 CALL SRCHS A DCNLIN 6 12 2 2 8177 CALL SRCHSS 4 MESOUT 6 11 9 8 8178 CALL EXIT 2179 RETURN 2188 END 2181 SUBROUTINE COLUMN IPV IC IT 182 0183 COMPUTES INVENTORY COMPONENTS FOR THE COLUMNS 8184 C 8185 C THE GENERAL COLUMN INVENTORY EQUATION IS OF THE FORM g186 C 8187 1 CW CON 2 3 4 5 6 9188 8189 WHERE 21928 FEED CONCENTRATION 01919 WASTE CONCENTRATION g192 CP PRODUCT CONCENTRATION g193 C VORGT VOLUME OF ORGANIC TOP SECTION 9194 VAQB VOLUME OF AQUEOUS BOTTOM SECTION 8195 CON 1 CON 6 CONSTANTS FOR A SPECIFIC COLUMN 0196 2197 THE PROCESS VARIABLES ARE CF CW CP VORGT AND VAQB 2198 C THE MEASURED VALUES ARE CF CW AND CP 0199 8208 g281 C CALLING ARGUMENTS 8282 IPV PROCESS VARIABLE NUMBER FOR FIRST PROCESS VARIABLE CF 92039 C IC COLUMN NUMBER 0204 IT COLUMN TYPE 0205 EQ 1 A TYPE COLUMN g286 C EQ 2 B TYPE COLUMN 8287 C EQ 3 S TYPE COLUMN 298 EQ 4 2 TYPE COLUMN 9289 8218 2211 PARAMETER 105 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 8211 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXPL NTRNMX 1 NTMXP2 NTRNMX 2 8211 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 18 NCTMX 8 NMIMX 2 8211
30. WRITE NDECIN 89 TM 18 1 9 9 1 NMT 1I WRITE NDECIN 92 0IT IFCIB NE 1 GO TO 122 IFCIT NE 1 GO TO 188 J NMI 151 941 1 C Wwwwwwwwwwwww CONVERT VARIANCES TO STANDARD DEVIATIONS FOR INPUT DECANAL C 89 9g 198 118 128 139 149 WRITECNDECIN 86 2 9 1 151 WRITECNDECIN 88 9 9 1 I21 NCT WRITE NDECIN 80 SIS I J K K 1 NSI J 1 NMI I 1 NCI WRITE NDECIN 80 STS I J K K 1 NST Ja1 NMT I 1 NCT WRITE NDECIN 902 ICI I 11 J J 1 NMI 11 1 NCI I 1 NCI WRITE NDECIN 90 TCI I 11 J J 1 NMT 11 1 NCT I 1 NCT WRITE NDECIN 90 ITCI I1 11 J J 1 NC 11 1 NCT I 1 NCI WRITE NDECIN 99 1SCI 1 3 J 1 NMI I 1 NCI WRITE NDECIN 998 TSCI 1 3 J 1 NMT I 1 NCT FORMAT 8G15 7 FORMAT 2414 CONTINUE ITM1 IT 1 ITP1 IT 1 IF III NE 1 GO TO 198 IBP1 IB 1 INVENTORY MEASUREMENTS XINVT 4 DO 118 11 XINVTEX1CIB VARIANCE OF TOTAL RANDOM INVENTORY ERROR VTIR 8 DO 128 I 1 NCI DO 128 J 1 NMI CALL MTFIX 1 IB I J IDUM XX1 VTIRZVTIR XX1 2 VIR I J COVARIANCE OF INVENTORY SYSTEMATIC ERRORS DO 148 I 1 NCI DO 148 I1 1 NCI DO 148 J 1 NMI 1 11 9 IF KF EQ 2 GO TO 148 DO 138 Kz1 KF CALL MTFIX 2 IB I J K XX1 CALL MTFIX 2 IB II1 J K XX2 CVISCI I1 J9 K XX1 XX2 SISCI J K SISCIL J K CONTINUE CONTINUE COVARIANCE BETWEEN SUCCESSIVE INVENTORY SYS
31. gl gi gl gt 01 gl gl gl gl EU gi gl gi gl gi DI gi gi 81 EU gi gi gi EU EA 21 Bt 521 1 9808 82 GORGE B2 1 B2 1 BBDE B2 1 8880F 02 1 820BE 22 1 7B8BE 02 1 0808 82 1 0000 02 1 9888E 02 1 0000 02 1 0000 02 1 0000 02 1 80888E 82 1 8888t 82 1 008 82 1 0090 02 1 8088 2 1 8808E 82 1 8888E 82 1 2888E 22 1 0000 02 1 080 02 1 2 1 0888E 02 1 8000 02 1 0808 02 1 8888E D2 1 8888E 82 1 8888E 02 1 0000 02 1 8288E 82 1 0000 02 1 0888 82 1 8880E 02 1 8888E 02 1 0002 02 1 0000 02 1 8298E 02 1 0080E 82 1 0000 02 1 0000 02 1 060 02 1 8888E 02 1 8008L 922 1 0898E 22 1 0820E 22 1 2090E 02 1 0002 02 1 0000 02 1 8888E 82 8 886UE 2t 8 8808 2 g 8888E 21 8 0888E 21 1 8 8808E 81 9 8808C 9B1 0880 01 8 B008L 81 1 9 8888E 81 B 8088E 01 1 8 8880 81 81 g 8888E 81 g 8299E 81 8 808890E 81 8 00 8 01 8 8008 21 9 8889E 81 8 8888E 21 9 80890E 91 8 008 01 g 09g8E 2I 9 8808E 81 8 0008 01 8 88088E 2l 0 0080 01 0 0008 01 8 0080 01 9 0008E 21 9 0000E 21 B 0880E g1 9 0008 G1 9 8088E 81 1 8880E 81 4 2089 01 e 8080E 21 8 0 08 01 8 90M8 lt 81 8 BABRE AL 0800 01 2 9000E 21 8 0808 01 g BBANE G1 g 0805c 91 B 880HL R1 8 8908E 21 29
32. so the user can verify their correctness The initial random number seeds appear next These ten digit integers are read in from a separate file as discussed in Sec IV C The main output summary table follows at the bottom of p 2 Fig 3 Most of the important information concerning the process and the measurements can be found in this table Each line cor responds to a materials balance The column headers are defined as follows 33 I materials balance number XI inventory S2I inventory variance CVI covariance between adjacent inventories T net transfer S2T transfer variance covariance between adjacent transfers MAT BAL materials balance S2XMB materials balance variance CUSUM cumulative summation of materials balance CUSUM S2CUSUM CUSUM variance Variances rather than standard deviations are printed in the table to make quick handchecks much simpler because variances are addi tive whereas standard deviations are not The table on p 3 of the output file is present only when the code is run in the Monte Carlo mode This occurs when the number of runs NRUN is set greater than 1 on the input file In this case the sample CUSUM variance is computed each materials balance and compared with the propagated that is calculated directly from the variances and covariances of the inventories and transfers The CUSUM propagated and sampie variances appear in columns 3 and 4 respect
33. variable file The next recommended step is to establish the input data defining the process perhaps by first defining each inventory and transfer set in the UPAA through the ITIN array see Table VI The order of occurrence in the ITIN array defines the numbering system for the inventory and transfer sets With ITIN estab lished the remaining inputs required to define the UPAA should be relatively easy to determine The number of process variables is NPV whereas the number of transfer and inventory sets is NTRIN that is the number of elements in ITIN The process vari ables associated with each transfer and inventory set are input 74 to the IPVNO array by means of the user defined numbering system If the user desires to calculate the entire UPAA ISPNTI should be set to zero For isolated calculations of one transfer or inventory set ISPNTI should be set to the number of that partic ular set In the first portion of the input data the number of runs NRUN should be set to l1 for a normal measurement calculation and to a value greater than one for a Monte Carlo simulation NBAL specifies the number of balances and NTRPBL the number of transfer measurements per balance period All transfers in a given UPAA must have the same frequency The input DT defines the time interval between flow rate calculations and is of impor tance only for transfers computed from the product of flow rate and concentration The third input file to th
34. wwwexkxkk ECHO CHECK PROCESS VARIABLES IFCIPVPRT EQ 8 GO TO 3398 WRITE NPROUT 284 Fig D 1 cont 123 ANS SS O O CO J OY gt Q F www Set De Set Se OONNNNN a w NN Re t 29 00 3 01 I CO M e e wn m 1831 1832 124 aaa 28g 298 300 318 328 338 342 rege eee SECHS OUTPUT PROCESS VARIABLE FILE g KT g DO 320 1PV 1 NPV WRITE GNPROUT 298 0CIPVTICI IPV Ix1 32 FORMAT 1X 32A2 NFC2NPVCT IPV IFCIPVTRNCIPV GT 2 G0 TO 310 KI KI 1 WRITE NPROUT 302 18 1 Isi FORMAT 12E12 4 GO TO 322 KT KT 1 WRITE NPROUT 3988 MPVTS 1 KT 1 1 NFC CONTINUE CONTINUE WRITE NPROUT 349 FORMATE PEK i We e e e de A e e WE A e We Ve We Ve Ve e WE he Ve ak E E VE WE A I V We Ve We N Ve We WE e e N e e e e e e 1 IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS CALL SETMAS WRITECNPROUT 358 NPVCNT NPVI NPVT NCI NCT NMI NMT NSI NST NNSTRM NCOLUM 359 368 FORMAT 5X NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPVCNT x I3 5X NUMBER OF INVENTORY PROCESS VARIABLES NPVI x I3 5X NUMBER OF TRANSFER PROCESS VARIABLES NPVT IS3 5X NUMBER OF INVENTORY COMPONENTS NCI 13 5X NUMBER OF TRANSFER COMPONENTS NCT x 13 5X NUMBER OF INVENTORY MEASUREMENTS NMI 13 5X NUMBER OF TRANSFER MEASUREMENTS NMT x I
35. 0249 0250 0251 0252 0253 0254 8255 0256 8257 9258 8259 2262 8261 8262 2263 9264 9265 8266 0267 0268 8269 2278 8271 8272 8273 8274 8275 0276 0277 0278 0279 0280 0281 0282 9283 8284 8285 8286 2287 2288 2289 0290 8291 COMMON WORK X NTMXP2 3 mee COMPUTE MEASURED VALUES FOR CF CW AND 10 20 30 40 1 1 1 2 XCI 3 CP I ICINVS ICINV DO 40 J 1 3 IPVJ IPV J IPVTI NPVIT IPVI IFCIPVTRNCIPVJ EQ 2 GO TO 28 DO 18 I 1 NBALP2 ITC 1 1 1 NTRPBL X 1 J PVT ITC IPVTI CONTINUE TO A8 DO 30 I 1 NBALP2 X 1 3 PVI 1 IPVTI CONTINUE CONTINUE MOR COMPUTE THE COLUMN CONSTANTS 50 GO TO 50 60 50 60 1 CONTINUE A OR S COLUMNS 62 CON 1 HCC 1 IC HCC 4 IC CCC 3 IC CON 2 VCC 2 IC CON 3 HCC 2 1C HCC 3 1C HCC 5 1C CCC 1 IC CON 4 1 CON 5 2 1 CON CB VCC 2 IC CCC 2 IC HCC 3 IC GO TO 78 CONTINUE TYPE OR Z COLUMNS 78 82 90 100 CON 1 HCC 2 IC HCC 5 IC CCC 3 IC CON 2 VCC 1 IC CON 3 HCC 1 IC HCC 3 IC HCC 4 IC CCC 1 IC CON 4 CCC 2 IC CON 5 HCC 3 IC VCC 2 IC CON 6 VCC 1 IC CCC 2 IC HCC 3 IC CONTINUE DO 88 J 1 3 ICINV 1ICINV 1 DO 80 1 1 NBALP2 XIM 1 ICINV
36. 1 X 1 J CON J XI 1 ICINV XIM I ICINV 1 CONTINUE IF ICINV LE NCITST GN TO 18g WRITE 1 99 IPV MRITE NPROUT 98 IPV FORMAT RUN TERMINATED IN SUBROUTINE COLUMN WITH ICINV NCI ITST PROCESS VARIABLE NUMBER I3 CALL CLOSEM CONTINUE wwwwwwwwkwkwwwww ADD NON MEASURED TERMS TO THE LAST INVENTORY COMPONENT IPVTI4 NPVITCIPV 4 Fig D 1 cont 99 0242 0293 0294 8295 8296 8297 0298 8299 0300 0301 2302 0303 83804 0305 8386 0307 0308 0309 2318 9311 0312 0313 8314 2314 8314 8314 8314 2315 8316 2317 9318 0319 03202 0321 0322 0323 0324 0325 0326 0327 2328 8329 2330 8331 0332 0333 0334 9334 0334 8334 8334 8334 8334 8335 8336 0337 8338 2339 348 0341 0342 0343 0344 0345 0346 100 e 118 128 138 www IPVTIS NPVITCIPV S DO 118 I 1 NBALP2 XICI NCI XICI NCIOSPVICI IPVTIA4 CONCA PVICI IPVTIS CON S CON 6 XIM 1 NC1 1 XI 1 NCI CONTINUE IF NMT EQ 1 GO TO 134 JS ICINVS 1 DO 128 I 1 NBALP2 XIMCI NCI 2 71 DO 128 J JS ICINV XIMCI J 2 71 CONTINUE RETURN END SUBROUTINE CUSUM Ye ve ve Ve ve e e e e Wa e e Ye kc ke e c Ya ke c e e Ye e e t oe ge e e ye e Ce e e ye Ye Ya Yk e ve e ESE RSS e e Wa e e e k Ve k e ke k k k Kk COMPU
37. 2 XX1 XX2 STR NCOMP1 1 STR NCOMP2 1 CONTINUE CONTINUE COVARIANCE OF TRANSFER SYSTEMATIC ERRORS DO 299 I 1 NCT 298 I1 1 NCT DO 290 J 1 NMT KF TCI 1 11 3 IF KF EQ 2 GO TO 298 DO 288 K 1 KF CALL MTFIX A IT I J K XX1 CALL MTFIX A IT I1 J K XX2 CVTSC1 11 9 K amp XX1 XX2 STSCI J K STSCI1 2 K CONTINUE CONTINUE IF INTRNC EQ GO TO 348 COVARIANCE BETWEEN INVENTORY AND TRANSFER SYSTEMATIC ERRORS MIN MINZ NSI NST JJ MIN NMI NMT DO 318 I 1 NCI DO 318 I1 1 NCT DO 318 J 1 JJ 1 11 2 IFCKF EQ 8 GO TO 318 DO 388 K 1 KF CALL MTFIX 2 IB I J K XX1 CALL MTFIX A IT II J K XX2 CVITS 1 11 3 K XX1 XX2 SIS 1 3 K STS 11 J K CONTINUE CONTINUE COVARIANCE BETWEEN TRANSFER AT TIME K AND INVENTORY AT TIME 1 329 338 349 359 368 MAX MAX8 NSI NST 338 I 1 NCI DO 338 J 1 NMT DO 338 K 1 MAX IF CVSISCI J K LT 1 E 9 GO TO 338 DO 328 11 1 IFCCVITSCI IL J K EQ 2 GO TO 328 CALL MTFIX 2 IBP1 I J K XX1 CALL MTFIXCA IB II J K XX2 XCVITS 1 11 3 K XX1 XX2 S1S 1 J K STS 11 J K CONTINUE CONTINUE CONTINUE COVARIANCE BETWEEN SUCCESSIVE TRANSFER SYSTEMATIC ERRORS DO 368 I 1 NCT DO 368 J 1 NMT KF TSCI 1 J IF KF EQ 2 GO TO 368 DO 350 K 1 KF CALL 4 1 1 1 2 1 CALL MTFIX A4 IT I J XX2 CVSTS 1 J K XX1 XX2 VTS 1 3 K CONTINUE CONTINUE DO 388 I 1 NCT DO 388 J 1 NMT Fig D 1 cont 111 1922 1023 1024 1925
38. 2 6888E 803 1 2 6080E 03 8 0008 01 2 68088E 03 0 00 80 0 2 6888r 83 8 BOBBE A1 2 6008 03 1 2 6888E 83 0 RIB0F 81 2 6088E 83 2 000 01 2 60 98E 83 9 0888E 8I 2 6888E 23 I BABLE 81 RATIO SAMPLE PROPAGATED 1 13181 1 9848B 1 87945 1 26 13 1 19632 OK 1 46520 1 21987 1 88146 1 28634 1 12181 1 28895 1 13678 1 82646 1 15093 OK 1 88658 1 15852 1 82519 1 04351 1 29978 1 14947 1 16878 OK 8 919892 OK 1 28144 OK 1 15643 8 876260 1 87606 1 26788 cont S2XMB 8 0000 01 2 161 2 8161E NNNNNNNNNNNNN 2 0161 2 161 2 8161E 2 8161E 2 8161E 2 161 2 1 1 2 B8161E 2 8161E 2 8161E 2 8161E 2 8161E 2 M161E 2 8161 2 8161E 2 8161E 2 81BIE 2 2161E 2 8161E 2 8161E 2 8161E 82 ge 92 CUSUM 0000 0 B BBBDE D 9 0000 01 0 0000 01 8 BEBBE B 0 0080 01 1 B 88POE 21 0080 81 8 0080 81 8 8880 0 8 8000 01 0 08000 01 2 OBADE 8 DEL ICH g ABBLE 91 8 0090 01 8 0890 01 8 9000 01 8 0990F 81 9 8008E 2 8 0090 01 8 0800 01 8 0000 01 g 8888E 21 8 0888E 0l 9 8806 81 0 0020 91 8 0880E 8 0000 8 2 0000 01 8 0000 81 8 8088E 21 8 8000 01 0 80 01 8 Gpunt gi FOBAE 81 8 0888 01 8 0098 g 088DE 21 g 88RHUE 81 B 9NIGE 81 B AB
39. 22 8 312945 8 393477 1 25734 9 2 2782570 02 8 312945 8 285689 8 912658 18 1 4236870 02 8 312945 8 334486 1 86883 SUMMARY FOR INVENTORY AND TRANSFER NUMBER 3 I RI 521 Cyi SZT D 1 5946 48 4 B27BE 2 1 2738 93 0088 0800 81 0888 81 1 1 5946E 88 4 8270 02 1 2738 03 0 0008 088 81 0008 01 2 1 59466 00 4 8278 02 1 2739 83 B 8888E Bi 2 0080t Ol B 082P0E 0 3 1 5946E 98 4 8278E 82 1 2738 03 0 0880 0 2 0000E 81 8 8880 1 4 1 5946E 7 4 8274 02 1 2738 03 0 8008 8 888 71 B 4ULBE 81 5 1 5946E 00 4 8278 82 1 2738 03 38 80008E 801 8 0000 01 go ouont 21 6 1 5946 00 4 8270 02 1 2738 3 8 0000 01 8 8888 1 8 6 0 1 7 1 5946E 00 4 827 02 1 2738 03 8 8888 81 42 8080 01 ge apunt gi 8 1 5046 00 4 9278E 82 1 2738 03 2 0 80 81 M BBBBE 91 9 0002 01 8 1 5946E 00 4 8270 02 1 2738 0 3 8 000 0 0 8000 61 0 0080 01 18 1 5946 00 14 8278E 82 1 2738 03 4 8000 01 0 0080 0 oe v vut 01 Fig 13 cont 56 MAT BAL 8 0808E 8l 8 0008 01 88028E 2 H gBXBEt DI J ABIYE O1 DB GHOOE 1 3 ABW 0 P agnpt 01 GEIER 3 Ub588E di OK OK OK OK S2XMB 840E 21 3 1294 81 3 294E 21 w4E uI 94E u1 2 2 2 CUSUM 8 0092 21 2 89082 41 D Hnegt g1 Bg 01 D vuu t 01 H uHugt gi
40. 2938 2939 2940 2941 2942 2943 2944 2945 2946 2946 2945 2946 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2957 2957 2957 2957 2957 2957 2959 2959 2969 2961 2962 2963 1 PROCESS VARIABLE NUMBER 13 CALL CLOSEM 28 CONTINUE IPVT11 NPVIT IPV 1 IPVTI2 NPVIT IPV 2 DO 38 1 1 NTRNP2 1 151 1 TMCI ICTRN 10zPVTCIPI IPVTI1 TMCI ICTRN 2 zPVTCIP1 IPVTI2 38 CONTINUE TRANSFER DO 40 I 1 NTRNPI TMCI ICTRN 127 TMCI ICTRN 1 ITRANCITRIN TCI ICTRNO TMCI ICTRN 12 TMCI ICTRN 2 48 CONTINUE 59 RETURN END SUBROUTINE TRANS3 IPV ITRIN MODELS TRANSFERS WHICH ARE A PRODUCT OF CONCENTRATION AND FLOW RATE IE T CCI 1 FCI 10 CCID FCI C I 1 F I CCID FCI 10 2 0 DT 3 wwwwwww IN THIS CASE THE TRANSFER HAS FOUR COMPONENTS WITH 2 wwwwwww MEASUREMENTS PER COMPONENT CONCENTRATION FLOW RATE CONCENTRATION FLOV RATE PROCESS VARIABLE NUMBER TRANSFER INVENTORY NUMBER TIME INTERVAL BETWEEN MEASUREMENTS PVCN 1 PVCN 2 ITRIN DT PARAMETER NBALMX 195 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 19 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 COMMON PVCOM
41. 3 16588 3 52372 1 11386 OK 21 2 9266470 2 3 48938 3 84259 1 18487 22 5 9121480 82 3 88993 4 17124 1 29483 23 4 3817350 82 4 15447 4 48685 1 07981 OK 24 7 532838D 92 4 51399 4 986977 1 87682 25 9 162287D 92 4 88849 5 28784 1 86518 26 7 4386180 82 5 27797 5 62947 1 06568 27 8 6816360 82 5 68243 6 18899 1 88915 28 9 5825250 82 6 18186 6 51722 1 86887 29 9 4712980 82 6 53628 7 87826 1 88178 38 9 5898210 82 6 98568 7 51287 1 87547 OK 31 1 8198860 81 7 45886 7 99398 1 87321 32 1 8193880 1 7 92941 8 29881 1 84659 33 9 5488960 82 8 42375 8 94736 1 06216 34 8 829592D 82 8 93387 9 54147 1 06811 35 1 853878D 8 9 45736 18 1711 1 87546 36 8 4052560 02 9 99664 18 7698 1 87644 37 7 852274D 82 18 5589 11 3129 1 87222 38 9 8 64830 2 11 1281 11 9847 1 07775 39 8 9295560 2 11 7843 12 6697 1 80248 48 1 8212260 81 12 3835 13 1582 1 86946 4 9 188528D 82 12 9177 13 9277 1 87818 42 1 1449970 81 13 5469 34 7881 1 98572 43 1 1861390 81 14 1918 15 3298 1 98825 44 1 8467980 1 14 8581 16 367 1 97998 DK 45 1 1385340 81 15 5242 16 7761 1 88864 46 1 1592220 81 16 2133 17 6229 1 88694 47 1 1141690 91 16 9173 18 3664 1 88566 48 1 4122810 21 17 6364 18 8992 1 97168 49 1 4585120 81 18 3784 19 9447 1 88579 58 1 1746380 81 19 1194 26 6565 1 88849 Fig 3 cont modei code and one from the input data follow the date and time printo
42. 318 IF MOD J NMDTRNCIPVT J NE 8 PVT J IPVT 9 CONTINUE CONTINUE WRITE 6 NPVCT IPVI 5 IPVT 9 DO 348 I 1 NPV NPVC NPVCT 1 IFCIPVTRN I EQ 1 GO TO 338 IPVI IPVI 1 WRITE 6 PVI J IPVI J 1 NPVC GO TO 348 CONTINUE IPVT IPVT 1 WRITE 6 PVT J IPVT J 1 NPVC CONTINUE CONTINUE CALL SRCHSS 4 PVDAT 8 1 9 9 CALL 5 55 4 8 2 0 0 CALL EXIT END m emm em em 9 GA NM ra w Se 4 Cl amp nm ra T m vm TA U Te di Sg em gt em em Ta N w M lt e 8 537 55 NPV NUMBER OF PROCESS VARIABLES NINV NUMDER OF VALUES PER INVENTORY PROCESS VARIABLE NTRN NUMBER OF VALUES PER TRANSFER PROCESS VARIABLE 1182298 1 1 IPVTRN TRANSFER INDICATOR ARRAY 199 85 188 85 188 85 1 4 99 PROCESS VARIABLE VALUES 3 55 515 Fig C 2 Input data to PVGEN Example 1l NPV NUMBER OF PROCESS VARIABLES NINV NUMBER OF VALUES PER INVENTORY PROCESS VARIABLE NTRN NUMBER OF VALUES PER TRANSFER PROCESS VARIABLE 1 g 187 IPVTRN TRANSFER INDICATOR ARRAY 1 188 18 PROCESS VARIABLE VALUES 11 7 12 115 Fig C 3 Input data to PVGEN Example 2 NPV NUMBER OF PROCESS VARIABLES NINV NUMBER OF VALUES PER INVENTORY PROCESS VARIABLE NTRN NUMBER OF VALUES PER TRANSFER PROCESS VARIABLE 11888288881 1 IPVTRN TRANSFER INDICATOR ARRAY 186 542 18 25 515 80084 04882 97 190 0 86 1 5 133 168 83587 P
43. 5 5 278 8 0888E 81 9 5367 07 1 4988 2 7 4988 83 9 5367 07 3 4980 02 2 5749 05 5 6824 8 6808 1 9 5367 0 2 1 4988 82 7 4988E 03 9 5367 07 3 4982E 02 2 6783 85 6 1819 8 80888E 8 9 5367E 2 1 4980 02 7 4920 05 9 5367 07 3 5908 2 2 765 05 6 5363 8 8090 81 9 5367 07 1 4988 82 7 49W4BE 83 9 5367E 87 3 4988 82 2 861 5 6 9857E 8 8000 81 9 5367 87 1 4988 82 7 4908 03 9 5357 7 3 4988E 02 2 9564E 95 7 4581 0 0404 1 9 5367 07 1 49806 02 7 4900 9 5367E 87 3 4988 02 3 0518 05 7 9294 B SJB OE SI 9 5367 87 1 4900 02 7 4900 03 9 5367E 07 3 4988 82 3 1471 85 8 4238 8 0808E 8 9 5367E 87 1 4988 02 7 4988 83 9 5367 07 3 4988t 02 3 2425t 05 9331 9800 81 9 5367 07 1 4988 82 7 4900 03 9 5367 07 3 4980 02 3 3379 05 9 4574 B IBIBE B 9 5367 87 1 4980 02 7 4988E 03 9 5367 07 3 4980 02 3 43320E 85 9 9966 g MOB E SI 5367 87 1 4988E 82 7 4988 03 9 5367 7 3 498gE 82 3 5286 5 1 8551E 8 8808E 9 9 5367E 87 1 4988 82 7 490 03 9 5367E 97 3 4980 02 3 6240 5 1 1120 8 0888 81 9 5352 07 1 4998 82 7 4988E 03 9 536 07 3 498 82 3 7193 05 1 1784 0 0880 81 9 5367E 27 1 4988 82 7 4008 03 9 5367 07 3 4980 02 3 8147 05 1 2344E 0 8080 01 9 5367 87 1 4988E 82 7 4908t 83 9 5367 07 3 4980 2 2 9101 05 1 2918 2 880 01 9 5367 07 1 4988 2
44. 5367 87 7 1 49B8E 92 7 4988E 83 9 5367 07 3 498 02 1 8128E 05 9 5367E 97 1 4980 02 7 4908 03 9 5367E 27 3 4980 82 1 99730 85 9 5367 87 1 4988E 82 7 4987 83 9 5367 87 3 4988E 02 2 0027 05 9 5367 87 1 4988 02 7 49007 83 9 5367 07 3 4988 02 2 0981E 05 9 5367E 87 1 4988 02 7 4900 03 9 5367 87 3 4980 02 2 1935 85 9 5367E 97 1 4980 02 7 490 1 9 5367 07 3 49DBE 02 2 288 8E 85 9 5367 07 1 4980E 82 7 4900 03 9 5367 07 3 4988 2 2 3842 5 9 5367 07 1 4988E 82 7 4908E 73 9 5367 07 3 498GE 82 2 4796 05 9 5367E 8 1 4980 02 7 4900 03 9 5267 07 2 49B0E D2 2 5749 05 9 5167 87 1 4980 02 7 4900E 63 9 5367 8 3 4988 2 2 6783 05 9 5367 07 1 8980 02 7 4900 03 9 5367E 2 3 4988 12 7657 05 9 5367E 87 1 4980 02 7 4988 3 9 5367E 07 3 4980E 52 2 8618E 05 9 5357E 87 J 49BBE 82 7 4900 603 9 5367E 07 3 4888t 02 2 9564E 05 9 5367 07 1 4980E 82 7 4900 03 9 5367 07 3 4980 02 3 051NE 05 9 5367E 87 1 4980 02 7 49 8 83 9 5367E 07 3 4989 92 3 1471 05 9 5367 87 1 4988 2 7 4988t 83 9 5367 87 3 4982 02 3 2425 05 9 5357 07 1 4980 02 7 4900 03 9 5367E 0 3 4980 02 3 3379 05 9 5357 07 1 4980 02 7 4988 3 9 5367 07 3 49 8E 02 3 4332E 05 9 5367E 07 1 4988 02 7 4908E 43 9 5367 07 3 49 0 02 3 5286 05 5367 87 1 4980 02 7 4900 03 9 5367E 07 3 4980 92 3 6240 05 5
45. 7 4988E B3 9 5367E 87 3 4980E 92 4 0054E 05 1 3547E 8 88880E B81 9 5367 87 1 4980 02 7 4900 03 9 5367E 07 3 4980E 92 4 1808E 95 1 4191 8800 81 9 5367E 07 1 4980 02 7 4980E 03 9 5367E 07 3 4988E 82 4 1962E 05 1 4858E 8 B8g8E N1 9 5367 07 1 4980 02 7 4988 3 9 5367E 87 3 498 2 4 2915E 05 1 5524 8 8888F 81 9 5367E 87 1 4980 02 7 4988 83 9 5367E 87 3 4988E 82 4 3869E 05 1 6213 8 0 81 9 5367 87 1 4988t 02 7 4988E 83 9 5367 07 3 4980E B2 4 4823 05 1 6917 8 8908E N1 9 5367 07 1 4980 02 7 4988E 83 9 5367 07 3 4988E 982 4 5776E 85 1 7536 1 9 5367E 87 1 4980 02 7 4900 83 9 5367 07 2 4980 02 4 6738E 85 1 837 0 0809 01 9 5367 07 1 4988 82 7 4900 03 9 5367 07 3 4980 02 4 7684E 95 1 9119 Fig 7 cont TABLE IX PROCESS VARIABLES FOR EXAMPLE 2 Nominai Value No Variable 1 Input transfer 1 2 Inventory 100 3 Output transfer 10 Tour Fig 8 Process block diagram Example 2 uncorrelated and short term correlated errors multiplicative and the long term correlated errors additive The short term corre lated errors are recalibrated every 20 h The input data for this example is shown in Fig 9 At line 11 the number of runs NRUN is set to 100 triggering the Monte Carlo option where comparisons are made between sample and propagated CUSUM variances To allow for multiple transfers per materials balance NTRP
46. 82 9 461546E 82 2 128338 1 35841 9 RATIO OUTSIDE INTERVAL 2 6 8853250 22 8 248578 8 315915 1 27893 3 5 7698380 92 8 461864 8 543116 1 17592 4 1 9093060 81 0 734498 0 832658 1 13363 5 1 2881120 21 1 6647 1 25827 1 17235 OK 6 1 514596D 21 1 45778 1 63271 1 12898 1 7463680 81 1 99843 2 98331 1 09163 8 1 765588D 21 2 41842 2 45678 1 81583 a 1 5733420 81 2 98775 3 16687 1 05995 12 1 7245830 21 3 61642 3 72845 1 83498 11 21 3 8850 81 4 38443 4 29351 2 997464 or 12 2 3293710 21 5 2517 5 16867 1 02314 13 2 6614100 21 5 85845 5 85345 2 999147 14 2 713724D 81 5 72448 6 50676 8 967623 15 3 8909930 81 7 64984 7 42983 9 971241 16 3 0491110 1 8 63454 8 41628 3 924723 OK 17 3 365228D 81 9 67858 9 39711 8 978918 18 3 9945390 01 12 7822 18 3208 8 957226 19 4 1674980 01 11 9447 11 4831 9 954664 28 4 8117820 21 13 1667 12 6164 950202 21 4 2697770 81 14 4481 13 7619 8 952506 22 3 989737D 41 15 7888 14 9285 2 945518 23 4 304157D 21 17 1889 16 5512 8 962898 24 4 2104450 1 18 6483 17 8079 8 954935 25 4 4855710 81 20 1678 19 2233 8 953203 OK 26 4 896123 01 21 7481 28 9906 14 965385 27 4 8556750 01 23 3825 22 6414 8 966592 28 4 7923880 21 25 8793 24 3736 8 971061 29 5 4679790 01 26 8354 25 9163 8 955752 38 5 9847280 21 26 6588 27 7998 8 978269 31 5 970294D 81 38 5256 23 5267 8 967277 oF 32 5 7921300 01 32 4597 31 8094 2 955318
47. 8400 06 2 9731E 04 7 5221 BB 2 7868E BH 2 9731E 84 7 5342 00 2 3785E 83 2 1173E 8 1 2420E 00 6 044 03 4 BABBE 86 2 9731 04 7 5221 88 2 7060 00 2 9731 04 7 5342 Bg 2 6758E 83 2 6255E 18 1 2420 88 6 0446 03 4 8400 06 2 9731 04 7 5221L 00 2 7068E 90 2 9731 4 7 5342 88 2 9731 03 3 1876 11 1 2420 00 6 8446 03 4 8480 6 2 9731E B4 7 5221 00 2 78 8E 00 2 9731E 84 7 5342 00 3 2784E 83 2 8042 12 1 2420 00 6 0446 02 4 8400 06 2 9721 04 7 5221 88 2 7060 00 2 9731 04 7 5342 00 3 5677E 83 4 4748 13 1 2420 008 6 0446 03 4 8488E 86 2 9731 04 7 5221 08 2 7060 op 2 9721 04 7 5342 00 3 8656 03 5 1995E 14 1 2420E 88 6 0446 03 4 8400 06 2 9731 04 7 5221 88 2 7868E 2 9731E 84 7 5342 00 amp 1623E 83 5 9782 15 1 2420E 80 6 8446E 83 4 8400 06 2 9731E 84 7 5221t 00 2 7869E 00 2 9731 04 7 5342 AB 4 4596 03 6 8112E 16 1 2428t 00 6 0446E 03 4 8400 06 2 9731 04 7 5221 BB 2 7058E 2 9731 04 7 5342 00 4 7569E 03 7 6982 17 1 2428t 00 6 0446 03 4 8400 06 2 9731 04 7 5221 BB 2 7860 00 2 9731t BA 7 5342 00 5 0542E 83 8 6393E 18 1 2420 6 0446 0 4 4 0 6 2 9731 04 7 5221 00 2 7868E 00 2 9731E 84 7 5342E 00 5 3515 03 9 6346 19 1 2420 BF 6 0446 2 4 8400 065 2 9731E B4 7 5223 BB 2 7860 00 2 9731 04 7 5342 5 6409 03 1 0684 20 1 242 6 0446 03 4 840 06 2 9731 04 7 5221 BB 2 7060 00 2 9731 04 7 5342
48. 9 4615E 82 2 9670 2 6 1035 5 9 4615 82 2 0752E 03 35 8 080 01 8 000 01 8 0085E 81 6 1835 08 9 46155 02 2 9670 02 6 1035 5 9 4615 2 2 1362 36 8 6500E 81 2 00 01 0 00800 01 6 1035 08 g 4615E 22 2 9678 02 6 1035 5 9 4G15E 42 2 1973 02 37 B DUUBE P 8888 1 8 8882 81 5 1835 85 9 4615E 22 2 967BE 82 6 1B35E 95 9 48 15 82 2 2583 03 38 g 0808E 81 8 0000 01 0 8080 6 01 6 1835E 858 9 46156 02 2 9670F 02 6 1835 5 9 4515 2 2 3193E 23 39 0808 01 8 0800 01 0 00 01 6 1035 5 9 4615 82 2 9670E 82 6 1035 05 9 4615 2 2 2004 42 9 88008 01 0 0800 01 B BABBE B1 6 1835E 85 9 4615 02 2 9678E 82 6 1835 85 9 4015 2 2 44142 83 41 8008 01 8 0800 0 1 8 0000 01 6 1035 05 9 4615 82 2 9670 82 6 1038 08 9 4615 2 2 5024E 93 42 80400E 801 0 8 81 8 0000 01 6 1835 5 9 4615 02 2 9670 02 6 1835 05 4615 42 2 5635 43 8 000 01 8 9000 2B8 0800E 21 6 1835E 85 9 4515 02 2 9678 82 6 1835E 45 9 4615 02 2 6245 43 44 B J3880E 01 8 0000 01 00880 01 6 1035 05 9 4615 02 2 96785 02 6 1035 05 89 4615 02 2 5855 43 45 1 8 0090 01 ZB 60HHE Ul 6 1035 05 9 4615 82 2 9678 82 6 1035 08 9 4615 2 2 7468 03 46 8 00 0 01 0 800 01 8 06 81 6 1835 05 9 46156 02 2 9678E 82 6 1835E 25 9 4615 02 2 80768 3 47 9 9000 01
49. EQ GO TO 258 DO 248 II 1 NCFRC DO 248 K 1 2 DO 228 Lei 2 NCOMP1 ICFRCIID IREC CI 1 K 1 NCOMP2 ICFR II 2 1 CALL MTFIXCG IT NCOMP1 K IDUM XX1 CALL MTFIX 3 IT NCOMP2 K IDUM XX2 VTTR VTTR 2 XX1 XX2 STR NCOMP 1 K STR NCOMP2 K 228 CONTINUE IFCIT EQ 1 GO TO 248 DO 238 I 3 6 NCOMP 1 11 1 1 NCOMP2 1CFR 11 IREC 1 2 K 1 CALL MTFIX 3 IT NCOMP1 K IDUM XX1 CALL MTFIX 3 ITM1 NCOMP2 K IDUM XX2 VTTR VTTR 2 XX1 XX2 STR NCOMP 1 KO STRCNCOMP2 K 238 CONTINUE 248 CONTINUE 250 CONTINUE wwwwwwwww RANDOM ERROR CORRELATIONS wwwwwwwww DEVELOPED FOR THE CASE WHERE THE TRANSFER IS COMPUTED wwwwwwwww THE PRODUCT OF CONCENTRATION AND WEIGHT CHANGE IF NCGF EQ 2 GO TO 278 DO 262 II 1 NCGF NCOMP1 ICGF II NCOMP2 1CGF 11 1 CALL MTFIX 3 IT NCOMP1 1 IDUM XX1 CALL MTFIX 3 IT NCOMP2 1 IDUM XX2 Fig D l cont 8957 8958 8959 8968 4961 8962 8963 8954 8965 8966 8967 8968 8969 0970 0971 8972 8973 8974 8975 0976 8977 8978 8979 8988 8981 8982 8983 9984 0985 8986 8987 2988 9989 8998 8991 8992 8993 8994 8995 8996 8997 8998 8999 1808 1001 1882 1883 1804 1995 1886 1887 1988 1999 1218 1911 1212 1813 1814 1215 1218 1017 1018 1019 1828 1821 Goo 268 278 288 298 388 318 VTTR VTTR
50. Fig D 1 cont 127 2824 2825 2826 2027 2928 2829 2838 2031 2032 2033 2034 2035 2036 2037 2038 2039 2848 2041 2042 2043 2844 2045 2846 2847 2848 2049 2050 2051 2052 2052 2052 2852 2852 2853 2854 2055 2056 2857 2858 2059 2859 2859 2059 2059 2859 2859 2862 12061 2062 2863 2864 2865 2866 2867 29068 2069 2078 2071 2072 2873 2074 2875 2876 2077 2878 128 GOO O o O cooo 68 CONTINUE RANDOM TRANSFER XX T 13 NC TF XX EQ G RETURN IFCIMTTONC 2 RETURN 78 CONTINUE Wc eee SYSTEMATIC TRANSFER XX T TB NC IF XX EQ RETURN ITST IMTT NC NM gt 2 5 280 100 90 80 RETURN 90 IF NS EQ 1 188 XX XX TM CIB NC NM RETURN END SUBROUTINE OUTDEC We ve Ye ve je k e e k ee je je o c ik e ec je ie K KO le e e e Y ie e ve e e k e je ve k K Ye je e ce Wa Yk c e k K e e e C ee t k k e je K e Gee WRITES OUTPUT FILES TO DECANAL CODE FOR TOTAL COLLAPSED CASE e he He Ae e a Wie Ve aie e we ve ve k k k k k K K Ka Ke oa e Ke Wk K ia YK WO O Ya W i k Ye k Wk a K K OY We ik k k Wa K k k k K KOK W K k WO a PARAMETER NBALMX7125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPV
51. MESTYP INTCALCI INTCAL 21 8 983380 2 090000 8 808000 1 10808 18988 6 OUTPUT MASS ADU CAKE INITIAL VALUE 9 092885 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP 1 INTCAL 2 8 002088 8 801304 D DMUODOE 2 10888 10098 7 OUTPUT CONCENTRATION ADU INITIAL VALUE 0 151488 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL C1 INTCAL 2 8 089888 8 867085 8 859888 1 ea 12008 8 INVENTORY POLISH FILTER INITIAL VALUE 9 220008 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 9 058000 8 898882 8 008008 1 18026 18080 8 OUTPUT VOLUME INITIAL VALUE 35 000008 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL INTCAL 2 9 810800 0 005008 8 006008 1 10088 10009 18 OUTPUT CONCENTRATION INITIAL VALUE 2 882888 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 B 100888 8 050000 8 000000 1 10908 18888 Fig 19 Output file Example 5 TTT TTT EE IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPVCNT 11 NUMBER OF INVENTORY PROCESS VARIABLES NPVI 4 NUMBER OF TRANSFER PROCESS VARIABLES NPVT 7 NUMBER INVENTORY COMPONENTS INCI 4 NUMBER QF TRANSFER COMPONENTS NCT 4 NUMBER INVENTORY MEASUREMENTS NMI 1 NUMBER OF TRANSFER MEASUREMENTS NMT 2 NUMBER OF INVENTORY SYSTEMATIC ERRORS 51 1 NUMBER OF TRANSFER SYSTEMATIC ERRORS NST 2 NUMBER RANDOM NUMBER STREAMS NNSTRM 28 NUMBER OF PULSE COLUMNS NCOLUM 8
52. NCI NMI2 CALL WRTCCICTI NCIMX NCIMX NCI NCT NMI NPROUT Fig D 1 cont 139 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2768 2761 2762 2763 2764 2765 2766 2767 2768 2769 2778 2771 2772 2772 2772 2772 2772 2773 2774 2775 2776 2777 2778 2779 2782 2781 2782 2783 2784 2785 2785 2785 2785 2785 2785 2785 2788 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 140 C WRITE NPROUT 482 489 FORMAT TRANSFER CORRELATION INDICATOR TCI NCT NCT NMT CALL WRTCC TCI NCTMX NCTMX NCT NCT NMT NPROUT WRITE NPROUT 492 498 FORMAT INVENTORY TRANSFER CORRELATION INDICATOR ITCI NCI NC 1T NC CALL WRTCCITCI NCIMX NCTMX NCI NCT NC NPROUT WRITECNPROUT 522 500 FORMAT INVENTORY SEQUENTIAL CORRELATION INDICATOR ISCI NCI 1NMI CALL WRTSCISCI NCIMX NCI NMI NPROUT WRITE NPROUT 518 518 FORMAT TRANSFER SEQUENTIAL CORRELATION INDICATOR TSCI NCT N 1MT CALL WRTSC TSCI NCTMX NCT NMT NPROUT RETURN END SUBROUTINE STNDEV 1 k k W e e e e k k e e Ye k Ya e Ke e le e e e Ke c e ee c e e e e e e Ye e e e oce X Ye oe e e ka e e e e e e ke e e K k ve Ye Ye oe XX COMPUTES SAMPLE STANDARD DEVIATIONS FOR MULTIPLE RUNS Ve ke e e Wc oe ke We e k e e c
53. NMTMX 2 NPVIT NPVMX IBLANK 1 NPVIN NDECIN IPRPV NBAT IRNSCH ITIN NPVMXD NCITST NFSEED INTRNC 2 ITRANCNPVMX2 ZPVNO CB NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS 3 ICTRN ICINV NCOL NPVMX HCCC B 2 NCOLMX2 CCC 3 NCOLMX 4 NPV NCL NCT MMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR A4 5 1 4 NPVCNT IPVNARCNPVMX N wwwwwwwwkwkwwkwk CHECK N EQUALS NPV IF N EQ NPV GO TO 20 WRITE C1 18 N NPV WRITE NPROUT 18 NPV 18 FORMAT NUMBER OF DIFFERENT PROCESS VARIABLES IN PV ARRAY 13 1 INPUT DATA SETS THIS NUMBER NPV AT I3 2 RUN TERMINATED BECAUSE OF THIS INCONSISTENCY gt CALL CLOSEM N 20 CONTINUE WRITE NPROUT 38 N 38 FORMAT 5X NUMBER OF DIFFERENT PROCESS VARIABLES IN ARRAY 13 READ NPVIN CIPVTRNC I 1 N WRITE NPROUT 49 IPVTRN I 1 1 N 48 FORMAT SX IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 1 FOR TRANSFER 5X 6812 READ NPVIN NPVCT 1 1 1 N WRITE NPROUT 52 NPVCTCID Iz1 N 58 FORMAT 5X NUMBER OF VARIABLES IN PV ARRAY FOR EACH PROCESS VARIABL 1 5X 3014 w w xw wx CHECK TO SEE IF DIMENSIONS OF AND PVT ARRAYS W w xk k ARE BEING EXCEEDED C DO 118 I 1 N IFCIPVTRNCIO GT 2 GO TO 78 IF NPVCTCIDO LE NBMXP3 GO TO 119 2299 2388 2381 2382 2383 2384 2305 2306 2387 2388 2389 2318 231
54. NPV 11 NUMBER OF TRANSFER INVENTORIES NTRIN gt 4 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 3 4 7 ARRAY OF PROCESS VARIABLE NUMBERS ASSOCIATEO WITH EACH TRANSFER OR INVENTORY IPVNO TRANSFER INVENTOR Y PROCESS VARIABLE NUMBER NUMBER 12 2 3 14 5 1 1 2 B g g 2 2 3 4 5 6 3 4 7 11 8 9 4 12 11 8 8 D SPECIFIC TRANSFER INVEMTORY NUMBER ISPNTI g TOUTES ET 8 61 SEADIMG PROCESS VARIABLE ARRAY NUMBER OF DIFFERENT PROCESS VARIABLES IN ARRAY 11 IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 112882022 8B11 NUMBER OF VARIABLES IN PV ARRAY FOR EACH PROCESS VARIARLE 115 115 12 12 12 12 12 12 12 115 115 READING OF PROCESS VARIABLE ARRAY COMPLETE MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE 1 FLOW RATE 2AF INITIAL VALUE 106 A00580 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP ANSEAL CI INTCAL 2 I 2 B 02M0808 8 02 9 108808 19008 2 CONC 2AF INITIAL VALUE 8 054289 SIGMAN I SIGMAN 2 MESTYP INTCAL 1 gt INTCAL 2 64397 6 141 0 oppene 1 easy 18688 3 CONC 2 INITIAL VALUE 8 000545 SIGMAE SIGHANCI SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 0 109088 9 800088 4 000000 H 19098 14009 4 CONC AP INITIAL VALUE 8 048829 SIGMAE SIGHAN 1 SIGCMAN 2 INTCAL 1 INTCALU2 0 225331 29 088000 2 869000 1 180004 16
55. OUTPUT TO SCALAR FORM WHEN SET TO 1 y INPUT DATA DEFINING UNIT PROCESS ACCOUNTING AREA 5 NPV NUMBER OF PROCESS VARIABLES 2 NTRIN NUMBER OF TRANSFER AND INVENTORY SETS IN THE PROCESS 7 ITIN INVENTORY TRANSFER NUMBERS 6 IPVNO PROCESS VARIABLE NUMBER CORRESPONDING TO EACH INVENTORY OR TRANSFER 2 37 INPUT TRANSFER AS PRODUCT OF CONCENTRATION AND WEIGHT CHANGE 5 OUTPUT TRANSFER AS PRODUCT OF VOLUME AND CONCENTRATION ISPNTI SPECIFIC INVENTORY TRANSFER SET NO 0 GIVES ALL SETS Ka w aw wk h MEASUREMENT ERRORS ASSOCIATED WITH EACH PROCESS VARIABLE D INPUT CONCENTRATION 093 981 FULL WEIGHT 892 001 Y 2 EMPTY WEIGHT p92 B01 OUTPUT VOLUME BI gH5 OUTPUT CONCENTRATION 883 gp1 R Fig 15 Input data Example 4 The output file for this example is given in Fig 16 Although there are ten nonzero measurement errors onlv nine random number streams are required because the full weight and empty weight measurements both have the same correlated error and therefore use the same random number stream The Monte Carlo results given at the end of the output show good agreement between the sampled and propagated CUSUM variances with only one of the ratios lying outside the 95 confidence interval E Example 5 The UPAA for this example shown in Fig 17 is also part of a UFg to oxide conversion process This example was chosen be cause of cor
56. Ok 33 5 8693690 71 34 4532 32 7889 8 951463 34 6 2029990 01 36 5460 34 8833 8 953368 35 6 26M624D 81 3826101 37 9322 9 958935 36 6 38 170 01 40 7895 38 7220 0 949336 37 6 54254BD 91 43 8283 10 5459 0 942493 GF 38 7 8349670 81 45 3104 42 2993 2 933545 38 7 1391210 1 47 6599 44 7973 3 939937 48 7 2352170 01 50 8687 47 5174 5 951040 41 7 045578D 01 52 5368 49 9222 9 250233 42 7 0665050 1 55 0043 53 0318 3 962089 43 7 2602540 1 87 6511 55 5405 6 963396 44 7 61 5300 01 68 2973 57 7972 4 958537 D 45 7 7948560 01 63 0828 68 0487 0 953111 46 B 266538D 91 65 7676 63 5584 0 958806 47 4859090 01 68 5917 65 9356 8 951276 48 7877240 1 71 4752 58 6551 8 969544 49 8 329523n g1 74 4181 72 3888 5 972721 or 5g B 493928D g1 77 4202 75 0395 0 969249 Fig 16 cont The input transfer to the precipitation feed makeup unit is at a rate of 12 batches per day with a volume of 412 5 L batch For each batch the input volume is determined by measuring the volume in the precipitation feed makeup tank However this unit cannot be emptied completely between batches because of a residue of material left on the walls Although this residue cannot be measured it is estimated using both uncorrelated and correlated error components The correletion between the input transfer the holdup can be analyzed by considering the relevant terms in the UPAA materials balance equ
57. One of the most common sources of error is in the input data The user either has too much or not enough data or the data are not in the proper sequence To assist the user in isolating this problem a com plete echo print of the input data appears on the output file The input data are printed immediately after being read in making it easier to locate the input error The input flags MASPRT ITIPRT and IPVPRT can be set to obtain more detailed output MASPRT 1 then all the vari ances and covariances computed in subroutine MASAGE and all the variances and correlation indicators computed in subroutine SETMAS are printed to the output file When ITIPRT is set equal to 1 each inventory or transfer number and the associated process vari able number are printed to the output file before the actual cal culations for that inventory or transfer are made Setting IPVPRT to l provides a printout of input process variables The code also allows the user to perform the measurement model calculations on one isolated inventory or transfer Hand Checking the measurement code calculations as they appear in the output table becomes relatively easy when considering only one isolated inventory or transfer This inventory transfer isolation is obtained by setting the input ISPNTI to the desired inventory 35 transfer number In the nondebug mode ISPNTI O for the com bined computation of all the inventories and transfers Addi tional ISPNTI e
58. TERMINATED WITH NST GREATER THAN NSTMX CALL CLOSEM 500 IF NNSTRM LE NSTRMX GO TO 520 WRITE NPROUT 514 1 510 510 FORMAT RUN TERMINATED WITH NNSTRM GREATER THAN NSTRMX CALL CLOSEM 528 IF NCOLUM LE NCOLMX GO TO 54g WRITE NPROUT 538 WRITE 1 530 530 FORMAT RUN TERMINATED WITH NCOLUM GREATER THAN NCOLMX CALL CLOSEM 540 MXP MAXO NSI NST IF NC LE NCMX GO TO 560 WRITE NPROUT 554 WRITE 1 558 558 FORMAT RUN TERMINATED WITH NC GREATER THAN NCMX CALL CLOSEM 568 IF MXP LE MXPMX GO TO 580 WRITEC GNPROUT 572 1 574 578 FORMAT RUN TERMINATED WITH GREATER THAN MXPMX CALL CLOSEM 588 IF NBAL LE NBALMX GO TO 628 WRITE NPROUT 592 WRITE 1 590 59g FORMAT RUN TERMINATED WITH NBAL GREATER THAN NBALMX CALL CLOSEM 682 CONTINUE IF NCOLUM EQ 2 GO TO 658 eoe READ INPUT DATA ASSOCIATED WITH THE COLUMNS CALL BLANKS 4 WRITECNPROUT 618 610 FORMAT COLUMN CONSTANTS HCC 5 1 VCC 3 ID CCC 3 I1 DO 628 J 1 NCOLUM READCNDAT C HCCCI J I171 5 VCCCI J 121 2 0 1 0 WRITEC NPROUT 632 HCCCI 2 2 171 5 VCC I J I 1 2 CCC I 3 628 CONTINUE 638 FORMAT 8E14 6 SET UP COLUMN NUMBERS 121 3 0 1 1 IC g DO 648 I 1 NTRIN NCOL 1 8 IFCITINCID LT 3 GO TO 649 IFCITINCI GT 4 GO TO 648 IC IC 1 NCOL 1 IC 640 CONTINUE e Wr e e ahe ah AAA E AI e aie ie e KEE KE Ya Ya Ya Ya Ye Yc Ya Yc Yc Yc
59. Writes to the output file DEBUG mode only the arrays of correlation indicators WRITEM Echo prints from the input file the measurement error and type data associated with each process variable WRTR Writes to the output file DEBUG mode only the arrays of uncorrelated error variances WRTS Writes to the output file DEBUG mode only the arrays of sequential correlation indicators WRT3 and WRT4 Writes to the output file DEBUG mode only the covariance matrices computed in subroutine MASAGE ZERO Sets to zero the inventories transfers and asso ciated variances B Block Diagram A block diagram showing the interacticn of the important subroutines in the code is shown in Fig 1 Each of the blocks in the diagram represents a subroutine After opening the necessary input and output files the MAIN program calls MESIN to read in and echo print to output the input data MESIN calls SETMAS BLANKS READEM REDPV and WRITEM to assist in this function SETMAS computes the measurement error variances and the correlation indicators for each transfer and CLOSEM STNDEV SETWAS OUTDEC TRAN2 TRANS TRAN4 Fig 1 MEASIM code block diagram inventory measurement in the unit process accounting area These variances are required in subroutine MASAGE and for input to the DECANAL code With the initializations completed MAIN transfers control to subroutine MESDRV A call to
60. Wwe e Ye W W W e Ww le W c Wa Wa c t e Ww W Wa Ce c t e le e e ie e e W Ww W W W W ve ve COMPUTES MATERIAL BALANCES AND PRINTS OUT INVENTORIES TRANSFERS AND THEIR ASSOCIATED VAIANCES ALONG WITH MATERIAL BALANCES Ve Wo e w w w w W W w w W We c W W je e ee e e W WW e e e e k e a ole e e e e e le ve W Ye We e Ye ale e e e e e e e vede Yee e ve NN v PARAMETER NBALMXs125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXPS NBALMX 3 NTRNMX 515 NTMXPIsNTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMXx12 NPVTMX 8 10 NCTMX 8 NMIMX 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 DOUBLE PRECISION SUMMB SUMMBS DXMB S2IS S2TS S2XMBS COMMON VAR XI NBMXP2 NCIMX S2I NBMXP1 CVICNBMXP1 TONTMXP1 NCTMX XIM NBMXP2 NCIMX NMIMX S2TCNTRNMX CVTONTRNMX 5 1 S2CS NBMXP 1 TTONTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TRONTRNMX S2TBCNTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP 1 NTRNP2 NPROUT DT NCAL NCTMX 2 1 IBLANK NPVIN NDECIN IPRPV NDAT IRNSCA ITINCNPVMX NCITST NFSEED INTRNC ITRAN NPYMX 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL i HCC S NCOLMX VCCC2 NCOLMX2 CCCC3 NCOLMX NPV NCI NCT NMI NMT NSI NC MXP NNSTRM NCOLUM NCFRC ICFR CA4
61. Yc Yc Yc Ye Ye Ye Ye Yc Ye Ye Ya ka te Ya Ya Ya Ye Ye Ya Ye Ye Wa yp INITIAL CALCULATIONS W W k k Yk Ye Wa Ke Ke gie Yc W Ye Ye Ye Wa yc Ye Yc Ya Ye Wr Ye yc Wr War Yc Ye Ye vie Yc Ya Ya Ye Ye Ya Ya Ya Ya ae Ye Ye sk Ka Ka Ya Ke a Ya Ye e ka Wa k k k k Fig D 1 cont 125 126 0005 aan ona MINIMUM NUMBER OF TRANSFER AND INVENTORY ENTRIES PER P V 650 NMININ 12299 19998 DO 678 11 IFCIPVTRNCID GT 2 GO TO 669 IFCNMININ GT NPVCTCIOO NMININSNPVCT I GO TO 670 660 IF NMINTR GT NPVCTCIO NMINTRENPVCT I 678 CONTINUE 688 NBALP1 NBAL 1 NBALP2 NBAL 2 NCITST NCI IF NCOLUM GT Z NCITSTENCI 1 NTRNSNTRPBL NBALP1 1 NTRNPI NTRN 1 NTRNP2 NTRN 2 RR RR CHECK FOR MINIMUM NUMBER OF INVENTORY AND TRANSFER ENTRIES Wwwwwwwwwwwww PER PROCESS VARIABLE IF NBALP2 LE NMININ GO TO 729 WRITE NPROUT 699 NMININ NBALP2 1 699 NMININ NBALP2 590 FORMAT YOU HAVE ONLY INVENTORY PROCESS VARIABLE ENTRIES JER PROCESS VARIABLE A MINIMUM OF 13 NBAL 2 ARE REQUIRED 2 W RUN IS TERMINATED Yee CALL CLOSEM 788 IF NTRNP2 LE NMINTR GO TO 728 WRITE GNPROUT 718 NMINTR NTRNP2 1 710 NMINTR NTRNP2 718 FORMAT YOU HAVE ONLY 13 TRANSFER PROCESS VARIABLE ENTRIES PE 1R PROCESS VARIABLE A MINIMUM OF 13 NBAL 1 NTRPBL 3 ARE RE ZQUIRED RUN TERMINATED vx CALL CLOSEM 728 CONTINUE FOI III CHECK FOR
62. ZERO from MESDRV sets the inven tories and transfers to zero The individual process variable measurement errors are calculated by calls to subroutine MEASR MEASR calls RNORM the standard normal deviate generator and RNORM calis DRAND to generate uniform random numbers in the inter val 0 1 Next MESDRV repeatedly calls subroutine PROCES for the individual inventory and transfer calculations PROCES calls the appropriate process routine INV2 COLUMN TRANI TRAN2 TRAN3 or TRAN4 At this point in the computation the measurement code MEASIM has essentially satisfied the primary goal namely to generate a set of measured values from the input process variables The remaining MEASIM calculations are useful for checkout and for reducing the dimensions of the subsequent DECANAL calculations The materials balances CUSUM and CUSUM variance calcula tions are important for verifying the correctness of the measure ment model These calculations are initiated with MESDRV calling subroutine PRTBAL Materials balances are calculated PRTBAL PRTBAL calls subroutine CUSUM to calculate the CUSUM and CUSUM variance Subroutines MASCUS and MASAGE are used for the variance and covar iance calculations associated with the CUSUM variance Before returning control to the MAIN program MESDRV may call subroutine OUTDEC to write an output file to DECANAL OUTDEC is called only if a reduction of both the inventories and transfers to
63. c e je sc e e e e e Ya ke a Wa e e e je a e e e je oe je Ya de o e X e K e ye we e READ UNIT PROCESS INPUT DATA MORO Ye k We Yk YK Wa W Yk Ya Ye Ya Ya K sk YK yc Sc ya Ye s Yk Ya Yc W Ye Sr We Yk YK yic Wk AE WK Ic Ye Yk Yk Yk W ie YK Ya Yk Ye We Ya YK sk y W W yk ye W W k W Ww k W W PARAMETER NBALMX 105 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 10 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 COMMON MESPAR SIGMAE NPVMX SIGMAN NPVMX 2 SIG2E NPVMX SIG2N NPVMX 2 MESTYP NPVMX INTCAL NPVMX 2 ISTRPV NPVMX IZE IMTICNCIMX IMTT NCTMX NMTMX ISTRNR NPVMX ISTRNS NPVMX COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCALCNCTMX NMTMX 2 NPVITCNPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC ITRAN NPVMX IPVNO S NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL HCC 5 NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR A NPVI NPVT NCGF ICGFCA NPVCNT IPVNARCNPVMX tn C Fo 69 INTEGER 2 DCNLIN PVARA Fig D 1 cont 131 2244 2248 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2250 2261 2262 226
64. columns 1 2 2 e E 4 Remainder 5 Transfer direct 1 6 Transfer product of 1 volume amp concentra tion 7 Transfer product of concentration amp flow rate 1 Fi 2 F2 K4C2 3 F2 K4C1 2 4 F1 K4C2 2 8 Transfer product of 1 My concentration amp a 2 change in mass ANotation I inventory Mg final mass Pi previous flowrate V volume K constant F9 current flowrate C concentration Cp feed conc previous conc T transfer Cw waste conc C2 current conc Mj initial mass Cp product conc 15 E Materials Balance and CUSUM In performing materials accounting for a given UPAA comput ing a materials balance for that UPAA is usually necessary A materials balance calculation must be associated with a specific time interval definition the Materials Balance MB over the time interval t to t is i 1 i MB t 1 I t i I ti T t j t i 1 where I t material inventory in UPAA at time and T t iti net material transfer into the UPAA over the time interval t to t 1 1 1 If there is net transfer of material out of the UPAA then the sign of T will be negative For example consider a materials balance calculation for the UPAAl of Fig 2 with the inventories represented by I Io total inventory I for the is and I4 and the transfers by T5 T4 Ta Ts and The materials balanc
65. covariances and then writing this information to a file for input to DECANAL This procedure 18 can significantly reduce the dimensions of the problem and result in much lower computation times Another case where MEASIM uses variances and covariances is in the CUSUM variance calculation The CUSUM variance serves as a very powerful tool for checking measurement calculations Because DECANAL also computes the CUSUM variance the variances calculated from the two codes should for most cases the same Because of this need for calculating variances and covari ances the main tabular output from MEASIM contains inventory and transfer variances and covariances as well as the CUSUM variance For a given random variable X with mean the variance is defined by Var X EI x i4 6 where is the expected value operator alternate nota tion for variance of X is 62 Similarly the covariance of two random variables X and Y with means Ux and respectively is defined by cov x Y E x u Y 7 It is beyond the scope of this user s manual to derive the variance and covariance calculations performed in MEASIM In dividual transfer and inventory variances and covariances are computed in subroutine MASAGE Subroutine SETMAS which serves as a pre processor for MASAGE computes individual error variances and the correlation indicators required by Subroutine MASCUS operates on the MASA
66. cu xO xQ xQ O LQ 0 O QONA a WN IR 0 0D LR RR bai x feet x x Wett x x 1285 1286 114 COMMON MSINCM ICI NCIMX NCIMX NMIMX ISCICNCIMX NMIMX ITCI NCIMXINCTMX NCMX TCI NCTMX NCTMX NMTMX D TSCI NCTMX NMTMX VIRCNCIMX NMIMX VTR NCTMX NMTMX gt VIS NCIMX NMIMX 2 VTS NCTMX NMTMX 2 SIR ONCIMX NMIMX S 72 NCTMX NMTMX SIS NCIMX NMIMX 2 STS NCTMX NMTMX 2 gt COMMON CON NBAL NBAEP1 NBALP2 NTRPBL NTRNPI NTRNP2 5 NPROUT DT NCALC NCTMX NMTMX 2 NPVIT NPVMX 1 NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC 2 ITRAN NPVMX gt IPVNO 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS 3 ICTRN ICINV NCOL NPVMX HCCC 5 NCOLMX VCC 2 NCOLMX2 3 NCOLMX 4 NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM 4 5 NPVCT NPVMX D NPVI NPVT NCGF ICGFC 4 NPVCNT IPVNAR NPVMX DIMENSION SRT NCTMX NMTMX SST NCTMX NMTMX 2 w HOLDUP AND TRANSFER VARIANCE AND COVARIANCE CALCULATIONS TRACE 388 ZERO OUT VARIANCE AND COVARIANCE ARRAYS o DO 18 I 1 NCI DO 18 K 1 NMI DO 18 L 1 NSI CVSIS I K L 8 DO 19 3 1 NCI CVISCI J K Lg XCVSIS I J K L 0 18 CONTINUE DO 28 I 1 NCT DO 28 K 1 NMT DO 28 L 1 NST CVSTS I K L B DO 2 J 1 NCT CVTS I J K L 8 5 5 1 2 12 0 28 CONTINUE DO 38 I 1 NCI DO 38 J 1 NCT DO 38 K
67. each inventory and transfer consists of one component with one measurement per component The above assumptions do not limit the conclusions but only help to simplify the resulting equations Under these assumptions with I and measured inventories transfers respectively m M and with I and T the corresponding true values it follows from Eq 3 that 77 H I l and A 2 d H T 1 gt 3 When the above expressions for inventory and transfer are substi tuted into Eq 1 for the CUSUM and the resulting CUSUM is substituted for X in Eq 6 the true values of the inventories and transfers combine to form the true CUSUM value Because all the measurement errors are zero mean the mean value uy in the CUSUM variance equation is cancelled by all the true inventory and transfer values and leads to the following equation for the CUSUM variance 62 Fig A 1 Process block diagram Example 78 in E E 4 liT In Eq A 4 the maximum number of terms is present when all measurements are ma e with the same instrument Hence all the correlated errors are equal that is ny Hp monas FN o and E nn o Eq 4 yields c K K K K 192 5 1 2 3 4 5 7 where I o 1 t 1 0 I t J2 Ky 2 1 0 I t 1 1 0 1 t K 2 1 o 1 t 2T 27 2 1 1 t 1 2T 27 and
68. fourth inventory component is required to accumulate the constant terms for all the pulsed columns Thus the first pulsed column requires four inventory components and each succeed ing column requires only three inventory components This example has two pulsed columns resulting in a total of seven 4 3 inventory components Each transfer computed from the product of flow rate and concentration requires four transfer components Because both the input and output transfers are computed in this way the total number of transfer components will be equal to 8 53 INPUT DATA FILE MESOTS PV ARRAY FILE OUTPUT DECANAL FILE DECINN MON OCT 19 1981 15 44 32 TITLE FOR PROCESS VARIABLE ARRAY COLUMNS 2A AND 28 USING OPERATING CONDITIONS FROM AGNS MINIRUN 6 ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE LIZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH Y NUMBER OF RUNS NRUN 199 NUMBER OF BALANCES NBAL NUMBER OF TRANSFERS PER BALANCE NTRPBL 1g TIME INTERVAL OT w 1 928 MASSAGE DEBUGG PRINT FLAG MASPRT 8 TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG ITIPRP 8 PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR PRINTOUT FLAG FOR INPUT PROCESS VARIABLES IPVPRT gt ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN g 2 PARARARANARARARARARARARARARRARRARAGARRARARARA RRA RARA INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA NUMBER OF PROCESS VARIABLES
69. in kilograms of plutonium The resulting process variables for this example are summarized in Table VIII Materials balance calculations are performed at 0 5 h intervals in coincidence with the batch trans fers EXAMPLE 1 INPUT 2c 1 2 WASTE PRODUCT Fig 4 Process block diagram Example 1 38 TABLE VIII PROCESS VARIABLES FOR EXAMPLE 1 Nominal No Variable _Value_ 1 Input volume L 100 2 Input concentration kg L 0 05 3 Tank 1 volume L 100 4 Tank 1 concentration kg L 0 05 5 Tank 2 volume L 100 6 Tank 2 concentration kg L 0 05 7 Waste output kg 0 01 8 Product output kg 4 99 The input data file for this example is given in Fig 5 where three transfer components and two inventory components yield a total of five transfer and inventory components This number appears in line 24 of Fig 5 for the input variable NTRIN The five transfer and inventory types are defined in line 27 for the input vector ITIN Each input defines a transfer or inventory type as defined for the ITIN vector in Table VI 6 as the first element of the ITIN vector indicates an input transfer as the product of two measured values in this case volume and con centration Entries 2 and 3 for ITIN are both 2 indicating inventories as the product of two measured values The 5s appearing as the last two entries for ITIN indicate output trans fers calculated directly from one measurement The particular sequenc
70. input and output transfers have nonzero uncorrelated and short term correlated errors and zero long term correlated errors Flow rate measurements are recalibrated every 20 h other measurements are recalibrated As usual inventory correlated errors are assumed zero because these errors tend to cancel in the materials balance variance calculations The use of the same process variable in the transfer and inventory leads to correlations between transfers and inventories The input transfer is correlated with 2A column inventory through the 2 feed concentration and the output transfer is correlated with the 2B column inventory through the 2B product concentration In addition the 2A and 2B column inventories are correlated through the product concentration because both columns use this variable for inventory calculations The MEASIM code has not been designed to handle the correlations among transfers and inventories and the correlations among different inventories Under steady state conditions these additional correlations will have a relatively small contribution to the materials balance variance because the initial and final inventories appear with opposite signs in the materials balance equation see Appendix A This theory is confirmed through the results of a Monte Carlo run discussed below The input data for this example are given in Fig 12 At line 11 the number of runs NRUN is set at 100 to indicate a Monte Carlo simu
71. input variable to a value greater than 1 The results of the Monte Carlo simulation on p 2 for the complete simulation are particularly interesting The MEASIM code neglects correlations between transfers and inventories and between different column inventories when comput ing the propagated or analytical CUSUM variances However the sample CUSUM g calculations from the Monte Carlo simulation 57 must by their very nature in clude all The ratio of the these correlations sample and propagated CUSUM variances the table on p 2 is within the 95 confidence interval for all 10 balances This ratio adds substance to the assumption that the correlations mentioned above can be safely neglected in the steady state case The remainder of the output file summarizes the results of the for each transfer and inventory simulation element considered separately These isolation runs prove very debugging useful for program purposes D Example 4 The UPAA for this example as shown in Fig 14 is taken from a portion of a UFg to oxide conversion process This exam ple was chosen because it con tains a transfer computed from the product of concentration and difference in weights Also an additive error model is used in this example The SNM is ura nium 58 UF IN CYLINDERS PREHEAT HYDROLYSIS UOFF 2 STORAGE TO PRECIPITATION FEED MAKE UP Fig 14 Process block diagram Example 4 Af
72. into the variance and covariance calculations so care must be taken in exercising these options The user can select either multiplicative additive or a combination of multiplicative and additive measurement error 2 models Each measurement can have a maximum of one uncorrelated and two correlated error components These errors are assumed to be normally distributed with mean zero and standard deviation provided by the user The free format input data file contains the standard devia tions of measurement errors along with the necessary inputs to define the process This format results in a relatively simple input data file II CODE STRUCTURE A Subroutine Summary MEASIM is a highly modularized code with a relatively large number of subroutines In most cases each subroutine performs only one type of calculation so the code is relatively easy to understand and modify brief description of each of the MEASIM subroutines follows MAIN This is the main driver for the MEASIM code Files are opened and control is transferred to subroutine MESDRV MAIN contains the logic for the Monte Carlo and multiple run options available with the code At the end of the simulation MAIN transfers control to subroutine CLOSEM BLANKS Reads blank lines of input data These lines can be used for commenting purposes CLOSEM Closes all the files and terminates the run COLUMN Computes the measured inventory components for a
73. line 14 Thus with each transfer separated by 1 h and with 10 transfers per materials balance the materials balance calculations will be made at 10 h intervals The actual process variables for each of the four transfers and inventories are selected in input data lines 30 33 which show that process variables 2 4 and ll are each used twice The 20 appearing as the fifth entry in lines 40 and 58 instructs the code to recalibrate the flow rate measurements every 20th balance The appearance of 1 2 3 and 4 in the last fcur lines respectively of the input file instructs the code to make isolated runs for each of the four transfers and inventories associated with the UPAA The output file for this example is shown in Fig 13 first page is devoted to the echo check of input data summary of the subroutine SETMAS calculations on p 2 indicates that the number of inventory and transfer process variables are 10 and 4 respectively This number may seem somewhat contradictory because there are only a total of 11 process variables Though three of the process variables assume dual roles as discussed above the calculations in subroutine SETMAS do not take this into considera tion but simply allocate five process variables for each column and two process variables for each transfer Normally each inven tory element such as a tank or container has one associated inventory component Each pulsed coiumn has three inventory com ponents
74. single inventory and transfer components is desired MESDRV transfers control back to MAIN where a check is made for the Monte Carlo option This option serves as a very useful check on the measurement and variance calculations If the Monte Carlo option has been selected MESDRV is called again to repeat the measurement calculations The measurements will be different in this case because the random numbers have changed Subrcutines PRTBAL and CUSUM are called to calculate the CUSUM but the vari ances calculations are not repeated This procedure is repeated until the desired number of runs is completed STNDEV is then called to compute the sample CUSUM variance at each materials balance and to output a summary table for the Monte Carlo simula tion Before terminating the run MAIN checks for more data If more data are present another run is made This procedure is repeated until all the data have been read After all the data have been exhausted MAIN calls subroutine CLOSEM to close the files and terminate the run C Array Sizes and the FORTRAN PARAMETER Statement Most of the arrays in the code are dimensioned with the aid of a FORTRAN PARAMETER statement This feature makes it easy to increase or decrease array sizes as required by the particular 8 process being modeled With those computer systems that do not support the PARAMETER statement it is necessary to dimension the arrays directly with actual integers The parame
75. 0 5 7192t BL 2 9044 HU 1 01 ui ai 2 9u44 WO 4 59 4E 02 5 264 01 9 0 BULBLE 41 M UBUNE 91 5 7392 M1 2 9644E 1 D468L QU 41 2 9544E JU h i653bE p2 6 08 9 Pl Mr 9 00 01 G dBEOHE O1 08006 01 5 7392 1 2 9644E 09 2938E B8 5 7 2 49044L 0 5 392E 02 7 2397 bl S IS ANNE ES ed EN AE deeg Ee RESULTS OF MONTE CARLO SIMULATION WITH 188 SAMPLES WRRRARRANRRRARANRARRREARSAREANSARERHEYANNNRERAEREEREEA CHI SQUARE N 1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 2 736473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 5 711736D 81 2 89853 3 25158 1 12180 1 142547D 02 9 15674 9 86271 1 27718 OK 3 1 715814D 82 13 4387 16 6655 1 24812 OK 4 2 288638D 82 21 8143 28 3439 1 34879 manan RATIO OUTSIDE INTERVAL 5 2 8581100 82 25 5138 34 7483 1 38565 mnene RATIO OUTSIDE INTERVAL 6 3 4317020 92 35 5989 43 6374 1 21289 H 4 8854320 82 12 4238 58 7457 1 19616 OK 4 570281D 82 52 6345 62 7123 1 19147 9 5 152344D 82 6689 72 9338 1 19821 1g 5 7241270 2 72 3978 84 7511 1 17864 Fig 13 cont The remainder provides the output summaries for the complete UPAA and for each isolated inventory and transfer set The output table and the Monte Carlo results are given for each of these five cases As indicated previously the Monte Carlo runs are obtained by setting the NRUN
76. 01 5 9907L 81 gt s QN 8 888 81 5 7452 1 1 1490 2 1 7236 2 2 2981E 2 2 8726F 82 3 4471E 02 4 U216F 52 4 5962 5 174 L 5 7452tb 82 11412825898 S2CUSUM Y ABBBE 81 7 241BE l 2 8322E 82 6 2214E 82 1 83 1 853E 83 2 4496E 83 3 3219 23 4 4328E 03 5 4218 3 6 74 03 S2CUSUM B 0888E D1 6 9111 2 7387E B 8B33E 1 9784t 1 6785 2 41359t 3 2795E 4 2824 5 4114t 5 5778E gl 02 ER ER 53 03 82 03 53 2 55 LL RESULTS OF MONTE CARLO SIMULATION WITH ERREARWARARAAREATSANRVWABRREERERTARAERTERRARRART ARRRRARARERA CHI SQUAREZ N 1 RATIO FOR 95X CONFIDENCE UPPER LIMIT 1 29223 188 SAMPLES LOWER LIMIT 28 736473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAHPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 5 6679580 1 69 1114 71 9254 1 84872 2 1 1338470 82 273 674 285 426 1 84652 3 1 783292D 82 688 329 657 748 1 28124 4 2 2722590 82 1878 35 1192 13 1 18366 5 2 8285180 82 1678 46 1848 29 1 18118 6 3 4072610 82 2413 94 2645 49 1 99592 7 3 976738D 82 3279 58 3598 18 1 89717 8 4 545488D 82 4289 42 4727 11 1 89969 9 5 1156810 2 5411 41 5959 34 1 12125 18 5 6633220 82 6677 76 7328 82 1 99738 SUMMARY FOR INVENTORY AND TRANSFER NUMBER 2 w ARARARARRARAR 1 521 s2T Bg 1 6163 1 6451 0 8 0398
77. 0712 0712 2712 0712 0712 9712 2713 0714 0715 0716 0717 0718 0719 9720 0721 8722 0723 0724 0725 0726 9727 8728 0729 0730 8731 2732 2733 8734 8735 8736 2737 0738 0739 9749 8741 9742 0743 0744 0745 0746 0747 8748 2749 8758 8751 8752 8753 0754 0755 0756 0757 0758 0759 2769 2761 a oo OQOOO0O0O00000000000000000000 NSTRMX MAXIMUM NUMBER OF RANDOM NUMBER STREAMS NCOLMX MAXIMUM NUMBER OF PULSE COLUMNS COMMON CVCOM CVSIS NCIMX NMIMX NSIMX CVITS NCIMX NCTMX NMTMX MXPMX CVTSCNCTMX NCTMX NMTMX NSTMX CVSTS NCTMX NMTMX NSTMX CVISCNCIMXSNCIMX NMIMX NSIMX CVITR NCIMX NCTMX NMTMX VTIR XCVSISCNCIMX NCIMX NMIMX NSIMX XCVSTS NCTMX NCTMX NMTMX NSTMX XCVITS NCIMX NETMX MXPMX A COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNPZ NPROUT DT NCALCNCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX NCITST NFSEED INTRNC ITRAN NPVMX 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX HCCCB NCOLMX VCCC2 NCOLMX2 CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR A NPVCTLNPVMX 2 NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX OI e C INTEGER TSCI TCI COMMON MSINCM ICI NCIMX NCIMX4NMIMX ISCICNCIMX NMIMX ITCI NCIMX NCTMX NCM
78. 0E 82 1 8 g8BE 82 1 8888 2 1 8888 82 1 2988E 82 gl 82 92 gt 81 EH gl gt 81 gi gl 88 EI gg 88 gg 99 99 8p 08 gu 88 gg DR 88 ge 9g 98 9g a8 88 99 pp EI as Bt 1291185537 2263984214 164868264 491400187 1352537143 271783562 1141268589 52 MAT BAL S2XMB CUSUM S2CUSUM 1 8 00 8 0 0 080008 01 8 0008 01 8 0000 01 2B9 2800E Z1 2 2 200929 21 D BARRE 8 0 9 536 E 87 1 4988 82 7 4900 02 9 5367 87 3 49ugE 82 9 536 E 97 3 4988E 1 9 5367 07 1 4980 02 7 4988E 83 9 5367E 27 3 4988E 22 1 9073 06 b 4948E B g800E Bi 9 5367 07 1 498 02 7 4988E 23 9 5367 07 3 4980 02 2 61 26 1 0988 B8 0000E B 9 5357t 87 1 4988E 82 7 4988E 83 9 536 E 07 3 4980 22 3 8142 86 1 6980 B 800gE 81 9 5367 07 1 4988 02 7 4900 3 9 5367 7 3 4988E 82 4 7684E 86 2 447BE 0 0 01 9 5357E B7 4988 02 7 4800 03 9 5367E 87 3 4980 02 5 7228 86 3 345BE B8 8880E 81 9 5367 07 1 4988E 82 7 4900 03 9 5367 87 3 4988E 22 6 6757E 86 4 3944E B 00BYE B81 9 5367 07 4980 02 7 4000 03 9 5357E 87 3 4982 02 7 6294 06 5 5928E 8 9888 21 9 5367 7 1 4988 82 7 4988E 83 9 5267 07 3 498DE 22 8 583 6 6 9418E 8 0884E 01 9 5367 07 1 4980 02 7 4989E 23 9 5357E 27 3 4989gE 02 9 5367 6 B 4398E B UPBEE SI 9 5367E 87 1 4999
79. 1 NMT CVITR I J K g8 DO 38 L 1 MXP CVITS I J K L 8 XCVITS 1 3 K L 8 38 CONTINUE IT 8 DO 138 IB 1 NBALP1 DO 130 III 1 NTRPBL IT IT 1 CALL MASAGELIB IT III IFCILI NE 13G0 TO 6g w xwxx VARIANCE TOTAL INVENTORY RANDOM ERROR C S2ICIB zVTIR S2IR 1B VTIR VARIANCE OF INVENTORY SYSTEMATIC ERRORS DO 48 121 DO A8 J 1 NCI DO 48 K 1 NMI Fig D 1 cont 1287 1298 1289 1218 1211 1212 1213 1214 1215 1216 1217 1218 1219 1229 1221 1222 1223 1224 1225 1226 1227 1228 1229 1238 1231 1232 1233 1234 1235 1236 1237 1238 1239 1248 1241 1242 1243 1244 1245 1246 11247 1248 1249 1259 1251 1252 1253 1254 1255 1256 1257 1258 1259 1268 1261 1262 1263 1264 1265 1266 1267 1268 1269 1278 1271 ona 42 DO 48 L 1 NSI S21CIB amp S2ICIB CVISCI 2 K 1 CONTINUE S21B 1B S21 1B VTIR A COVARIANCE BETWEEN SUCCESSIVE INVENTORIES 54 CVI IB 8 DO 50 I 1 NCI DO 58 J 1 NMI DO 528 K 1 NSI CVICIB SCVICIB CVSISCI 2J K CONTINUE ws VARIANCE OF TOTAL TRANSFER RANDOM ERROR 68 S2T IT VTTR S2TR IT VTTR Kwan VARIANCE OF TRANSFER SYSTEMATIC ERRORS 78 DO 78 I 1 NCT DO 70 J 1 NCT DO 78 K 1 NMT DO 78 L 1 NST S2TCIT
80. 1826 1827 1028 1029 1030 1831 1832 1033 11934 1835 1836 1037 1238 1039 1940 1041 1942 1843 1244 1845 1246 1847 1848 1049 1059 1951 1952 1953 1254 1855 1856 1957 1858 1859 1868 1861 1062 1063 1064 1865 1866 1867 1068 1069 1972 1871 1872 1973 1874 1075 1276 1977 1878 1279 1080 1081 1282 1g83 1984 1885 1286 112 Goo DO 388 K 1 NST IFICVSTS I1 J K LT 1 E 29 GO TO 380 DO 378 I1 1 NCT IFCCVTSCI II J K LT 1 E 89 GO TO 378 CALL MTFIX 4 1TP1 11 J K XX1 CALL MTFIXCA IT I 9 K XX2 IFCMODCIT NCALCI J K 2 EQ 8 1 0 XCVSTS I I1 J K XX1wXX2 STS I J K STS 11 J K 378 CONTINUE 380 CONTINUE IF MASPRT EQ 2 GO TO 518 DEBUG OUTPUT CVITRX 8 WRITECNPROUT 392 XINVT VTIR CVITRX 398 FORMAT TOTAL INVENTORY XINVT F12 6 1 VARIANCE OF TOTAL RANDOM INVENTORY ERROR VI F12 6 2 COVARIANCE BETWEEN INVENTORY TRANSFER RANDOM ERRORS CVITRX x 3 F12 6 WRITE NPROUT 422 480 FORMAT COVARIANCE OF INVENTORY BIAS ERROR CVIS NCI NCI NMI 1NSI CALL WRT4 CVIS NCIMX NCIMX NMIMX NCI NCI NMI NSI NPROUT WRITECNPROUT 410 418 FORMAT COVARIANCE BETWEEN SUCCESSIVE INVENTORY SYSTEMATIC 1 ERRORS CVSIS NCI NMI NSI WRITE CGNPROUT 422 428 FORMAT CALL WRT3CCVSIS NCIMX NMIMX NCI NMI NSI NPROUT WRITECNPROUT 4
81. 19 1 C 3 4 5 6 D 1 FIGURES MEASIM code block diagram Example process Example of primary output file Process block diagram Example 1 Input data Example 1 Random number seeds Example 1 Output file Example 1l Process block diagram Example 2 Input data Example 2 Output file Example 2 Process block diagram Example 3 Input data Example 3 Output file Example 3 Process block diagram Example 4 Input data Example 4 Output file Example 4 Process block diagram Example 5 Input data Example 5 Output file Example 5 Process block diagram Evrample UPAA Percent of the s2 02 ratios lying outside the 95 confidence interval FORTRAN listing of PVGEN Input data to PVGEN Example 1 Input data to PVGEN Example 2 Input data to PVGEN Example 3 Input data to PVGEN Example 4 Input data to PVGEN Example 5 FORTRAN listing of MEASIM 12 30 38 40 42 43 45 46 47 50 52 54 58 60 61 64 69 70 78 87 90 93 93 93 93 95 USER S MANUAL FOR A MEASUREMENT SIMULATION CODE by E A Kern ABSTRACT The MEASIM code has been developed primarily for modeling process measurements in materials processing facilities asso ciated with the nuclear fuel cycle In addition the code computes materials bal ances and the summation of materials bal ances along with associated variances The code has been used primarily in performance assessment of materials ac
82. 1T CALL CLOSEM 350 CONTINUE CHECK FOR INVENTORY TRANSFER CORRELATIONS INTRNC 9 DO 36 I 1 NCI DO 360 J 1 NCT DO 368 K 1 NC IFCITCICI J K GT 8 INTRNC 1 368 CONTINUE NNSTRM NRNS CHECK FOR OVERFLOW OF AND PVT ARRAYS IF NPVI LE NPVIMX GO 388 WRITE NPROUT 370 WRITE 1 370 370 FORMAT RUN TERMINATED WITH NPVI GREATER THAN NPVIMX CALL CLOSEM 380 IF NPVT LE NPVTMX GO TO 400 WRITE GNPROUT 392 WRITE 1 398 398 FORMAT RUN TERMINATED WITH NPVT GREATER THAN CALL CLOSEM 400 CONTINUE 8 MRITECNPROUT 412 410 FORMAT VARIANCE OF INVENTORY RANDOM ERROR VIR NCI NMID WRITE 422 428 FORMAT SX COMPONENT NO MEASUREMENT NO VARIANCE CALL VRTRCVIR NCIMX NCI NMI NPROUT WRITECNPROUT 439 438 FORMAT VARIANCE OF TRANSFER RANDOM ERROR VTR NCT NMT WRITECNPROUT 429 CALL VRTRCVTR NCTMX NCT NMT NPROUT WRITE NPROUT 449 440 FORMAT VARIANCE OF INVENTORY BIAS ERROR VIS NCI NMI NSI WRITECNPROUT 459 450 FORMAT 5X COMPONENT NO MEASUREMENT NO BIAS NO VARIANCE CALL WRTB VIS NCIMX NMIMX NCI NMI NSI NPROUT WRITE NPROUT 468 I 468 FORMAT VARIANCE OF TRANSFER BIAS ERROR VTS NCT NMT NST WRITECNPROUT 452 CALL WRTB VTS NCTMX NMTMX NCT NMT NST NPROUT WRITECNPROUT 478 478 FORMAT INVENTORY CORRELATION INDICATOR ICI NCI
83. 2 10 NPVTMX 8 NCIMX 1 NCTMX 8 NMIMX 2 2 NS EH NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NC COMMON PVCOM PVI NBMXP3 NPVIMX PVT NTMXP2 NPVTMX IPVTRNCNPVMX COMMON VAR XI NBMXP2 NCIMX 521 1 CVI NBMXP1 T NTMXP1 NCTMX XIM NBMXP2 NCIMX NMIMX3 1 S2T NTRNMX3 CVTCNTRNMX 5 1 S2CS NBMXP1 TT NTRNMX XIT NBMXP1 S2IR NBMXP1 S2IBCNBMXP 12 S2TR NTRNMX S2TBCNTRNMX TTSUM NBMXP1 SZTRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBALP1I NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMX IBLANK Fig D 1 cont 9591 0591 0591 0591 8591 2592 8593 0594 0595 8596 0597 0598 0599 0609 8601 9692 8683 9604 28605 8686 0607 8678 8689 0610 8611 0612 2613 8614 0615 0616 0617 8618 2819 2620 8621 9622 2623 9624 8625 8626 8627 8628 8629 0630 8631 2632 8633 8634 8635 8636 8636 2636 9636 2636 8637 8638 8639 0640 8641 0642 0643 0644 0645 8645 0645 19 28 3g Ag 5g 69 70 88 98 REN NPVCTCNPVMX NPVI NPVT NCGF ICGFCA IPVNARCNPVMX DIMENSION IPV 1 PVCI IPV PROCESS VALUE OF HOLDUP IPV PV VARIABLE NUMBER ICINV ICINV 1 IFCICINV LE NCITST GO
84. 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 29 2211 4 NCOLMX 2 2212 8213 COMMON PVCOM PVI NBMXP3 NPVIMX PVT NTMXP2 NPVTMX IPVTRN NP VMX 8214 COMMON PVCOMS PVIS NBMXP3 NPVIMX PVTS NTMXP2 NPVTMX g215 C 0216 COMMON VAR 2 S2I NBMXP1 CVI NBMXP1 T NTMXP1 8217 NCTMX XIM NBMXP2 NCIMX NMIMX TMC NTMXP1 NCTMX NMTMX 8218 S2TCNTRNMX CS NBMXP1 S2CS NBMXP1 TTC NTRNMX 2219 XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TRONTRNMX 8229 52 TTSUM NBMXP1 52 5 1 S2TBSM NBMXP I 2221 8222 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 0222 5 NPROUT DT NCALCNCTMX 2 IBLANK 8222 1 NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC 0222 2 ITRAN NPVMX IPVNOCS NPVMXD NTRIN MASPRT ITIPRP IMESPR ICLAPS 0222 3 ICTRN ICINV NCOL 5 NCOLMX VCC 2 NCOLMX 0222 4 NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC 4 9222 5 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNAR NPVMX 8223 9224 225 DIMENSION CON 6 IPV 1 0226 Fig D 1 cont 98 0227 0228 8229 080239 0231 0232 0233 0234 9235 0236 0237 0238 0239 9249 9241 8242 9243 8244 245 8246 0247 0248
85. 21 NMT I121 NCTO I 1 NCT 1 1 1 1 1 1 NCT 1 1 1 1 1 9 9 1 1 1 7 SUBROUTINE MEASR KPROC XMES N IPV WC Ve e e k e e Ye Yc le ke ke e e e EERE ELE RES e je ESS RES We e Ye e e e e ie e e ERE SESS EEE k e k k Tr k c k e e e THIS ROUTINE ADDS MEASUREMENT ERRORS TO THE ACTUAL VALUES Ye k k e k e he e k e e k e e t le je P e e e e e We e e e yk e Ye W e lc Se Ye ve e Ye Wr e e ve e a Ka Ye ve Ye Ye ae e Ye Ye de e e Ya fe he e Ye e e We OG X PARAMETER NBALMX 195 NBMXPI NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 18 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 COMMON MESPAR SIGMAE NPVMX SIGMAN NPVMX 23 SIG2EXNPVMX SIG2N NPVMX 2 MESTYP NPVMX INTCALCNPVMX 2 ISTRPV NPVMX gt IZE IMTI ONCIMX NMIMX IMTT NCTMX NMTMX ISTRNRCNPVMX ISTRNSCNPVMX COMMON PVCOM PVICNBMXP3 NPVIMX PVTONTMXP2 NPVTMX 3 IPVTRNCNPVMX COMMON MSRNRM RN1 RN2 ISTRM DIMENSION XPROC 1 XMES 1 ETAC2 ETASAV 2 ICALBC 2 K 2 KK 2 wkwkwk VARIABLES 8 tuk wt A XPROC XMES N IPV EPS ETA ICALBC IZE o gg INTCAL ISTRPV MESTYP SIGMAE SIGMAN t e W K e do ve e W ve k je e Kk ARRAY OF PROCESS VALUES ARRAY OF MEASURED VALUES NUMBER OF MEASUREMENTS TO BE COMPUTED PROCESS VARIABLE NUMBER RANDOM ERROR SYSTEMATIC ERROR CAL
86. 3 2263 2263 2263 2263 2264 2265 2266 2267 2268 2268 2268 2268 2268 2268 2268 2269 2278 2271 2272 2273 2274 2275 2276 2277 2278 2279 2288 2281 2282 2283 2284 2285 2286 2287 2288 2289 2294 2291 2292 2293 2294 2295 2296 2297 2298 132 COMMON TITLE ITITLE 4 IPVTI 38 NPVMX OCNLIN 3 MESINP 3 PVARA 3 READ NDAT 1 IPVTICI IPV I171 32 10 FORMAT READ NDAT SIGMAECIPV SIGMANCIPV 1 2 S IGMANCIPV 2 MESTYP IPV INTCALCIPV 1 0 INTCAL CIPV 2 IF IMESPR WRITE NPROUT 28 1PV 28 FORMAT MEASUREMENT DATA FOR VARIABLE NO 13 WRITE NPROUT 39 SIGMAE IPV SIGMANC IPV 1 SIGMANCIPV 2 MESTYPCIPVO INTCALCIPV 12 INTCALCIPV 2 30 FORMAT CIZX S3F18 5 317 RETURN END SUBROUTINE REDPV C READS PROCESS VARIABLE PVI AND PVT ARRAYS PARAMETER 105 1 1 NBMXP2 NBALMX 2Z 1 NBMXP3 NBALMK 3 NTRNMX 515 NTMXPI NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 12 NPVTMX B NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMK 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 COMMON PVCOM 2 COMMON PVCOMS PVIS NBMXP3 NPVIMX PVTS NTMXP2 NPVTMX COMMON CON NBAL NBAEP1 NBALP2 NTRPBL NTRN NTRNP 1 NTRNP2 NPROUT DT NCAL NCTMX
87. 3 5X NUMBER OF INVENTORY SYSTEMATIC ERRORS NSI I3 5X NUMBER OF TRANSFER SYSTEMATIC ERRORS NST 13 5X NUMBER OF RANDOM NUMBER STREAMS NNSTRM x I3 5X NUMBER OF PULSE COLUMNS NCOLUM 13 WRITE NPROUT 362 FORMAT JORIS OOO ISI RRA RARAS wwwwwwwwwwwwwk CHECK IF ANY CONTROL INTEGERS WILL CAUSE ARRAY OVERFLOW 378 38g 399 404 418 428 438 448 45g 468 IF NPV LE NPVMX GO TO 380 WRITE GNPROUT 370 WRITE 1 378 FORMAT RUN TERMINATED WITH NPV GREATER THAN CALL CLOSEM IF NCI LE NCIMX GO TO 488 WRITE NPROUT 390 WRITE 1 392 FORMAT RUN TERMINATED WITH NCI GREATER THAN NCIMX CALL CLOSEM IFC NCT LE NCTMX GO TO 4298 WRITE CNPROUT 414 WRITE 1 412 FORMAT RUN TERMINATED WITH NCT GREATER THAN NCTMX gt CALL CLOSEM IF NMI LE NMIMX GO TO 442 WRITECNPROUT 432 WRITE 1 439 FORMAT RUN TERMINATED WITH NMI GREATER THAN NMIMX CALL CLOSEM IFCNMT LE NMTMX GO TO 468 WRITE NPROUT 452 WRITE C1 452 FORMAT RUN TERMINATED WITH NMT GREATER THAN NMTMX CALL CLOSEM IF NSI LE NSIMX GO TO 488 WRITE CNPROUT 472 Fig D 1 cont 1884 1885 1886 1887 1888 1888 1890 1891 1892 1893 1894 1895 1896 1897 Goo WRITE 1 470 478 FORMAT RUN TERMINATED WITH NSI GREATER THAN NSIMX CALL CLOSEM 488 IF NST LE NSTMX GO TO 500 WRITE NPROUT 492 WRITE 1 498 498 FORMAT RUN
88. 32 438 FORMAT COVARIANCE BETWEEN SUCCESSIVE INVENTORY SYSTEMATIC 1 FOR DIFFERENT INVENTORY COMPONENTS XCVSIS NCI NCI NMT 2 NST CALL WRT4 XCVSIS NCIMX NCIMX NMIMX NCI NCI NMI NSI NPROUT 1 60 TO 519 WRITE NPROUT 44 440 FORMAT COVARIANCE BETWEEN INVENTORY TRANSFER SYSTEMATIC 1 ERRORS CVITB NCI NCT NC NSI CALL WRTACCVITS NCIMX NCTMX NMTMX NCI NCT NC NSI NPROUT WRITE NPROUT 452 TR VTTR 458 FORMAT TOTAL NET TRANSFER TR F19 6 1 VARIANCE OF TOTAL RANDOM TRANSFER ERROR F18 6 WRITE NPROUT 462 468 FORMAT COVARIANCE OF TRANSFER SYSTEMATIC ERRORS 1 CVTSC NCT NCT NMT NST CALL WRT4 CVTS NCTMX NCTMX NMTMX NCT NCT NMT NST NPROUT WRITE NPROUT 472 478 FORMAT COVARIANCE BETWEEN SUCESSIVE TRANSFERS CVSTS NCT NMT 1 NST WRITE NPROUT 482 488 FORMAT CALL WRT3 CVSTS NCTMX y NMTMX NCT NMT NST NPROUT WRITE NPROUT 490 490 FORMAT COVARIANCE BETWEEN SUCCESSIVE TRANSFER SYSTEMATIC 1 ERRORS FOR DIFFERENT TRANSFER COMPONENTS XCVSTS NCT NCT NMT Fig 0 1 cont 1887 1088 1889 1899 1091 1992 1893 1894 se zo zo o zo 2 C Ze ken bei Sch k ONDO A OJ I 9 tQ 0 00 lt J G G G 09 GJ gt 590 eet Ft Teo 2 Te Fe Ter eet Se Pet Fer V e S e zen et ba e S e eer a ag C e
89. 35L 45 9 4615 02 1 2817E 03 22 B 8488E g1 8 0000 01 B BUBBE 81 6 1835 05 9 4615 02 2 9678 02 6 1835 85 9 4615 82 1 3428E B3 23 8 00080 01 8 800 01 2 080 81 5 1035E 25 9 4615 02 2 9570 2 5 1035E 85 9 4615 2 1 2032 03 24 08089 01 8800 0 40 0000 01 6 1035E 85 9 4615E 2 2 9570 02 6 1035 05 9 4615E 42 1 4648 03 25 0 0840 01 8 0000 01 8 8988 81 6 1035 05 9 4615 82 2 9678 02 6 1 35 5 9 4615 02 1 5259 26 0 8940 81 0 0800 01 8 0898 81 6 1035 05 9 4615 02 2 9678 82 6 1035 05 4 4615 02 1 5069E 03 27 8 0888E 21 9 0888 21 8 00 01 6 1835 08 9 4615 02 2 9678E D2 6 1835 05 4 4615 02 1 6479E 23 28 8 8958E 81 9 06800 01 00 00 1 6 1835 85 9 4615 02 2 9678E 02 5 1035 5 9 4615 2 1 7298E 03 29 0800 01 81 8 1 6 1835 05 9 4615 82 2 9678 02 6 1035 05 9 4515 02 1 770pE 03 38 9808E D1 1 2B8 9084E 01 6 1035 05 9 4615 02 2 3678 02 6 1935 05 9 4615 2 1 8311E 23 31 8 0000 01 8 8000 01 2g9 00HOE 71 6 1015 5 9 4615 02 2 967 02 6 1835 85 9 4615E 2 1 8921E 23 32 0 0000 01 2 0 80 01 8 08 8 81 6 1835 00 9 4815 02 2 9670 02 6 1935E 45 9 4615 2 1 9531E 3 33 8 8000 01 28 0000 01 2 00 9 1 6 1035 05 9 4615 02 2 9570 02 6 1835E 65 9 4515E 82 2 4142E 93 34 8 8000 01 8 6888 81 28 8000 01 5 1035 05
90. 367E 87 1 4988E 82 7 4900 03 9 5367E 87 3 49BDI 02 3 7193E 95 9 5367E 97 1 4980 02 7 4988 03 9 5367 87 3 4989E 02 2 8147 5 9 5367 07 1 4980 02 7 4988 03 9 5367 07 3 4980E 02 3 9101 05 9 5367 07 1 4980 02 7 4968 83 9 5367E 87 3 4980 2 4 8054E 05 9 5367 07 1 4980 02 7 4998E 03 9 5367 07 3 49N9F 02 4 1 08 5 9 5367 07 1 4988 02 7 4900 02 9 5367 87 3 4900E 92 4 19625 05 9 5257 07 1 4988 02 7 4900 02 9 5367E 87 3 4980 02 4 2915 5 9 5367 07 1 4988 72 7 4900 02 9 5357 07 3 4980 02 4 1869 05 9 5367E 07 1 4920 02 7 499BE M3 9 5367E 07 3 4980E 02 4 4823 5 9 5367E 27 1 4900 2 7 4900 03 9 5367E 87 3 4988F 82 4 5776 5 9 5367E 87 1 4980 02 7 4900 03 9 5367 07 3 4988E 02 4 677BT M5 9 5367 87 1 4980 02 7 4989E 03 9 5367E 07 3 4980 82 4 7bB4E 05 Fig 3 cont 1141288589 S2CUSUM 0000 3 4980 6 494 1 8988E 1 6980E EU 2 2 gi 81 2 4470E B81 3 3458E 4 3944E 5 5928E BL gl 91 941 01 B 439BE 01 1 7 1 1884E 1 3832E 1 5929E 1 8176 2 8573E 2 3119E 2 5B16E 2 B662E 3 165BE 3 4BR4E 3 B299E 4 1545E 4 5140 4 8885 5 2780 5 6824E 5 10190 6 5363L 6 9857 7 45f801E 7 9294E 8 423 B 9331E 9 4574 9 9966 1 9551 1 1120 1 1744F 1 2304E 1 2918E 1 3547E 1 4191E 1 4858E 1 5524 1 6213 1 6917 1 7636 1 8370E 1 9119
91. 5 5 5288980 83 9 19925BE 82 8 706079 02 8 926251 5 2 0878640 02 9 399268t 82 8 12915 1 09494 7 7 9911610 23 9 399268E 82 amp 523972E 82 8 986876 H 9 8247530 3 9 199268 82 3 036882 82 8 855454 OK 3 1 6364280 22 9 19926BE 22 0 101376 1 07850 18 8 6898460 03 9 39926BE 22 9 922432E 02 8 959695 SUMMARY FOR INVENTORY AND TRANSFER NUMBER 4 LEE 1 vi 521 CVI T BAL S2XMB CUSUM S2CUSUM 2 0 0000 01 0 0008 01 2 0080 01 8 800 01 2 0800 01 9 0090 01 2 0006 81 08 0000 01 60 0020 01 8 0020 01 1 0000 01 01 0 0000 01 5 7392E l 2 8985 00 1 64 8 00 5 7392E 01 2 8945E 20 5 7392E l 2 8935 08 2 B UMUDE 01 8 00 0 8 808 81 5 7392 01 2 9644 00 3 2920E 81 01 2 9644 1 1428E 02 9 1557 98 3 8000 01 8 000 01 0 000 01 5 7392E 01 2 9644 Bg 68E 80 01 2 9644t 40 1 7210 82 1 3439 gl 4 B OBBBE Bl 0 080 1 00006 01 5 7392E 01 2 9644 4B 3 928 1 vi 2 9644 80 2 2057E M2 2 1014E dl 5 0 0 0 B POAME 41 B BUIAR 01 5 7392E Bl 2 95446 BA 1 64bBE GU 5 Si 2 9044 W 2 8696E B2 2 b614E 1 0 0000 1 EB 98HUE MI 5 7392E Bl 2 9644L fg 3 2938E 01 5 4 2 0644 Jd 2 443 02 3 5547E gl 7 4 DOBUE B1 Donan 81 1 S 7392E L 2 9644E 1 04087 h 7297F Ul P Uu44E HITAE 2 4 24 4E BL 8 0 000 0 8 6808 1 0 009
92. 5 NPVMX ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL HCC 5 NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX sNPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCTCNPVMX NPVI NPVT NCGF ICGF AD NPVCNT IPVNARCNPVMX COMMON RUNCOM NRUN IRUN ISPNTI O Pa CO I gt 9 DIMENSION JS NCTMX NCTMX NMTMX NSTMX k ge AC k Ye e Ye We e ik Ke Ye e e k k c e e e Yt Yk e e R Ya e Ya YK Sc c c Sc e Sc Ya Sc Ya Yk e c ic yk Cale Ye yk yc ole e ve e Ye aie oe e ge ee e e ve ve W Wk Wa yc cs CUSUM S2CS VARIANCE OF CUSUM CVT COVARIANCE BETWEEN TRANSFERS W e ve Ye ole Se Se e ke je Ye Se ye Ye Ye Ke Ye t ke e e Ke Yk le Ye Ye oe le e Ye e kc e e ee e Ya e e de e ve We e e We oe Wa e e je e e de ve W e e e ed A Fig D 1 cont 8347 9348 8349 8358 8351 8352 8353 8354 8355 8356 8357 8358 8359 9362 8361 2362 8363 8364 8365 8366 8367 8368 0369 8378 8371 2372 0373 8374 8375 8376 0377 9378 0379 9388 9381 9382 8383 8384 8385 8386 8387 0388 2389 8398 8391 8392 8393 8394 8395 0396 0397 0398 2399 9490 9481 0402 0403 0404 8485 8406 2487 8488 8499 8419 2411 0000 woe COMPUTE INVENTORY AND TRANSFER VARIANCES AND COVARIANCES DOWNSHIFT TRANSFER ARRAYS FOR COMPATIBILITY WITH 18 IF IRUN EQ 1 CAL
93. 5 9 4615E 92 4 8828 4 9 0 0000 01 0 0020 01 8 0008 01 6 1835 05 9 4615 82 2 9570t 02 6 1035 06 9 4615 02 5 4932 04 18 8 0809 01 B2 9898E 81 0000 01 6 1035 05 4 4615 02 2 9670 2 6 1035C 605 9 4615 02 6 1935 04 11 21 8888 81 0 000 91 1835 85 9 4615 02 2 9670 02 6 183156 856 9 4615 82 6 7139 4 12 6 8088E 71 8 8898 1 000 01 6 1035E 25 9 4615 02 2 9678E 22 6 1035 85 9 4615 2 7 3242E 24 13 0 0008 01 0 08000 01 9 0098 81 5 1835 5 9 4615 02 2 9678E 22 6 1035 05 9 4615 02 7 9346E L4 14 0 0828t 01 8 0002 01 8 0000 01 6 1835 05 9 4615 02 2 967BE B2 6 1835 05 9 45 5 2 5449 4 15 0e 0888E 41 Z 0b8GE 71 0 0800 01 6 1835 85 39 4615E 02 2 9670E 82 5 1035E 25 9 4515 2 9 1553 4 16 9 0H40E 21 98 0000 01 28 0008 81 6 1835 05 9 4615 02 2 9678 82 6 1815 05 9 4615 02 9 7656 4 17 0606 01 B 048BE 81 68 0000 01 6 1835 85 9 4615 02 2 9670 02 6 1835 05 9 4615 02 1 0376E 03 18 4 90D4E 21 00808 01 8 8888 81 6 1835 85 9 4615 02 2 9670 02 6 1835 05 9 4615 02 1 986 03 19 0008E g1 8 0000 01 0 00 0 01 6 1835 08 9 4615 2 2 9676E 82 6 1035 05 9 4615 2 1 1597 03 28 2 94YBE 81 8 8000 01 0 0000 01 6 1635 05 9 4615E 82 2 9678E 82 6 1035 05 9 4615E 02 1 297 23 21 B 6088E 01 80 0000 01 0 00800 01 6 1035 05 9 4615 02 2 9678 82 6 18
94. 520 5 TOP VOLUME INITIAL VALUE 97 888030 SIGMAE SIGMAN 1 SIGMAN 2 gt MESTYP 1 INTCAL 2 9 920000 8 800088 25 089800 1 19088 10958 6 BOTTOM VOLUME IRITIAL VALUE 198 894808 SIGHAE SIGMAN 1 SIGHAN 2 MESTYP INTCALI1 INTCAL 2 8 000000 8 888088 22 000202 1 18998 19688 7 CONC ZEN INITIAL VALUE 9 978528 SIGNAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 188688 8 288828 28 800080 1 18882 18088 8 TOP VOLUME INITIAL VALUE B1 509628 SIGHAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL CI INTCAL 2 8 800008 5 808000 2 000000 1 188908 18000 8 BOTTOM VOLUME INITIAL VALUE 133 208899 SIGMAE 516 1 SIGMAN 2 MESTYP INTCALCI INTCAL 2 8 828888 8 899288 8 004000 1 14898 19998 18 FLOW RATE 2 INITIAL VALUE 160 008088 SIGMAE SIGMANCI SIGMANIZ MESTYP INTCAL C1 1 2 9 028098 33 028080 8 880888 t 2 18808 11 CONC 28P INITIAL VALUE 2 835872 SIGMAE SIGMAN 1 516 2 MESTYP INTCAL 1 INTCAL 2 2 860888 29 210082 29 089408 1 19938 19039 Fig 13 Output file Example 3 54 IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPVCNT 18 wawww NUMBER OF INVENTORY PROCESS VARIABLES INPV 18 NUMBER OF TRANSFER PROCESS VARIABLES NPVT NUMBER OF INVENTORY COMPONENTS NCI NUMBER OF TRANSFER COMPONENTS NCT NUMBER OF INVENTORY MEASUREMENTS NM1 lt 1 NUMBER OF TRANSFER MEASUREMENTS NMT 2 NUMBER OF INVENTORY SY
95. 6 0097 8998 8899 8199 8101 2122 2183 0104 185 8196 2187 2128 2189 0110 96 000 000 28 17 MEASUREMENT OUTPUT DECANAL READ 1 28 MESINP 1 1 1 3 READ 1 28 H PVARA 1 1 1 3 READ 1 28 DCNLINC1I 11 3 CALL SRCHSS 5 DCNLIN 6 18 2 2 CALL SRCHSS 5 MESOUT 6 11 2 2 CALL SRCHSS 1 MESINP 6 7 2 2 CALL SRCHSS 1 PVARA 6 8 8 9 CALL SRCHSS 3 RNSMES 6 9 2 8 CALL SRCHSS 2 DCNLIN 6 19 9 2 CALL SRCHSS 2 MESOUT 6 11 2 2 TRACE 300 Yoko SET FILE NUMBER ve e e We Me e e eee 39 READ INPUT DATA wwwwwwwwwwwww wawww BEGIN MEASUREMENTS www wwwwwwww A8 NDAT 11 NPVIN 12 NFSEED 13 NDECIN 14 NPROUT 15 NLR NPROUT 4 CALL ATTDEV NPROUT 8 NLR 66 CPTIMI CTIMSA IBLANK WRITECGNPROUT 38 MESINPCI IS1 3 2 CPVARACIO 1 1 3 CDCNL INCID Ix1 3 FORMATCIH1 INPUT DATA FILE 3A2 PV ARRAY FILE 1 OUTPUT DECANAL FILE CALL MESIN NRUNA NRUN IF NRUN EQ 1 GO TO 78 MRITE 1 52 ISPNTI 3A27 502 FORMAT We Yk c Wee Yk je k je We 1 BEGIN MONTE CARLO ISOLATION RUN ON UNIT PROCESS I2 68 78 8g 98 199 119 2 NRUNA NRUN 1 DO 68 I 1 NBALP1 SUM I 8 DZ SUMSQ I DZgG CONTINUE DO 118 IRUN 1 NRUNA WRITE 1 88 IRUN FORMAT RUN NUMBER e 14 IF NRUN EQ 1 GO TO 90 12 IFCIRUN EG 1 IZE 1 CALL MESDRV D
96. 6 3 869693D 8 317 968 348 115 1 89484 OK 47 3 9B1794D 88 328 199 291 746 8 918286 48 1 289228D 89 324 858 378 565 1 14351 OK 49 2 637879D 326 637 481 298 1 22796 OK 58 3 2331250 28 338 237 379 756 1 14998 Fig 10 cont is given on p 2 of Fig 10 and the results of the 100 sample Monte Carlo run follow The limits for the 95 confidence inter val are also given From the table it can be seen that at mate rials balances 6 and 44 the ratio of the sampled to propagated variances lies outside the 95 confidence interval This is a normal situation and does not necessarily suggest errors in the variance calculations Example 3 This example demonstrates the use of pulse column inventories and transfers computed from the product of flow rate and concen tration block diagram for this process is given in Fig 11 This small UPAA represents a portion of the Plutonium Purification Process PPP from the Allied General Nuclear Services AGNS reprocessing plant in Barnwell South Carolina It is assumed that flow rate and concentration measurements are taken every hour and materials balance calculations every 10 h The process variables required for this example are summa rized in Table X Because 5 process variables are required for each column inventory and 2 process variables for each transfer it would be logical to assume that 14 process variables would be required to model this process However three of the proces
97. 63984214 164960264 491428187 1352537143 271783562 T 52 MAT BAL S2XMB CUSUM g 8008E 01 92 8000 0 B BBBBE 21 O BABBE B 8 00D80E D 3B D800E 21 9 5367 7 1 4980t 82 7 4900 03 9 5367E 27 3 49BB0E 82 9 5367E 2 9 5367 07 j 49B8t 82 7 49 3 9 5367 07 3 4980 02 1 9D73E D6 9 5357E 97 1 4988E 02 7 49MBE 83 9 5367E 8 3 4988 02 2 8618E 06 9 5367 87 1 4980 02 7 4980 03 9 5367 07 3 4980 82 2 8147 06 9 5367E 87 1 4980 02 7 4900 03 9 5367 87 3 4988 2 4 7684 06 9 5367E 87 1 4980E 82 7 4998E 83 9 5387 07 23 4980 2 5 72200 96 9 5367 87 1 4988 02 7 4480 03 9 5367 07 3 4988 02 6 6757 06 9 5367E 07 1 4988E 82 7 4988E 03 9 5367E 87 3 498BE 02 7 6294E 06 9 5357E 87 1 4980E g2 7 4998E 83 9 5367E 87 3 4980 02 B 5831E P6 9 5367 7 1 4988 82 7 4988 83 9 5367 87 3 4988E 82 9 5167 86 9 5367E 97 1 4980 02 7 4989E 83 9 5367 7 3 4988 82 1 049 05 9 5367 07 1 4980 02 7 4988E 03 9 5367 87 3 4980E 22 1 1444E 05 9 5367E 87 1 4980 02 7 4900 03 9 5357 07 3 4980 02 1 2398 05 9 5367E 27 1 4988E g2 7 4988E 83 9 5367E 87 3 49B8E 82 1 3351 05 9 5367E 87 1 4980 02 7 49090E 83 9 5367E 87 3 49B88E 82 1 4385E 05 9 5367E 87 1 4 80 02 7 498 83 9 5367 07 3 4980 02 1 5259 05 9 5357E 07 1 4980 02 7 4988 03 9 5367E 87 3 498 82 6212 05 9 5367L 07 1 4980 02 7 4988E 03 9 5367 87 3 4988 02 1 7166E 05 9
98. 7 Output transfer as the product of flow rate and concentration 8 Output transfer as the product of con centration and the difference between an initial and final weight IPVNO I J Process variable number for the Ith 0 process variable in the Jth inventory or transfer ISPNTI Specific transfer or inventory set to be 0 calculated When ISPNTI 0 all the transfers and inventories for the UPAA are calculated SIGMAE 1 Standard deviation of the uncorrelated 0 error for the Ith process variable SIGMAN I 1 Standard deviation of the short term cor 0 related error for the Ith process variable SIGMAN I 2 Standard deviation of the long term cor 0 related error for the Ith process variable 24 TABLE VI cont Default Variable Description Value MESTYP I Measurement error model type selector for 1 the Ith process variable 1 multiplicative model 2 additive model 3 multiplicative for random and short term correlated errors Additive for long term correlated errors INTCAL I 1 Number of transfers between recalibra 10 000 tions for the short term correlated errors INTCAL I 2 Number of transfers between recalibra 10 000 tions for the long term correlated errors HCC I J Ith holdup constant for the Jth pulse None column VCC I J Ith volume constant for the Jth pulse None column CCC I J Ith concentration constant for the Jth None pulsed column corresponding to a transfer or inventory Only in the case of pulse column inve
99. 8 B IPVPRT PRINTS PROCESS VARIABLE FILE WHEN NON ZERO 19 B ICLAPS REDUCES DIMENSIONS OF DECANAL INPUT FILE WHEN NONZERO 28 21 x w INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA 22 23 3 NPV NUMBER OF PROCESS VARIABLES 24 3 NTRIN NUMBER OF TRANSFER AND INVENTORY SETS IN THE PROCESS 28 ITIN INVENTORY TRANSFER NUMBERS 51 5 7 IPVNO PROCESS VARIABLE NUMBER CORRESPONDING TO EACH INVENTORY OR TRANSFER 17 INPUT TRANSFER 2 INVENTORY 3 OUTPUT TRANSFER ISPNTI SPECIFIC INVENTORY TRANSFER SET NO 8 GIVES ALL SETS remar A MEASUREMENT ERRORS ASSOCIATED WITH EACH PROCESS VARIABLE INPUT TRANSFER 1 21 3 20 2 INVENTORY 17 3 de de 0 0 C Q CJ O Q PO 0 SQ 40 00 On Ud Wve IQ xb D Oh wee ee aae a as t a a a Ka QUTPUT TRANSFER 43 1 85 81 3 22 TO om RRR RRR RAR RR RRA AAR RRR A A A A A A A aa Fig 9 Input data Example 2 In this case the process variable file must contain many more transfers per set than inventories because there are 10 transfers for every materials balance interval With the number of materials balances NBAL at 50 and the number of transfers per balance NTRPBL at 10 it follows from Eqs 8 and 9 that the minimum number of inventory and transfer process variable values per set will be 52 and 513 respectively Although the output transfer has only one tr
100. 8 0000 01 8 8069E 81 5 1035 05 9 4615 02 2 95 8 02 6 1835 05 9 4515E 82 2 8687 48 1 8 0002E 71 8800 1 6 1835 85 9 4615 02 2 9670E 02 6 1835E 85 9 4615 02 2 9297 83 49 8 21 0000 01 0 0080 01 6 1035 05 9 4615 02 2 9670 02 6 1835E AS 9 4G15E 42 2 9907E 03 58 8 0000 01 8 0800 01 0 0000 01 6 1035 05 9 4515 82 2 9670 2 6 1035 05 9 4615 02 3 0519 03 e Fig 16 cont 62 S2CUSUM 0 0040 9 4615 2 4057 4 6196 91 ge gi 1 7 3450 8 1 8655E 1 457 1 9884E 2 4184E 2 987BE 3 6164E 4 3844 5 0518 5 85 5 6 7245 7 6498 8 6345 9 6786E 1 8782 1 1845E 1 31 7 1 444UE 1 5789E 1 7139E 1 8648E 2 4lo7E 2 174055 2 3343E 2 5079 2 6835 2 65 2 52 3 245 3 4453E 3 6536 3 861 4 0730E 4 3828E 4 5318 4 568E 5 0898 5 2537 5 5054 5 7 6 8592 2 1475 7 4418 7 742 vg 80 ga go 99 eo Lu BQ RARA AA RESULTS MONTE CARLO SIMULATION WITH 188 SAMPLES NRWARXRARARRRKNARARTERKARAATRRNARENEANARAATERRARHATRAR CHI SQUARE N 1 RATIO FOR 95 CONFIDENCE UPPER LIMJT 1 29223 LOWER LIMIT 8 735473 CUSUM CUSUM CUSUM RATIO BALANCE SAMPLE PROPAGATED SAMPLE SAMPLE NUMBER AVERAGE VARIANCE VARIANCE PROPAGATED 1 6 6912380
101. 81 2482 8483 2484 8485 2486 0487 0488 0489 0490 2491 2492 8493 0494 0495 50496 0497 8498 8498 0504 0501 0502 8593 8504 0505 9506 0587 0508 0509 8518 8511 8512 8513 8514 8515 8516 9517 8518 8519 8528 8521 8522 8523 8524 8525 0526 8527 8528 0529 8538 g531 8532 2533 0533 0533 0533 9533 8534 9535 8535 0535 288 218 DO 218 KK 1 NCI DO 218 L 1 NMI DO 200 M 1 NST IFCICI K KK L LT M GO TO 288 CALL MTFIX 2 1 K L M XX1 CALL MTFIX 2 I KK L M XX2 XICVEXICV XX1 XX2 SISCK L M SISCKK L M CONTINUE CONTINUE Jodido RR TOTAL CUSUM VARIANCE 228 S2CS I 2S2CST 2 XICV CONTINUE IFCIRUN GT 1 GO TO 300 S2CS 1 8 BE9 COVARIANCE BETWEEN ADJACENT TRANSFER BLOCKS 238 248 258 268 278 288 290 308 IFCICLAPS NE 2 GO TO 300 DO 298 I 2 NBALP1 IR1 I 1 NTRPBL 1 JST IR1 NTRPBL NNF IR1 1 IR2 I NTRPBL DO 280 IR IR1 IR2 JF IR1 1 DO 278 KK 1 NCT IF T IR KK EQ 8 GO TO 270 DO 250 K 1 NCT DO 258 L 1 NMT DO 248 M 1 NST IF TCI K KK L LT M G0 TO 249 wx we RICOH CHECK FOR RECALIBRATION IDUM NCAL K L M IF MOD CNNF IDUM EQ 2 GO TO 240 DO 238 J JST JF IFCTCJ K EQ 2 0GO TO 230 CALL MTFIX 4 J K L M XX1 CALL MTFIXC4 IR KK L M XX2 CVTCIO ZCVTCIO XX1 XX2 STSCK L M STSCKK L M C
102. 812828 2 000009 8 682808 18888 18888 4 CONCENTRATION INITIAL VALUE 8 858088 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 919098 8 889888 8 888888 H 19889 19888 5 TANKZ VOLUME INITIAL VALUE 188 808888 SIGMAE SIGHMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 0 818808 8 888288 2 020009 1 18880 19888 6 TANK2 CONCENTRATION INITIAL VALUE 8 858885 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 H 8 818888 8 888888 8 888888 18888 18888 7 MASTE PU INITIAL VALUE 8 818828 SIGMAE SIGMAN 1 SIGMAN 2 gt MESTYP INTCAL 1 INTCAL 2 8 818808 8 818888 8 888988 1 18882 10088 B PRODUCT PU INITIAL VALUE 4 999008 SIGMAE SIGMANCI SIGMAN 2 MESTYP INTCAL 1 2 8 819888 2 818988 8 988888 1 18888 18288 Fig 7 Output file Example 1 43 44 w wwawaaanananaawnnnanaanaqk IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMRER NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPVCNT 8 INVENTORY PROCESS VARIABLES NPVI 4 TRANSFER PROCESS VARIABLES 4 INVENTORY COMPONENTS NCI TRANSFER COMPONENTS NCT INVENTORY MEASUREMENTS NMJ 2 TRANSFER MEASUREMENTS NHT 2 INVENTORY SYSTEMAT C ERRORS NSI 2 TRANSFER SYSTEMATIC ERRORS NST 1 RANDOM NUMBER STREAMS NNSTRM 12 PULSE COLUMNS NCOLUM INITIAL RANDOM NUMBER S
103. 8E 82 7 4980 03 9 5367 07 3 4988E 02 1 2498E 95 1 9087E 1 9 5367 7 1 4988 82 7 4908 82 9 5367E 87 3 4988 82 1 1444 5 1 1884E 8 0080 01 9 5367L 07 1 4980 02 7 4900 03 9 5367E 87 3 4989E 02 1 23985 9 1 3832E B 8888E 81 9 5367 07 1 4980 02 7 4988E 83 9 5367 87 3 4988 82 1 3351E 25 1 5929E 8 8888E 8 9 5367 7 1 4988E 92 7 4988E 83 9 5367E 87 3 4980 02 1 4305 05 1 8176 B 4909E 91 9 5367E 87 1 4980 02 7 49080E 83 9 5367 07 3 4U488E 42 1 5259 05 2 0573 1 9 5357E 87 1 4988 82 7 4980 83 9 5367E 07 3 4980 02 1 6212E 05 2 3119E B BBBBE B1 9 5367 07 1 4988E 02 7 4900 03 9 53676 0 3 4988E 82 1 7166 05 2 5816 8888E 81 9 5367 07 1 4980 82 7 42948E 83 9 5357E 27 3 4980 2 1 8120 5 2 8662E 8 088gE 81 9 5367 8 1 4988 82 7 4988 83 9 5367 07 3 4988E 82 1 9873E 85 3 1658 8 0888E 01 9 5367E 27 1 498 02 7 4980 03 9 5367 07 3 4988E 02 2 8027 05 3 48 4 8 0000 01 9 5367 07 1 4980 92 7 4900 03 9 5357 07 3 4988 82 2 8981F 85 3 8899 8 0080 01 9 5367 07 1 4988t 82 7 4988 83 9 5367E 47 3 4988 82 2 1935 85 4 1545 1 9 5367 7 1 4980 02 7 4908E 83 9 5367 07 3 4949E 82 2 2842E 85 4 5148F 8000 81 9 5367 07 1 4988E 82 7 4908 03 9 5367E 87 12 49 02 2 3842E 85 4 8BB5E 8 0808 01 9 5367 07 1 4988 82 7 4900 03 9 5167 87 3 4988E 82 2 4796
104. 8UE 1 8g88E 1 8808E 1 8808E 1 0888 1 1 8880t 1 8888E 1 8886E 1 8888t 1 8088E 1 8885E 1 8888t 1 888BE 1 8808E 1 80508E 1 A086 1 1 UBIL 1 8828t l1 R8888E 1 0888E 1 0080 82 02 82 ge 82 82 2 8 0000 01 8 0200E 21 8 O888E B1 8 0880 01 8 0000 81 0 0808 601 8 0008 01 01 8 8008E 21 8 0006 01 8 0000 01 g AARBE 81 8 0000 01 8 82 16 01 9 8LJyBE 81 8998 81 8 8888E 21 8 8080E 21 0 8000 01 8 02098E 21 8 8888E 81 8 0088E 21 8 8008 01 8 8299E 1 8 0088E 21 81 8 0909E 01 g 08088E 21 8 000 81 8 8888E 81 8888E 8 8 8888E 81 2 01 g 0888t 21 g 8888E 01 g 0880E 21 8 80988E 01 g 898898E 0 g 0808E 81 8 8880E 21 B 8BggE 2 0 8 8008E 21 9 98880E B1 B 88806E 51 3 004BE 81 1 8 8800E 21 B BHE0t 81 M 8880E 81 1 B 8808E 8 8 0900E O1 0 0880 01 8 0800 81 0 0008 01 8 0000 01 0 0000 01 8 00008 01 g g80gE 21 8 B00BE 8l 8 0808 01 8 0800 01 8 800086 01 8 00080 01 8 08008 01 8 88808 01 8 0880 1 B 82880E 21 8 8088E 81 8 0000 01 8 0008 01 8 9288E 01 0902E 91 8 00800 01 8 0002 81 g 8882E 2I g 8B88BE gl 9 8028t 21 0800 01 8 9890 91 D098E B1 8 0880 81 2 BABAE B1 3 89D8E 21 8 8808E 21 8 8808E 21 8 9888E 21 0880 01 g 98080t 81 B 8088E 21 8 9088E g1
105. 9 2329 2321 2322 2323 2324 2325 2326 2327 2328 2329 2332 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2255 2356 2357 2358 2359 2360 2351 2362 2363 AAANA oa WRITE 1 60 5g eg ATTEMPTED TO READ IN 13 VALUES INTO ARRAY GO TO 90 78 IF NPVCT I LE NTMXP2 GO TO 118 WRITECI BZ NPVCT CI WRITE GNPROUT 82 NPVCT CI 80 FORMAT ATTEMPTED TO READ IN 13 VALUES INTO PVT ARRAY 90 WRITE 1 100 100 FORMAT wx w x x RUN TERMINATED HAR Hw CALL CLOSEM 118 CONTINUE Wwwwwwwwwwwwwk SET NPVIT ARRAY KI 8 KT DO 138 I 1 N IFCIPVTRNCIJ GT 2 GO TO 120 KI KI 1 NPVIT I KI GO TO 130 128 KT KT 1 NPVIT I KT 138 CONTINUE INPUT VALUES TO THE AND PVT ARRAYS DO 158 J 1 N NPVITJ NPVIT J NFC NPVCT J IF IPVTRN J GT 0 GO TO 140 PVISCI NPVITJ I 1 NFC GO TO 150 140 PVTSCI NPVITJ 1 1 NFC 152 CONTINUE RETURN END SUBROUTINE RNORM COMMON MSRNRM RN1 RN2 ISTRM DATA TWOPI 6 283185307 PARAMETER TWOPI 6 283185387 e ve We ik k k k e ESS ke Ya Ya Wa SES ESSE SEE TESA ESE AST e e ie Wa ike ke k Ya ke TTS c c ik e Ya SPS k k jt ee e K O Ye ee exe RETURNS TWO NORMALLY DISTRIBUTED RANDOM NUMBER
106. 9 2984 2881 2881 2981 2081 2881 22882 2893 2483 2483 2883 2883 2883 2883 2884 2885 2086 2887 2088 2089 2092 2091 2892 2893 2894 2045 2996 2897 2898 2899 2108 2181 2182 2183 2184 2185 2196 2187 2198 2199 2118 IS TO N PO t ten NOJ i 340 00 07 I CO u et 0000 ono SUBROUTINE PROCESCIPV ITRIN PARAMETER NBALMX 125 NBMXPI NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX S15 NTMXPIZNTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX218 NPVTMX B NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMXz22 4 NCOLMXx2 COMMON CON NBAL NBAEP1 NBALP2 NTRPBL NTRN NTRNP 1 NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVITCNPVMX IBLANK 1 NPVIN NDECIN IRNSCH ITINCNPVMX NCITST NFSEED INTRNC 2 5 IMESPR ICLAPS 3 ICTRN ICINV NCOL NPVMX HCC S NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX 4 NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR A 5 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX DIMENSION IPV 3 CALLS THE INDIVIDUAL PROCESS ROUTINES TO COMPUTE MEASURED VALUES I
107. AEKRKXATABNRWEARERTANEANARHASAYT MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE 1 INPUT VOLUME INITIAL VALUE 189 909099 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 9 919000 8 010008 0 000998 H 10008 10899 2 INPUT CONCENTRATION INITIAL VALUE 8 950898 SIGMAE 1 SIGMANC2 MESTYP INTCAL 1 INTCAL 2 0 518800 0 019080 6 oopggn 1 18988 19008 3 VOLUME INITIAL VALUE 1898 889098 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 9 919932 8 008 90 000088 1 10000 19098 4 TANKI CONCENTRATION INITIAL VALUE 5 050088 SiGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 819288 000008 8 000008 1 10388 19888 5 TANK2 VOLUME INITIAL VALUE 182 088288 SIGMAE 5 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 619038 8 000000 o opgoen 1 18688 18808 6 2 CONCENTRATION INITIAL VALUE 8 858908 SiGMAE 516 1 SIGMAN 2 MESTYP INTCAL ED INTCAL 2 9 010000 By BUBROB 0 200000 1 10088 10098 7 WASTE PU INITIAL VALUE 2 818888 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP 1 INTCAL 2 4 810080 38 018200 0 000048 1 18888 18828 8 PRODUCT PU INITIAL VALUE 4 998008 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP 1 1 2 8 810820 8 818888 2 900298 1 19099 19908 Fig 3 Example of primary output file 30 ARAWRWHRARAVATARAWRWKRRARRRREWVARKUNREZWARARTAHTANEAATANATANRUN IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETHAS PROCESS VARIABLES U
108. AL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCALC NCTMX NMTMX 2 NPVITCNPVMX IBLANK 52 TTSUM NBMXP1 52 5 1 S2TBSM NBMXP1 S2T NTRNMX CS NBMXP1 S2CS NBMXP1 TTONTRNMX 1 IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC Fig D 1 cont 105 8645 8645 8645 8645 8546 8647 9648 8649 8659 0651 8652 8653 0554 8655 8656 2657 8658 8659 8662 2661 8662 2663 0664 2665 8666 8667 2668 2659 2678 8671 8672 8673 8674 8675 0676 0677 8678 0679 0680 2681 8682 8683 9694 8685 8686 2687 9688 0683 0690 0690 0690 8699 8692 8591 0692 8693 2694 2695 2596 8697 8698 9699 9798 9791 0782 106 oo000000 2 ITRANCNPVMX 5 NPVMX D NTRIN MASPRT ITIPRP IMESPR ICLAPS 3 ICTRN ICINV 5 NCOLMX VCC 2 NCOLMX2 CCC 3 NCOLMX 4 NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 5 NPVCTCNPVMXD NPVI NPVT NCGF ICGF A NPVCNT DIMENSION IPV 1 PVCI IPV PROCESS VALUE OF FIRST MEASUREMENT PVCI IPV 1 PROCESS VALUE OF SECOND MEASUREMENT ICINV ICINV IF ICINV LE NCITST GO TO 24 WRITE 1 19 IPV 1 WRITE NPROUT 10 1
109. ANCE OF TRANSFER SYSTEMATIC ERRORS TCICNCT NCT NMT TRANSFER CORRELATION INDICATOR TSCIC NCT NMT TRANSFER SEQUENTIAL CORRELATION INDICATOR NCTNOW NCTNOW 1 IF ITINN 4 NCT NCT 1 00 188 I 1 IF NPVCNT NPVCNT 1 IPVNARCNPVCNT lt NRNSsNRNS 1 ISTRNR IPVNCI ZNRNS VTR NCTNOW I 8SIG2E CIPVNCIO STRCONCTNOW I 2SQRT CVTRCONCTNOWV 12 IMTT NCTNOW 1 MESTYP IPVN 1 DO 188 J 1 2 NCAL NCTNOW 1 J INTCAL IPVN 1 J VTSCNCTNOW 1 9 SIG2N1 1PVN 1 J STS NCTNOW J SQRT VTS NCTNOW 1 J IF VTS NCTNOW 1 J EQ 0 GO TO 180 NRNS NRNS 1 IFCJ EQ 1 ISTRNSCIPVNCIO SNRNS IF J EQ 2 NST 2 TCIC GNCTNOW NCTNOW 9 TSCI NCTNOW 1 CONTINUE GO TO 338 CONTINUE TRANSFER AS PRODUCT OF FLOW AND CONCENTRATION T CCI I FCI 1 CCIJ FCI 9 CCI ID FCI CCIO FCI 1 2 DT 3 NPVT NPVT 2 NCT NCT 4 NMT 2 IS NCTNOW 1 DO 210 1 1 4 NCTNOW NCTNOW 1 DO 218 Jz1 NMT IFCI NE 1 0GO TO 207 NPVCNT NPVCNT 1 IPVNARCNPVCNT D IPVN d NRNSzNRNS 1 ISTRNRCIPVNCJ NRNS CONTINUE VTRCNCTNOW 9 5162 2 STRCNCTNOVW J SORTCVTRONCTNOW 22 IMTT NCTNOW amp MESTYPCIPVN CJ DO 218 K 1 2 J K SeINTCALCIPVNCOO K J K eESIG2NCIPVNCI K STSC NCTNOW SQRTCVTSCNCTNOW 2 K IFCI NE 1 GO TO 214 IFCVTSCNCTNOW J K EQ 2 GO TO 218 NRNSzNRNS 1 IF K EQ 1 ISTRNSCIPVNCJ ZNRNS IF K EQ 2 NST 2
110. ANDOM NVENTORY EQ 2 SYSTEMATIC INVENTORY EQ 3 RANDOM TRANSFER EQ 4 SYSTEMATIC TRANSFER 1B BALANCE NUMBER NC COMPONENT NUMBER NM MEASUREMENT NUMBER NS SYSTEMATIC ERROR NUMBER XX COMPENSATING FACTOR PARAMETER 125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXPI NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX212 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 NMTMXs2 NSIMXz2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 COMMON VAR XI NBMXP2 NCIMX S2I NBMXP1 CVICNBMXP L TUNTMXP 1 XIM NBMXP2 NCIMX NMIMXO S2T NTRNMX CVTCNTRNMX CS NBMXP 12 SZCS NBMXP 12 XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TR NTRNMX S2TBCNTRNMX TTSUMCNBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP 1 COMMON MESPAR SIGMAE NPVMX SIGMAN NPVMX 2 SIG2E NPYMX SIG2N NPVMX 2 MESTYPCNPVMXD INTCALCNPVMX 2 ISTRPVCNPVMXD IZE IMTI NCIMX NMIMX IMTT NCTMX NMTMX ISTRNRCNPVMX 15 8 GO TO 10 20 60 70 MT 18 CONTINUE RANDOM INVENTORY ono IFCXX EQ 8 RETURN IFC IMTICNC NM EQ 2 XX XX XIMCIB NC NM RETURN 20 CONTINUE kk SYSTEMATIC INVENTORY XX2XICIB NC IFCXX EQ RETURN ITST IMTICNC NM 2 IFCITST 38 50 40 38 RETURN 48 IF NS EQ 1 RETURN 50 XX XX XIMCIB NC NM RETURN
111. ANE 81 8 2006E B1 1 9 9899 A1 8 80G88E 01 Bg gongE 01 ERT A 8 0000 01 RATIO OUTSIDE INTERVAL S2CUSUM 8 8000 01 2 161 2 0424 2 0589 2 0856 2 102 2 1296 2 1469 2 1745 2 1922 2 2281E 2 2382 2 2665 2 2B51E 2 313BE 2 3327 2 3618E 2 3812 2 4187E 2 4384E 2 4684E 2 4885E 2 5189E 2 5314 2 5621 2 5831 2 6142E 2 6356 2 6671 2 6889E 2 7288E 2 74308 2 7754 2 7979E 2 83 7 2 8536 2 886BE 2 9182 2 9438E 2 9675E 3 8815E 3 0257 3 0601 3 8846 3 1194 3 1444E 3 1796 EE 3 24 6 3 2664E 3 3924 B2 82 848979D 21 266 713 319 813 1 19689 B 28 3 7811530 88 268 888 299 387 1 11313 Ok 1 832231D 8 222 884 278 789 8 995241 31 1 379149D 82 274 398 229 888 8 838889 32 7 8030210 81 277 535 284 084 1 82331 33 2 5948080 89 2 9 792 388 179 1 87287 OK 24 1 5059290 og 253 068 382 619 1 86984 OK 36 2 2578860 eg 285 365 321 154 1 12542 36 1 246385D 89 288 682 313 598 1 98663 OK 37 6 317782D 81 291 818 386 523 1 85328 OK 38 1 8139440 g 294 375 343 788 1 16786 38 1 4670770 89 296 753 371 228 1 25894 Ag 3 8570550 898 388 151 276 636 8 921656 41 1 587791D 88 382 558 326 287 1 87482 42 2 414858D 88 336 886 336 894 1 89832 43 2 463352D eg 388 464 345 812 1 12128 44 3 7995340 88 311 943 413 736 1 32632 RAT U 45 2 5958300 88 314 441 346 919 1 18329 EEN 4
112. AY OF PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER OR INVENTORY IPVNO TRANSFER INVENTORY PROCESS VARIABLE NUMBER NUMBER 41 2 3 4 5 1 1 g g 8 g 2 g g 8 D 3 3 D D g 8 SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI Y LTE BEGIN READING IN PROCESS VARIABLE ARRAY NUHBER OF DIFFERENT PROCESS VARIABLES IN ARRAY lt 3 IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 181 NUMBER OF VARIABLES IN PV ARRAY FOR EACH PROCESS VARIABLE 515 55 515 READING OF PROCESS VARIABLE ARRAY COMPLETE RRRRARARTARPARARRARAETRORERR ENESTARARARRERREASATEERERRRAA MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE 1 INPUT TRANSFER INITIAL VALUE 1 000808 SIGMAE SIGMANC1 SIGMAN 2 1 1 12 3 0 108088 8 058822 8 818888 eg 18980 2 INVENTORY INITIAL VALUE 188 808888 SIGMAE SIGMANCI SIGMAN C2 MESTYP INTCAL 1 TNTCAL1 2 8 180088 0 000800 3 Sonoee 1 10098 18998 3 OUTPUT TRANSFER INITIAL VALUE 5 988808 SIGMAE SIGMAN I SIGMAN C2 MESTYP INTCAL 1 INTCAL 2 9 100882 8 858288 818882 3 28 10088 ARAMUNAMRARACARELARARARARARA RARAS AMA RARA RA RARA REAR IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPVCNT 3 NUMBER OF INVENTORY PROCESS VARIABLES NPVI 1 NUMBER OF TRANSFER PROCESS VARIABLES NPVT 2 NUMBER OF INVENTORY COMPONENTS NCI 1 NUMBER OF TRANSFER COMPONENTS NCT 2 NUMBER OF INVENTORY
113. BL in line 13 is set equal to 10 This example has three process variables one for each transfer and inventory The transfer measurement errors are set in lines 39 and 43 Uncorrelated short term correlated and long term correlated transfer errors are seen to have standard deviations of 0 1 0 05 and 0 01 respectively The mixed measurement error model is achieved by setting the fourth entry in lines 39 and 43 to 3 20 as the fifth entry on each of these lines indicates that the short term correlated transfer errors are recalibrated every 20 transfers or every 2 materials balances 45 MEASIM INPUT DATA EXAMPLE 2 SEPTEMBER 1981 7 Y w 4 PARAMETERS NBALMX 185 NTRNMX 515 NPVMXs12 NPVIMX 18 NPVTMX 8 1 1 NCTMX B NMIMX 2 NMTMK 2 NSIMX 2 NSTMX 2 4 NCMX 2 MXPMX 2 NSTRMK 28 NCOLMX 2 EXAMPLE 2 SEPTEMBER 1981 TEN INPUT TRANSFERS PER MATERIALS BALANCE 1 2 3 4 5 6 7 9 1 12 ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE 10 IRNSCH RANDOM NUMBER SEEDS CHANGE FROM RUN TO RUN WHEN NONZERO 11 1987 NRUN NUMBER OF RUNS 12 587 NBAL NUMBER OF MATERIALS BALANCES 13 18 NTRPBL NUMBER OF TRANSFERS PER BALANCE 14 2 DT TIME CONSTANT USED IN THIS EXAMPLE 15 8 MASPRT PRINTS MASSAGE DEBUGG OUTPUT WHEN NONZERO 16 g ITIPRP PRINTS TRANSFER INVENTORY SET NO AND PROC VAR NO IF Q 17 8 IMESPR PRINTS INPUT MEASUREMENT ERRORS WHEN EQUAL TO 1 1
114. COM NRUN IRUN ISPNTI DIMENSION IPVN 3 JPNTR 2 2 DATA JPNTR 1 1 2 3 ZERO THE MASSAGE INPUT ARRAYS DO 28 I NCIMX DO 20 J 1 NMIMX VIR I J 8 SIR I J 8 1 CONTINUE DO 28 L 1 NCIMX ICI 1 L J g 28 CONTINUE DO 48 151 Fig D 1 cont 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2439 2431 2432 2433 2434 2435 2436 2437 2438 2439 2449 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2455 2457 2458 2459 2469 2461 2473 2474 2475 2478 2477 2478 2479 2439 2481 2482 2483 C 38 4g 58 DO 48 J 1 NMTMX VTRCI J 8 STR I J 0 TSCI 1 J 9 00 30 K 1 VTSCI J K STSCI J K CONTINUE DO 40 Lei TCICI L 23 CONTINUE DO 58 I 1 NCIMX DO 58 J 1 NCTMX DO 598 K 1 NCMX ITCICI J K 028 CONTINUE wwwwwwwwkwww SET THE MASSAGE INPUT ARRAYS 62 78 80 TRACE 999 NCINOW Z NCTNOW 9 NPVCNT NPVI 0 NPVT 8 NCFRC 89 NCGF 9 NRNS ISTRT 1 IFIN NTRIN IFCISPNTI EQ 2 GO TO 60 ISTRT 1SPNTI IFIN ISTRT CONTINUE 0 NCT 8 NMI 1 NMT 1 NSI 1 NST 1 NCOLUM DO 350 ITRIN ISTRT IFIN DO 7H I 1 3 IPVN I IPVNO I ITRIN CONTINUE ITINM ITIN ITRIN IF ITINN EQ 0 GO TO 350 GO TO 80 80 110 110 170 170 190 240 CO
115. D 81 2 3 9 6248370 81 6 4 71 321154D 1 5 2 2072510 99 1 6 2 875409D 89 2 7 2 6388430 85 3 8 3 172722D 8 4 9 6857860 08 5 4 2836200 D CUSUM PROPAGATED VARIANCE 2 4101 533 228 22 139 899 69 785 34 449 56 321 89 332 82 471 85 749 48 CUSUM SAMPLE VARIANCE 76 4173 293 31 662 278 1217 4 1895 49 2710 74 3662 28 4755 76 6833 34 7505 24 SUMMARY FOR INVENTORY AND TRANSFER NUMBER 1 ARRRRDASTAAHRARAWAATATRREREATATATATRATARRATERAEAAEREESETTE EQ QO 00 lt Cn awn t 8 BUSBE O81 1 B8 8008E 21 8 908BE 81 0 0000 01 0 DUBBE 81 9 0008 01 8 0008E 81 g 0820gt 5l 4 BUBLE 11 g BLOIBE 41 521 8 0000E 21 UB GUBBE 81 1 9 90pgE 91 2 000 01 B BBSGE H1 g 8498gE 51 0 81 4 VOBGE 81 2 ARBRE B 4 BBUBE 81 8 0000 01 B8 D0UBE 91 RECH 8 8080E 21 8 0800 01 8408E 81 B QUUBE B1 OLUBE 81 U GB5KE B1 8 8829 1 9 0 0 T NWARARKAKARAYARSKAERE 8 9800E 21 5 7452 5 74 2 5 274528 5 7452E 5 7452 5 7452E 5 7452 S 7452E 5 7452 5 7452 gl gi gi Bl 81 ol gl 21 gi Bi Fig 52 9 8088E 7 2883E 7 2144E 7 2144 7 2144E 7 2144E 7 2144E 7 2144 7 2144 7 2144 7 2144E 64969264 491480187 39823648 Bi G8 0800E 81 6 9399 81 6 6683 01 6 9309 81 6 0683 81 6 93 9 01 6 6 83 01 6 9209 81 6 658
116. E EE IOI H He AAA CR ON A 1 RESULTS OF MONTE CARLO SIMULATION WITH 15 SAMPLES 2 k i e k We ie e k e kc Ye k Te Ya se ie We Ye je a k e ye a e e a ie e e Yee e ee ye ve e ye e k e ye e ko k k k k We Aa k ka ka Ye ka a Wa ae Wa ae e ka e e Ye a ce e ke WK Yk Ye e ke ke Ye Ye Ve K Ye Ye Wa Sk k ke e k k e Ye Ae ee Ye ge ge ge c e dc ec v COMPUTE SAMPLE VARIANCE We e We WK Ya Ke e Ye k k k Ya e k Ke k e Wa a ke e Wa e e Ke SK k ka ia E ha Wa ke e je ie e e e YK a oe Ya Yk a e ia Ye ye Ya t k Ye Ye We i ee CES e e e Fig D 1 cont 2799 2800 2881 2882 2883 2804 2885 2886 2827 2828 2829 2818 2839 2848 2841 2841 2841 2841 2841 2842 2843 2844 2845 2846 2847 2848 2849 2852 2858 2852 2858 2850 2850 2850 2851 2852 2853 SUMSQ 1 2 XNRUN DBLE FLOAT NRUN TMP1 2 NRUN 1 TMP2 SQRT TMP 1 1 X2UP ZP TMP2 2 TMP1 X2LOW ZP TMP2 2 TMP1 WRITE NPROUT 298 X2UP X2LOW 28 FORMAT CHI SQUARE N 1 RATIO FOR 95 CONFIDENCE 1 5SX UPPER LIMIT G14 6 5X LOWER LIMIT G14 6 DO 30 I 2 NBALP1 SUMSQ I SUMSQ I SUM I 2 XNRUND CXNRUN 1 02 SUN I SUM 1 XNRUN CONTINUE WRITE NPROUT 42 48 FORMAT 16X CUSUM 12X CUSUM 11X CUSUM 11X RATIO 1 3X BALANCE GX SAMPLE SX PROPAGATED 8X SAMPLE 19X SAMPLE 2 3X NUMBER 6X AVERAGE 18 VARIANCE 8X VARIANCE 3 7X PROPAGATED
117. EEOS 18 42839332 63526641 273 785636 1973287924 225695806 M ATRARARARBNWARARAERAEASESAERATAMA 2 3 MAASARANATRAMARRARRERHRARARRWAHESATAUTRARKERKAMRQNASATKTE SUMMARY FOR ALL INVENTORIES AND TRANSFERS 1 G ro QN 17 tenantan XI 1 0000 1 JE t BABE 1 BUBLE 1 1 8888E 1 8898E 1 8888E 1 82988 1 0BBLE 1 0080 1 1 8888E 1 8808E 1 8888E 1 8898E 1 8888E 1 088UE 1 880988E 1 82880E 1 80888E 1 88E8BE 1 8888E 1 8888t 1 8888E 1 8880E 1 8888E 1 8888E 1 8888E 1 0998E 1 9080E 1 0000 1 88908E 1 BEBRE 1 8888E 1 880988E l1 8882E 1 89888E 1 8888E 1 1 00 1 888 1 88088E 1 1 1 8888E 1 88g8E 1 8888E 1 8008 1 0960 1 02886 gl 81 Bl Bl WAREATREKARWASAREN 521 1 0800 02 1 0008 02 1 8888E 22 J 8888 02 1 0600 2 1 8000 02 1 82 1 8000 02 1 8088t 82 1 8808E 92 1 8888E 02 1 02 1 8 82 1 0080 02 1 0008 82 1 8888t 82 1 8898E 82 1 8888E 82 1 8888E 82 1 8888E 82 1 888 82 1 0900 92 1 0988E 82 1 0000 02 1 0840 2 1 8808 02 1 8828E 22 1 8888E 82 1 8888 82 1 8848E 982 1 8888E 82 1 0098 92 1 88008E 22 1 0008 2 1 888 2 1 0080 82 1 8828 22 1 8898 2 1 88808E 82 1 8888 92 1 00809 02 1 09888E 82 1 8008 02 1 8888 82 1 2888 82 1 8088E 82 1 898
118. ERROR VISCI J K VARIANCE OF INVENTORY BIAS ERROR VTSCI J K VARIANCE OF TRANSFER BIAS ERROR ICICI I1 J9 INVENTORY CORRELATION INDICATOR Fig D 1 cont 107 8752 8763 8764 8765 8766 8767 2768 8769 8778 0721 2772 8773 8774 8775 8776 8777 8778 8779 8788 8781 8782 8783 8784 8785 2786 0787 8788 0789 2792 8791 8792 8793 8794 8795 8796 8797 8798 8799 2892 0801 8802 2883 88084 0805 0806 8897 9898 899 8818 2811 8812 8813 8814 8815 2816 8817 8818 8819 8828 8821 8822 8823 0824 9825 8826 108 00000000000000000000 Goo 18 28 38 TCI 1 11 J TRANSFER CORRELATION INDICATOR ITCI 1 11 J INVENTORY TRANSFER CORRELATION INDICATOR ISCI I J INVENTORY SEQUENTIAL CORRELATION INDICATOR TSCICI J TRANSFER SEQUENTIAL CORRELATION INDICATOR NOTE CORRELATION INDICATORS ARE INTEGERS OUTPUT XINVT TOTAL INVENTORY MEASUREMENT TR TOTAL TRANSFER MEASUREMENT CVIS T I1 9 K COVARIANCE OF INVENTORY SYSTEMATIC ERRORS CVTSCI I1 J K COVARIANCE OF TRANSFER SYSTEMATIC ERRORS VTIR VARIANCE OF TOTAL INVENTORY RANDOM ERRORS VTTR COVARIANCE OF TOTAL TRANSFER RANDOM ERRORS CVSIS I J K COVARIANCE BETWEEN SUCCESSIVE INVENTORY SYSTEMATIC ERRORS 5 5 1 2 COVARIANCE BETWEEN SUCCESSIVE TRANSFER SYSTEMATIC ERRORS CVITR 1 11 J K COVARIANCE BETWEEN INVENTORY TRANSFER RANDOM ERR
119. ETMAS have parameters in their calling arguments Also some DO loop 73 indices at the beginning of subroutine SETMAS are defined with parameters making it necessary to convert these to integers Subroutine DRAND computes uniform random numbers over the range 0 1 and is highly computer dependent For best results a user should replace the random number generator in DRAND with one compatible with his or her computer In applying the code to a given UPAA the first step is to define the process variables required to compute a materials bal ance These process variables could be generated by either a process model codel or in simple steady state cases with no process variations by a small code specifically designed to write arrays of constant values For he examples in this manual the process variables were generated from a small special purpose code given in Appendix C The process variables are input to the MEASIM code on a separate file With process variables defined the next step is to develop the input data file It may prove to be easier to start at the end of the file with the measurement error data Here each process variable requires the O s for uncorrelated and corre lated errors as well as the measurement type see MESTYP in Table VI and recalibration frequencies for the correlated errors The order of appearance for this measurement data must be consistent with the numbering of process variables as defined by the process
120. FT NPVTMX INTEGER 2 PVARA 4 PVDAT 4 1 1 10 18 FORMAT ENTER NAMES 1 1 INPUT DATA FILE 1 18X 2 OUTPUT PROCESS VARIABLE ARRAY FILE 2 ONE NAME PER FILE WITH A MAXIMUM OF CHARACTERS READ 1 20 PVDAT 1 1 1 4 READ 1 28 PVARA 1 I 1 4 Z8 FORMAT 4 2 LASE E E E E E E E E E OPEN FILES CALL SRCHSS 1 PVDAT 8 1 90 90 CALL SRCHSS 5 PVARA B 2 0 0 CALL SRCHS 2 PVARA 8 2 0 2 TNPUT DATA READ 5 NPV READ 5 NINV READ 5 NTRN IF NPV LE NPVMX GO TO 40 TOUM NPVMX FORMAT INPUT NPV IS GREATER THAN 14 GO TO 168 READ 5 XIPVTRN I I 1 NPV READ 5 CCID 151 38 48 ECHO CHECK OF INPUT DATA WRITE 1 58 NPV NINV NTRN 58 FORMAT NUMBER OF PROCESS VARIABLES NPV 13 1 NUMBER OF INVENTORIES NINV 13 NUMBER OF TRANSFERS 13 WRITECI 68 IPVTRN IA 1 1 NPV 60 1 t2813 WRITE 1 78 CCID IS1 NPV 78 FORMAT PROCESS VARIABLE VALUES 6G12 5 ERAAARARRRAAAR CHECK FOR ARRAY OVERFLOW POSSIBILITIES Fig C 1 FORTRAN isting of PVGEN PVTCNTRNMX NPVTMX NMDTRN NPVTMX TRANSFER INDICATOR ARRAY 1 INDICATES TRANSFER 8866 0067 0968 4069 0878 9071 8072 2873 8874 0075 8076 8877 00978 8779 982 9981 8082 0083 0084 50085 2086 10087 0088 9089 9090 0091 9092 9093 0094
121. GE output to compute equivalent inven tory and transfer variances and covariances Subroutine CUSUM also uses MASAGE output to compute the CUSUM variance 19 H Inventory Correlation Approximations If a measurement is common to two different inventories then these inventories are correlated because they both contain the same error see Appendix A Similarly if an inventory and transfer contain the same measurement then the inventory and transfer are correlated Appendix A shows that these correlations will have a relatively small effect upon the CUSUM variance under steady state operating conditions Therefore the MEASIM code does not include the effects of these correlations in the calcu lation of the CUSUM variance In addition although the code does include the effects of the correlated errors when calculating the inventory variance Appendix A shows that this inventory variance also has a small effect upon the CUSUM variance There fore under steady state operating conditions the inventory cor related errors can be assumed to be zero IV INPUT DATA The MEASIM code has been developed so that all process dependent information is handled through input No coding changes should be required when applying the code to different processes The only exception might be a change in the PARAMETER statement to adjust the dimensions of the arrays to meet the needs of a particular application Three input files are required to run th
122. GIN READING IN PROCESS VARIABLE ARRAY NUMBER OF DIFFERENT PROCESS VARIABLES IN ARRAY M 7 TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 11 11 NUMBER OF VARIABLES IN PV ARRAY FOR EACH PROCESS VARIABLE 115 115 115 115 115 READING OF PROCESS VARIABLE ARRAY COMPLETE WASARRRRAREATRERSSEEREAAAATARRAYKTRARAARARRRASERARARAERARARE Fig 16 Output file Example 4 61 MEASUREMENT ERRORS FOR EACH PROCESS VAR ABLE INPUT CONCENTRATION INITIAL VALUE 5 676038 SIGMAE SIGMANL1 SIGMAN 2 MESTYP INTCAL 3 INTCAL1 2 8 883958 8 881084 8 883280 1 19898 10088 2 FULL WEIGHT INITIAL VALUE 25 888882 SIGMAE SIGMAN SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 882888 8 981988 8 808888 2 19999 18008 3 EMPTY WEIGHT INITIAL VALUE B 59B098 SIGMAE SIGMAN L SIGMAN 2 MESTYP 1 INTCAL 2 8 882888 8 001009 2 008000 2 18288 18088 4 OUTPUT VOLUME INITIAL VALUE 75 688808 SIGMAE SIGMANCI SIGMAN Z MESTYP INTCALCI INTCAL 2 8 810808 8 8895988 8 089880 1 10089 19808 5 OUTPUT CONCENTRATION INITIAL VALUE 8 228827 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP 1 INFCAL 2 8 083008 2 071098 32 000092 1 18888 19998 IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS NUMBER OF PROCESS VARIABLES USED FOR THIS CASE NPYCNT 5 NUMBER OF INVENTORY PROCESS VARIABLES NPVI g NUMBER OF TRANSFER PROCESS VARIABLES NPVT 5 NUMBER OF INVENTORY COMPONENTS NCI 8 NUMBER OF TRANSFER COMPONENTS NCT 3 NUMBE
123. IATED WITH EACH TRANSFER OR INVENTORY IPVNO TRANSFER INVENTOR Y PROCESS VARIABLE NUMBER NUMBER 411 4 13 145 5 1 1 g D 8 3 D D g B 3 3 8 D g D 4 4 D D p 5 5 g D 6 6 D 5 8 H B g D 8 H 9 18 g g B SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI Y WARAKRARRARSARAHEASRZATATYARARANATAWARRARARATATAWARTAAARAKEA BEGIN READING IN PROCESS VARIABLE ARRAY NUMBER OF DIFFERENT PROCESS VARIABLES IN ARRAY 10 IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 1118811011 NUMBER Ot VARIABLES IN PV ARRAY FOR EACH PROCESS VARIABLE 515 515 515 25 25 515 515 25 515 515 READING OF PROCESS VARIABLE ARRAY COMPLETE REXSEARRRARARAKRARARARARATETREHTKEAERRKTATAREARRESRSESEARA MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE 1 INPUT VOLUME INITIAL VALUE 12 599888 SIGMAE SIGMAN 1 516 21 MESTYP INTCAL 1 INTCAL 2 9 010088 8 905988 2 900080 1 12908 19988 2 INPUT CONCENTRATION INITIAL VALUE 8 22808 SIGMAE SIGMANt1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 3 903408 2 021407 2 000809 1 18888 18888 3 HOLDUP PRECIPITATOR FEED INPUT TRANSFER CONTRIBUTION INITIAL VALUE 8 22088 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL C2 4 280000 8 109800 8 000888 1 18099 10284 4 INVENTORY PRECIPITATOR INITIAL VALUE 8 108000 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP INTCAL 1 INTCAL 2 8 167008 28 080808 8 006208 1 18888 18808 5 INVENTORY FILTER INITIAL VALUE 8 988000 SIGMAE SIGMAN 1 SIGMAN 2
124. IBRATION COUNTER ZERO ERROR FLAG EQ 8 NONZERO MEASUREMENTS ERRORS EQ 1 ZERO MEASUREMENT ERRORS NUMBER OF BATCHES BETWEEN CALIBRATIONS RANDOM NUMBER STREAM FOR PROCESS VARIABLE RANDOM ERROR COMPUTATION STREAM NUMBERS FOR SYSTEMATIC ERRORS ARE ISTRPV 1 AND 2 MEASUREMENT TYPE CORRESPONDING TO A GIVEN PROCESS VARIABLE EQ 1 MULTIPLICATIVE MODEL EQ 2 ADDITIVE MODEL EQ 3 HYBRID MODEL MULTIPLICATIVE FOR RANDOM AND SHORT TERM SYSTEMATIC ERRORS ADDITIVE FOR LONG TERM SYSTEMATIC ERRORS RANDOM ERROR STANDARD DEVIATION SYSTEMATIC ERROR STANDARD DEVIATION Ye We Ye e Ye Ye e Wa e e e e ee e e ve je e e e e ee e e Se e k Se ye je e e e e e e e e e e k e a e e je e e e e cc je t k k e e e k W k k e e COMPUTE FIRST TWO ETA VALUES SYSTEMATIC ERRORS e k k e Ye e ce ce ve k k e e e e e e e e e Ye Ye Ye Ye Ye e e e e e e e Ye e e e c e a e ve e e e e e V We Ye ae e Wa e e e e e e e e je ee ee Fig D 1 cont 1 gt gt 5 00 y NM w Se x x Set x x 9 Y Y Y Y Y CO 03 1 07 O bb P bh P m O 1361 1362 1363 1364 1365 1366 1367 1368 1369 1378 1371 1372 1373 1374 1375 1376 1377 1378 1379 1388 1381 1382 1383 1384 1385 1386 1387 1388 1389 1392 1391 1392 1393 1394 1395 1396 1397 Go ooo 1g 28 38 TRACE 118 ISTRMR ISTRNR IPV CALL DRAND I
125. IMX 19 NPVTMXz8 NCIMX 10 NCTMX 8 NMIMX 2 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMXz2 NSTRMX 28 4 NCOLMX 2 COMMON VAR 2 S2I NBMXP12 CVI NBEMXP1 T NTMXP1 XIMCNBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX S2T NTRNMX3 CVT NTRNMX CS NBMXP1 S2CS NBMXP1 TT NTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 SZTRONTRNMX S2TBCNTRNMX TTSUMCNBMXP 1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBAEPI NBALP2 NTRPBL NTRN NTRNP1I NTRNP2 NPROUT DT NCALCNCTMXS NMTMX 2 NPVIT NPVMXD IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX NCITST NFSEED INTRNC ITRAN NPVMX 5 NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN IJCINV NCOL NPVMX HCC 5 NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMTSNSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNAR 9i G 0 INTEGER 2 DCNLIN COMMON TITLE ITITLE 4 32 NPVMX 3 WRITE A SCALAR EQUIVALENT OUTPUT TO DECANAL VDUM 8 DO 19 I 1 NBALP1 1 1 1 WRITECNDECIN 22 1 1 521 1 52 1 1 VDUM WRITE NDECIN 28 S21B 1 CV1 1 VDUM WRITE NDECIN 29 S2TBSM IP1 CVTCIP1 VDUM WRITE NDECIN 28 18 CONTINUE 28 8615 7 38 RETURN END Fig D 1 cont 287
126. IMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 NCOLMX 2 EXAMPLE 5 CORRELATED INPUT TRANSFER AND INVENTORY 7 1 12 ZEKO ERROR FLAG 1 GIVES ZERO ERROR CASE g IRNSCH RANDOM NUMBER SEEDS CHANGE FROM RUN TO RUN WHEN NONZERO 108 NRUN NUMBER Of RUNS 28 NBAL NUMBER Of MATERIALS BALANCES 24 NTRPBL NUMBER TRANSFERS PER BALANCE g oT TIME CONSTANT USED IN THIS EXAMPLE g MASPRT PRINTS MASSAGE DEBUGG OUTPUT WHEN NONZERO a ITIPRP PRINTS TRANSFER INVENTORY SET NO AND PROC VAR NO 1F 8 g IMESPR PRINTS INPUT MEASUREMENT ERRORS WHEN EQUAL TO 1 g IPVPRT PRINTS PROCESS VARIABLE FILE WHEN NON ZERO 2 ICLAPS REDUCES DIMENSIONS OF DECANAL INPUT FILE WHEN NONZERO INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA 187 NPV NUMBER OF PROCESS VARIABLES 8 NTRIN NUMBER OF TRANSFER AND INVENTORY SETS IN THE PROCESS ITIN INVENTORY TRANSFER NUMBERS 6 5 1 1 1 6 I 6 PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER INVENTORY 1 27 INPUT TRANSFER PRODUCT OF VOLUME AND CONCENTRATION 3 INPUT TRANSFER PRECIP FEED HOLDUP CONTRIBUTION 3 HOLDUP PRECIPITATOR FEED 4 INVENTORY PRECIPITATOR 5 INVENTORY FILTER 6 7 OUTPUT ADU CAKE INVENTORY POLISH FILTER 18 OUTPUT FILTRATE STORAGE Ei ISPNTI SPECIFIC INVENTORY TRANSFER SET NO GIVES ALL SETS y wwwwanawwww MEASUREMENT ERRORS ASSOCIATED WITH EACH PROCESS
127. IPVPRT Y 1CLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN Y MAWARRATAWARRRERATAARERXAEREAWARRAESARERENTERSRRAEREAR INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA NUMBER OF PROCESS VARIABLES NPV NUMBER TRANSFER INVENTORIES NTRIN 5 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 6 2 2 5 5 ARRAY OF PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER OR INVENTORY IPVNO TRANSFER INVENTORY PROCESS VARIABLE NUMBER NUMBER a 2 3 4 5 1 1 2 g 8 g 2 3 4 8 3 5 6 8 8 8 4 7 B g g D 5 D g g 8 SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI 8 TARA RARE RAR ERR ERR BEGIN READING IN PROCESS VARIABLE ARRAY NUMBER Of DIFFERENT PROCESS VARIABLES IN ARRAY 8 IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 118868011 NUMBER OF VARIABLES IN PV ARRAY PROCESS VARIABLE 5 55 58 53 63 53 53 55 READING OF PROCESS VARIABLE ARRAY COMPLETE HARAN ARANA ARA EA NARA ARMADA AN RARA RANA RARA MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE 1 INPUT VOLUME INITIAL VALUE 188 899898 SIGMAE SIGMAN 11 SIGMAN 2 MESTYP INTCAL 1 INTCAL Z 0 818888 8 819808 9 830088 1 19888 10808 2 INPUT CONCENTRATION IMITIAL VALUE 8 858889 SIGMAE SIGMAN 1 SIGMAN 2 MESTYP 1 INTCAL 2 8 018008 0 415868 8 04880809 1 18998 188908 3 TANK VOLUME INITIAL VALUE 188 888888 SIGMAE SIGMANC1 SIGMAN 2 5 INTCAL 1 INTCAL 2 1 8
128. KK JK 8 CONTINUE J J 1 ISTRM ISTRMR IF J EQ 3 GO TO 78 EPS EPSSAV GO 98 CALL RNORM del JJ JJ 1 IFCJJ EQ 2 GO TO 88 EPS RN1 SIGMAE EPSSAV RN2 SIGMAE Fig D 1 cont 117 1446 1447 1448 1449 1458 1451 1452 1453 1454 1455 1456 1457 1457 1457 1457 1457 1458 18 canon 0000000 C C C 98 T f k k k k k k E SER EC Wa Wa a fr Wa Wa Yr Wa a Ya Ya a Ya Ya t Ya fk Ae k e Yk ia Wa e ae e a a k SER ERS ES EET RES ve ve ie 90 k KE FLIP FLOP RANDOM NUMBERS k e Re e e Ye e Te e Ya Ye Wc k e t hn K k e e a k ce Wa e e We e Wa Wa e e ce ee k Ok e e 8g EPSSAV RN1 SIGMAE IPV EPS RN2 SIGMAE IPV JJ g 99 CONTINUE R k e e e e en e a Ya e Ya e je fa e c Ya Ye yc Ye Ya ve CR ae Ye C We Ye Ya Ye c k k e e k YK YK Ya e fe Ye Ye e e Ye ic Ye We We je Ye W k RK Wa We Wa ke k e CHOOSE THE CORRECT MEASUREMENT TYPE T W We k We k a ae Ye Ta Ye fa k Ya Ya vhe ae ic kc ve ve Ta Ta Ye ve ve De Ta Ya Ke c ic Ye Ye Yc Yc yc e Ye a a Yk a Ta kc Wa Ye a Ye ae Ye Ye W W MESM2 MESTYP IPV 2 IF MESM2 LT 1 GO TO 188 IF MESM2 GT 1 GO TO 198 MESM2 118 128 139 CR e CANC e SEES SE je e e SES ERS Ke Ye e REA e e k e SESE REE RSE e e e c ec Wa SCE CERES EE e e ec EEE ve ZERO ERROR MODEL k W ft w e k R w We k ce k k W W e SES EE ESE k k
129. L MASCUS THE MESSIM CUSUM ALGORITHM NTRNM1 NTRN 1 DO 18 I 1 NTRNMI IISNTRN 1 I 11 1 TT II TT IIM1 S2T II S2T IIM1 CVT II CVTCIIM1 CONTINUE TT 1 8 TTSUM 1 8 527 1 8 S2TRSM 1 Z 52 1 0 1 5 1 0 S2CS 1 22 8Eg S2I 1 S2CST S2CS 1 C ww e TNITIALIZE JS ARRAY C 2g 38 DO 28 11 1 NCT DO 28 J 1 NCT DO 28 K 1 NMT DO 22 L 1 NST JS II J K L 1 CONTINUE IRC 1 1T 1 228 I 2 NBALP1 TTSUM I p S2TRSM I 8 S2TBSM 1 8 DO 38 IIs1 NTRPBL 1TM1 IT IT2IT 1 TTSUMCIQO TTSUMCIO TT CIT S2TRSM I S2TRSM I S2TR ITM1 S2TBSM I S2TBSM I S2TB ITM1 CONTINUE CVXsg COMPUTE CORRELATIONS BETWEEN TRANSFERS IN SAME C wwwwwwwwwwwwww BALANCE PERIOD C IF NTRPBL EQ 1 GO TO 188 IR1 1 2 4NTRPBL 2 JST IR1 1 IR2 I 1 NTRPBL DO 90 IR IR1 IR2 JF IR 1 DO KK 1 NCT IF T TR KK EQ 0 G0 TO 88 DO 74 K 1 NCT DO 628 L 1 NMT DO 59 M 1 NST IF TCICK KK L LT M GO TO 50 Fig D 1 cont 101 8412 413 8414 8415 8416 9417 0418 0419 0420 0421 19422 8423 2424 8425 8426 0427 0428 8429 2438 2431 8432 8433 8434 8435 8436 0437 0438 8439 2449 2441 8442 2443 2444 0445 0446 0447 0448 0449 50450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 2461 8462 0463 2464
130. LA 9246 M Manual UC 15 Issued July 1982 LA 9246 M DE82 021850 User s Manual for a Measurement Simulation Code E A Kern DISCLAIMER This report was prepared as an account of work sponsored by an agency of the United States Government Neither the United States Government nor any agency thereof nor any of their employees makes any warranty express of implied or assumes any legal tiability or responsibility fo the accuracy completeness of usefulness of any information apparatus product or process disclosed or represents that its use would nor infringe privatety owned rights Reference herein to any specific commercial product orocess or service by trade name trademark manufacturer or otherwise does necessarily constitute of imply its endorsement recommendation or favoring by the Unitad States Government ar any agency thereof The views and opinions of authors expressed herein do not necessarily state reflect thase of the United States Government or any agency thereof LOS Alamos estemos National Laboratory TASTINBUTION OF THIS DOCUMENT IS UNLIMITED 4 iv CONTENTS ABSTACT I INTRODUCTION II CODE STRUCTURE Subroutine Summary B Block Diagram C Array Sizes and FORTRAN PARAMETER Statement D Units E Input Output Files III FUNDAMENTALS OF MEASUREMENT MODELING A Unit Process Accounting Area B Process Variables C Transfers and Inventories D Components and Measurements E
131. LINES TO BE USED FOR INPUT DATA COMMENTING PURPOSES PARAMETER NBALMX 195 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 12 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 COMMON CON NBAL NBAEP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST D INTRNC 5 NPVMXD NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX HCC B NCOLMX VCC 2 NCOLMX2 CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC 4 NPVCTC ONPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNAR NPVMX Oewne 69 DO 18 I 1 N READ CNDAT NBLANK CONTINUE RETURN END SUBROUTINE CLOSEM CLOSES FILES AND TERMINATES RUN PARAMETER NBALMX 195 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 19 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX22 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 4 NCOLMX 2 INTEGER 2 DCNLIN PVARA COMMON TITLE ITITLEC4 IPVTI 38 NPVMX DCNLIN 3 MESINP 3 PVARA 3 CLOSE FILES A Fig D 1 cont 97 23172 8173 CALL SRCHSSCA MESINP 6 7 2 2 8174 CALL SRCHSS 4 PVARA 6 8 0 0 9175 CALL SRCHSS 4
132. M NBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX S2ZT ONTRNMX CVT NTRNMX CS NBMXP1 S2CS NBMXP1 TTONTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TR NTRNMX 52 TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON SEED ISEED NSTRMX LSEED NSTRMX 00 N 60 COMMON RUNCOM NRUN IRUN ISPNTI Fig D 1 cont 1573 1574 1575 1576 1577 1578 1579 15848 1581 1582 1583 1584 1593 1594 1595 1596 1597 1598 1899 1692 RR m OO On Oh am m fei ba e t gt Q 1S 0 OY rer Seef 57 Se Se e x Fu Se x N N bat IO zl lt du 24 25 26 1636 1637 INTEGER 2 DCNLIN COMMON TITLE ITITLE 40 32 DCNLINC3 D MESINP 3 PVARA 3 DIMENSION IDATE 8 ITIME 4 DATA VRTITL 19HVOLUME 1 HPU CONC 12HKG PU 1 18HPU HOLDUP 12HFLOM RATE woeeeex VARIABLES wwww wwwww IZE ZERO ERROR FLAG EQ 8 MEASUREMENT ERRORS INCLUDED EQ 1 MEASUREMENT ERRORS NOT INCLUDED NRUN NUMBER OF RUNS NPV NUMBER OF PV VARIABLES NINV NUMBER OF INVENTORIES ISPNTI SPECIFIC PROCESS NUMBER ISOLATION RUN NBAL NUMBER OF MATERIAL BALANCES CALL DATESAX CALL TIMESA ITIME WRITE NPROUT 19 CIDATECID 1 1 8 1 Iz1 4
133. MEASIM code process variable is any variable needed for the computation of the inventories and transfers for a given UPAA Examples of process variables are the flow rate of an input stream volume of a tank concentration of a tank etc The MEASIM code simulates the measured values of process variables It is not necessary however that all process variables have associated measured values 12 Transfers and Inventories UPAAl has six different paths for transferring Special Nuclear Material SNM across the boundaries Fig 2 Transfers between elements witiin a UPAA are not important for materials accounting Therefore for materials accounting purposes 1 has a total of six transfers Each separate block in 1 de fines an inventory Thus UPAAl has a total or three inventories Similarly WPAA2 has three transfers and two inventories The MEASIM code combines the individual transfers and inven tories to model a given UPAA Each transfer and inventory type has an associated identification number These numbers are used in formulating input data to build the desired UPAA The inven tory and transfer types currently availzble in the code along with their corresponding identification numbers are summarized in Table III The identification numbers for transfers i e 5 6 7 and 8 are also used to indicate transfer direction Positive numbers are used for input transfers and negative numbers for output transfer
134. MEASUREMENTS NMI 1 NUMBER OF TRANSFER MEASUREMENTS NMT I NUMBER OF INVENTORY SYSTEMATIC ERRORS INSI 1 NUMBER OF TRANSFER SYSTEMATIC ERRORS NST 2 NUMBER OF RANDOM NUMBER STREAMS NNSTRM 7 NUMBER OF PULSE COLUMNS NCOLUM g XWARTARNRRARREATATARARARARARARNRRXNK ESARARATANRETARARARA INITIAL RANDOM NUMBER SEEDS 1042839332 273785636 1973287924 1291185537 2263994214 164962264 491490187 10 Output file Example 2 47 48 SUMMARY FOR ALL INVENTORIES AND TRANSFERS SRASRARRERRARNATR ANAEKURAEAERASENATAERRARARABARVEAASANRARRRARATARARATSA xO O Un gt O EQ UN 50 XI 1 8D9DE 1 8888E 1 0008 1 8880E 1 8888E 1 0002 1 0990E 1 1 1 0808E 1 0800 1 2080E 2 3 0000 1 8088E 1 9099E 1 9000E 1 8089 1 0800 1 8088E 1 08028 1 0082 UCD 1 89898 1 8098E 1 8888E 1 8080E 1 8088EF 1 BBABE 1 0800 1 8088E 1 1 8808E 1 88890E 1 88988E 1 8H828t 1 8888E 1 0006 1 8888E 1 8888E 1 8888E 1 8AGBE 1 0889t 1 8988E 1 2800 1 0000 1 8888E 1 1 8888E 1 88980 1 8988E 82 82 82 82 82 92 22 521 1 0808 t B0RE 1 BABBE ULC 1 088 1 0000 1 0000 1 000 1 0008 1 0808 1 BBE 1 1 0008 1 8820 1 0008 1 0880 UE CG 1 0988E 1 0080 1 8988E 1 0000 1 00006 1 8888E 1 82 0gE 1 88BBE 1 888BE 1 8888E BERGE 1 88
135. MUM NUMBER OF PV VARIABLES NCIMX MAXIMUM NUMBER OF INVENTORY COMPONENTS NCTMX MAXIMUM NUMBER OF TRANSFER COMPONENTS NMIMX MAXIMUM NUMBER OF INVENTORY MEASUREMENTS NMTMX MAXIMUM NUMBER OF TRANSFER MEASUREMENTS NSIMX MAXIMUM NUMBER OF INVENTORY SYSTEMATIC ERRORS NSTMX MAXIMUM NUMBER OF TRANSFER SYSTEMATIC ERRORS NCMX MINIMUM OF NMIMX AND NMTMX MXPMX MAXIMUM OF NSIMX AND NSTMX NSTRMX MAXIMUM NUMBER OF RANDOM NUMBER STREAMS NCOLMX MAXIMUM NUMBER OF PULSE COLUMNS INTEGER 5 5 INTEGER 4 ISEED LSEED COMMON MESPAR SIGMAE NPVMX SIGMAN NPVMX 2 SIG2E NPVMX SIG2N NPVMX 2 MESTYPC NPVMX INTCALCNPVMX 2 ISTRPV NPVMXD IZE IMTT NCTMX NMTMX ISTRNR NPVMX ISTRNS NPVMX COMMON PVCOM 2 IPVTRN NPVMX COMMON PVCOMS PVIS NBMXP3 NPVIMX PVTS NTMXP2 NPVTMX COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNPI NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC IPVNOCS NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX HCC 5 NCOLMX VCCC2 NCOLMX2 CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCT NPVMXD NPVI NPVT NCGF ICGF 4 COMMON VARY XI NBMXP2 NCIMX S2I NBMXP1 CVI NBMXP1 T NTMXP1 NCTMX XI
136. Materials Balance and CUSUM F Measurement Error Models Variances and Covariances H Inventory Correlation Approximations IV INPUT DATA A Primary Input File B Input Process Variable Array C Input Random Number Seeds V OUTPUTS vi DEBUGGING AIDS VII EXAMPLES A Example 1 B Example 2 C Example 3 D Example 4 E Example 5 VIII COMPUTER REQUIREMENTS IX OPERATIONAL PROCEDURES X ACKNOWLEDGMENTS APPENDIX A INVENTORY CORRELATED ERRORS AND THE CUSUM VARIANCE 29 35 37 38 42 49 58 61 72 73 76 77 CONTENTS cont APPENDIX B CONFIDENCE INTERVALS FOR MONTE CARLO SIMULATIONS 82 APPENDIX C PROCESS VARIABLE FILES 88 APPENDIX D MEASIM CODE LISTING 94 REFERENCES 145 TABLES I Variables in the FORTRAN PARAMETER Statement 10 II Input Output File Summary 11 III Inventory and Transfer Summary 13 IV Components and Measurements for Inventories and Transfers 15 v Input Data 22 VI Explanation of Input Variables Default Values 23 VII Contents of Process Variable File 27 VIII Process Variables for Example 1 39 IX Process Variables for Example 2 45 X Process Variables for Example 3 50 XI Process Variables for Example 4 60 XII Process Variables for Example 5 67 XIII CPU Time Requirements for the Example Problems 72 B I Comparison of Approximate Chi Squared Percentiles with Exact Tabular Values 85 C I Inputs to Process Variable Code PVGEN 89 11 12 13 14 15 16 17 18
137. N 1 NCINOW NC INOW 1 NRNS NRNS 1 ISTRNR IPVN 1 NRNS VIR NCINOW 1 SIG2E IPVN 1 SIR NCINOW 1 SQRT VIR NCINOW 1 gt IMTI NCINOW 1 amp MESTVP IPVNCID IF NSI EQ 2 GO TO 138 DO 122 J 1 2 VISCNCINOW 1 9 SIG2NEIPVN I 09 SISCNCINOV 1 9 SQRT VIS NCINOW 1 299 IF VIS NCINOW 1 J EQ G60 TO 128 NRNS NRNS 1 IFCJ EQ 1DISTRNSCIPVNCI SNRNS IF J EQ 2 NSIs2 ICI NCINOW NCINOW 1 J ISCI NCINOW 1 J CONTINUE CONTINUE IPT4 IPVN 3 1 IPVTRN CIPTA4 2z 1 IPVTRNCIPT4 1 1 NCI NCI 3 IF NCOLUM GT 1 GO TO 148 NCI NCI 1 CONTINUE CONTINUE IF NCINOW LE NCI GO TO 358 WRITE 1 168 WRITECNPROUT 168 ae RUN TERMINATED IN ROUTINE SETMAS WITH NCINOW GT CALL CLOSEM CONTINUE ITMP ITINN 4 NPVT NPVT ITMP IFC ITMP EQ 2 NMT 2 wwwwwwww TRANSFERS Fig D 1 cont 2549 2559 2551 2552 2553 2554 2555 2556 2557 2558 2559 2569 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2681 2602 2603 2684 2695 2606 2607 2608 2609 2618 2611 2612 2613 o000000 182 190 208 VTR NCT NMT gt VARIANCE OF TRANSFER RANDOM ERRORS VTS ONCT NMT NST VARI
138. NTINUE were TNVENTORTES VIRCNCI NMI VIS NCI NMI NSI ICI NCI NCI NMI ISCIC NCI NUI NPVI NPVI ITINN NCISNCI 41 IFCITINN EG 2 NMI 2 NCINOW NCINOV 1 DO 198 I 1 ITINN NPVCNT NPVCNT 1 Fig 1 cont VARIANCE OF INVENTORY RANDOM ERRORS VARIANCE OF INVENTORY SYSTEMATIC ERRORS INVENTORY CORRELATION INDICATOR INVENTORY SEQUENTIAL CORRELATION INDICATOR 135 2484 2485 2486 2487 2488 2489 2498 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2581 2502 2563 2504 2505 2506 2507 2508 2509 2510 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2548 2541 2542 2543 2544 2545 2546 2547 2548 pa Lu ba 9g 188 119 NRNS NRNS 1 ISTRNR CIPVNCIOOxNRNS VIRCONCINOW I sSIG2ECIPVNCIO SIR NCINOW SQRTCVIRCONCINOW 12 IMTICNCINOW 1 MESTYP IPVN I IF NSI EQ 2 GO TO 188 DO 98 J 1 2 VIS NCINOW I J SIG2N IPVN I J SIS NCINOV I J SQRT VIS NCINOW I J IF VIS NCINOW I J EQ 8 GO TO 98 NRNS NRNS 1 IF J EQ 1 ISTRNS IPVN I NRNS IF J EQ 2 NSI 2 ICI NCINOW NCINOW I d ISCI NCINOW 1 J CONTINUE CONTINUE GO TO 15g CONTINUE C ARMAR RA ARK COLUMN INVENTORIES C 128 138 148 150 168 178 NCOLUM NCOLUM 1 NPVI NPVI 5 DO 138 1 1 3 NPVCNT NPVCNT 1 IPVNAR NPVCNT IPV
139. NVENTORY NUMBER COUNTER NCTNOW TRANSFER NUMBER COUNTER NTRIN NUMBER OF TRANSFER OR INVENTORY TERMS PARAMETER NBALMX 195 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 12 NPVTMX 8 NCIMX 18 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMK 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 INTEGER TSCI TCI COMMON MSINCM ICI NCIMX NCIMX NMIMX ISCICNCIMX NMIMX ITCI NCIMX NCTMX NCMX TCI NCTMX NCTMX NMTMX TSCIC NCTMX VIRONCIMX NMIMXO VTRCNCTMX NMTMX VIS NCIMX NMIMX 2 VTSCNCTHX NMTMX 2 SIRCONCIMX NMIMX STRONCTMX SIS NCIMX NMIMX 2 STS NCTMX NMTMX 2 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCALCNCTMX NMTMX 2 NPVIT NPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX NCITST NFSEED INTRNC ITRANCNPVMX gt IPVNO S NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN lt gt HCC S NCOLMX VCC 2 NCGLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX OI gt COMMON MESPAR SIGMAE NPVMX SIGMAN 2 2 SIGZN NPVMX 2 MESTYPCNPVMX INTCAL NPVMX 2 ISTRPV NPVMX IZE IMTICNCIMX NMIMK IMTT NCTMX NMTMX ISTRNRCNPVMX ISTRNSCNPVMX COMMON PVCOM PVICNBMXP3 NPVIMX2 PVTCONTMXP2 NPVTMX IPVTRNCNPVMX COMMON RUN
140. O 19 I 1 NNSTRM ISEED 1 LSEED I CONTINUE CONTINUE IF NRUN GT 1 CALL STNDEV READ NDAT END 139 ISPNTI CALL SETMAS REWIND NFSEED DO 128 I 1 NNSTRM READ NFSEED ISEED 1 LSEED I ISEED 1 Fig D 1 cont V W Yk e e e ye ve e je je ie e e e Ye We ye ye ve e ie ye Ya Ye e e ie ve ye e Ye vie ge Ya e e e e We e e e We eX M NC ZUR 17 8129 0130 0131 0132 8142 8143 8144 0145 8146 2147 9148 0149 2158 9150 8158 0150 0150 8151 2152 8152 2152 8152 8152 2152 2152 2153 8154 8155 2156 2157 2158 9159 0160 8161 2162 2163 2163 0163 0163 0163 0164 0165 8166 8167 8168 8169 8179 8171 o C C 120 CONTINUE GO TO 42 130 CONTINUE www 148 15 16g 178 180 198 1g LES i www RR SAVE LAST RANDOM NUMBER SEED wwwwwwwwwwwwwww IF IRNSCH EQ Z GO TO 158 REWIND NFSEED DO 148 I 1 NNSTRM WRITE NFSEED 152 LSEED I CONTINUE FORMAT 118 CONTINUE WRITE NPROUT 178 LSEED 1 1 1 NNSTRM FORMAT 1H1 FINAL RANDOM NUMBER SEEDS 18112 CPTIMF CTIMSA IDUM CPTIME CPTIMF CPTIMI WRITECNPROUT 18 CPTIME FORMAT CPU TIME F12 6 CALL WRITE NPROUT 198 12 1 1 4 FORMAT 1X 4A2 CALL CLOSEM CALL EXIT END SUBROUTINE BLANKS N READS BLANK
141. ON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT NMTMX 2 NPVITCNPVMX IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX D NCITST NFSEED INTRNC ITRANCNPVMXO IPVNOCS NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX HCC 5 NCOLMX VCC 2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX COMMON RUNCOM NRUN IRUN ISPNTI COMMON MESPAR SIGMAE NPVMX SIGMAN NPVMX 2 SIG2E NPVMX SIG2N NPVMX 2 MESTYP NPVMX INTCAL NPVMX 2 ISTRPV NPVMX IZE IMTICNCIMX NMIMX IMTT NCTMX NMTMX ISTRNR NPVMX ISTRNSCNPVMX da 6 COMMON TITLE 48 38 DCNLINCS3 2 MESINP G3 OPEN FILES ww www i de de ye v voee eoe TAPE11 INPUT DATA TAPE12 INPUT PV ARRAY TAPE13 RANDOM NUMBER STARTERS TAPE14 OUTPUT TO DECANAL TAPE15 GENERAL OUTPUT FILE PRINT 19 18 FORMAT ENTER INPUT FILE NAMES ONE PER LINE FOR INPUT INPUT PV ARRAY Fig D 1 FORTRAN listing of MEASIM 95 8856 8857 0258 8859 08642 8861 9962 8863 2864 8865 9466 8867 8968 8269 8878 8871 8872 2873 8874 8875 8876 2877 9978 4979 9989 8881 9832 0083 9984 0885 0086 8887 8288 0089 0090 8891 0092 0093 9994 8295 009
142. ONTINUE CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE CONTINUE RETURN END FUNCTION DRAND CISTRM PARAMETER 185 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 12 NCTMX 8 NMIMX 2 2 NMTMXs2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 29 4 NCOLMX 2 COMMON CON NBAL NBALPI NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCALCNCTMX NMTMX 2 NPVITCNPVMXD IBLANK 1 NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC Fig D 1 cont 103 2535 8535 9535 8535 9536 853 8538 2539 0540 0541 0542 0543 0544 0545 0546 8547 0548 0549 0550 8551 8552 0553 0554 0555 8556 8557 8558 8559 8569 8561 8562 0563 8564 8565 8566 8567 8568 8569 0570 0571 0572 8573 8574 8575 8576 8577 8578 9579 8589 2581 8582 8582 0582 0582 0582 2583 8584 0585 0586 0587 0588 0589 2592 0591 8591 104 AAD ano aono oon 2 ITRAN NPVMX IPVNO 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS 3 ICTRN I1ICINV NCOL NPVMX HCC 5 NCOLMX VCC 2 NCOLMX3 CCC 3 NCOLMX 4 NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 5 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNAR NPVMX INTEGER 4 LSEED ISEED M2 ITWO
143. ORS CVITS I 11 9 K COVARIANCE BETWEEN INVENTORY TRANSFER SYSTEMATIC ERROR TRACE 999 IFCIB NE 1 GO 72 IFCIT NE 1 GO TO 78 FORMAT 3A2 A ASAZ WRITECNDECIN 20 ITITLE I 151 48 WRITECNDECIN 12 IBLANK WRITECNDECIN 12 IBLANK WRITE NDECIN 19 IBLANK IGO ICLAPS 1 GO TO 30 40 50 160 CONTINUE NORMAL DECANAL INPUT NO COLLAPSING NCIP NCI NMIP NM1 NSIP NSI NSTP NST NCP NC GO TO 68 48 CONTINUE COLLAPSE INVENTORY NO COLLAPSE OF TRANSFER NCIPx1 NCTP NCT NMIP 1 NMTP NMT NSIP 1 NSTP NST NCP 1 GO TO 69 58 CONTINUE COLLAPSE BOTH TRANSFERS AND INVENTORIES NCIP 1 NCTP 1 NMIP 1 NMTP NSIP 1 NSTP 1 NCP 1 Fig D l cont 8827 828 8829 8832 8831 0832 2833 8834 8835 8836 0837 2838 0839 0840 0841 0842 8843 8844 8845 8846 8847 8848 8849 6850 2851 8852 8853 8854 8855 8856 8857 8858 8859 8862 0861 8862 2863 0864 0865 0866 0867 0868 0869 0870 8871 8872 8873 2874 8875 8876 8877 0878 0879 9880 2881 2882 8883 8884 8885 8886 8887 8888 8889 8898 0891 68 78 CONTINUE NP NBALP 1 1 WRITE NDECIN 538 NCIP NCTP NMIP NMTP NSIP NSTP NCP NP WRITE NDECIN 99 ICLAPS CONTINUE IFCICLAPS GT 2 GO TO 189 IFCIII EQ 1J WRITECNDECIN 82 0CCOXIMCIB 1
144. OVERFLOW OF TRANSFER ARRAYS IFCNTRN LE NTRNMX GO TO 740 WRITE CGNPROUT 738 WRITE 1 738 738 FORMAT RUN TERMINATED WITH NTRN GREATER THAN NTRNMX CALL CLOSEM 748 CONTINUE INITIALIZE INVENTORY AND TRANSFER ELEMENTS DO 758 I 1 NBALP2 DO 758 931 DO 758 K 1 NMI XIMCI J K s4 750 CONTINUE DO 760 I 1 NTRNP2 DO 768 J 1 NCT DO 768 K 1 NMT TM I J K 8 768 CONTINUE Ye e W Ye W W wk We sk Kel W W Y sk RR Ye sk RC YK yk Yk OR sk wk Ya sk Ye Y yk W e sk C sk Ce Wa Wk Ya Wk OR RON ye TTT K RO INPUT INITIAL RANDOM NUMBER SEEDS W e k Ye Ya Ye ye Ye Sk ik k Sa YK Ye k kc e se a a Sc S Ye Ya Wa Ye ke Ya Yk k ka YK Ye ie ic sk Yk Sk e Ya Sk Ya Ye Y k k Wa Wa ke a Ya Ya Ya W Yk Ye We Wk Yk yk We W W W k W W k W 84 W Ye W DO 778 1 1 NNSTRM Fig D 1 cont 71 9 9 9 975 976 977 978 979 9 9 9 9 9 9 9 1994 1995 1998 1997 1998 1999 2888 2881 2002 2083 2884 2005 2886 2007 2008 2089 2810 2811 2822 2823 READ NFSEED ISEED 1 LSEED 1 ISEED 1 778 CONTINUE WRITE NPROUT 789 ISEED 1 1 1 NNSTRM 780 FORMAT INITIAL RANDOM NUMBER SEEDS 19112 Wwwwwwwww SET THE RANDOM NUMBER STREAM ASSOCIATED WITH wee EACH PROCESS VARIABLE onon RETURN END SUBROUTINE MTFIX MT IB NC NM NS XX cieli COMPENSATES FOR MEASUREMENT ERROR MODEL TYPE IN VARIANCE CALCULATIONS MT MEASUREMENT TYPE EQ 1 R
145. P1 NBALMX 1 NBMXP2 NBALMX 2 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 42 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 18 NCTMX B NMIMX 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 NCOLMX 2 COMMON PVI NBMXP3 NPVIMX PVT NTMXP2 NPYTMX IPVTRNCNPVMX COMMON VAR XI NBMXP2 NCIMX SZI NBMXP 12 CVI NBMXP1 T NTMXP1 NCTMX XIM NBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX S2T NTRNMX CVT NTRNMX CS NBMXP1 S2CS NBMXP1 TTONTRNMX 1 S2IR NBMXP1 5218 S2TRONTRNMX S2TB NTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 2 IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC ITRAN NPVMX IPVNO 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN NCOLCNPVMX HCC B NCOLMX VCCC2 NCOLMX gt CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC 4 NPVCT NPVMX NPVI NPVT NCGF ICGF 4 NPVCNT IPVNARCNPVMX DIMENSION IPV 1 PV 1 IPV PROCESS VALUE OF TRANSFER VOLUME PV 2 IPV PROCESS VALUE OF CONCENTRATION TRACE 1000 ICTRN ICTRN 1 IFCICTRN LE NCT GO TO 20 WRITE 1 18 IPV 1 WRITE NPROUT 19 1 FORMAT RUN TERMINATED IN SUBROUTINE TRAN2 WITH ICTRN NCT Fig D 1 cont 2931 2932 2933 2934 2935 2936 2937
146. PRINTS PROCESS VARIABLE FILE WHEN NON ZERO 2 ICLAPS COLLAPSES MATRIX OUTPUT TO SCALAR FORM WHEN SET TO 1 y w INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA 7 117 NPV NUMBER OF PROCESS VARIABLES 4 NTRIN NUMBER OF TRANSFER AND INVENTORY SETS IN THE PROCESS 7 ITIN INVENTORY TRANSFER NUMBERS 7 3 4 77 f IPVNO PROCESS VARIABLE NUMBER CORRESPONDING TO EACH INVENTORY OR TRANSFER 1 2 INPUT TRANSFER 234 5 6 2A COLUMN INVENTORY 4 7 11 8 9 2B COLUMN INVENTORY 18 ils OUTPUT TRANSFER ISPNTI SPECIFIC INVENTORY TRANSFER SET NO 8 GIVES ALL SETS M w sww MEASUREMENT ERRORS ASSOCIATED WITH EACH PROCESS VARIABLE ko ans FLOW RATE 2AF 02 82 1 28 2 CONC 864397 1418 3 CONC 14 4 CONC 825331 5 TOP VOLUME g 6 BOTTOM VOLUME g 7 CONC 2BW 1 8 TOP VOLUME 9 BOTTOM VOLUME g 18 FLOW RATE 2BP 82 82 B 1 28 11 CONC 2BP 06 81 COLUMN DATA 1 2 1 1 5 VCCCI J I71 2 JI ist 3 ALL TEN VALUES ON ONE LINE ONE LINE PER COLUMN 25 3 64 5 82 45 9 63 97 190 86 1 3 U6 COLUMN 2A 72 1 62 3 26 8 8 51 5 133 04 1 E 3 86 COLUMN 2B 1 2 3 4 Fig 12 Input data Example 3 is set to 10 with the number of transfers per balance NTRPBL equal to 10 Because the time interval between flow rate meas urements is 1 h DT is set to 1 0 at
147. PROCIZITINCITRIN IFCIPROCI EQ 28 GO 88 GO TO 18 28 38 38 48 58 68 78 IPROCI 18 CONTINUE INVENTORY WITH ONE COMPONENT CALL INVICIPV RETURN 28 CONTINUE JO do INVENTORY WITH TWO COMPONENTS CALL INV2 IPV RETURN 38 CONTINUE INVENTORY IC NCOL ITRIN IT IPROCI 2 CALL COLUMN IPV IC IT RETURN 40 CONTINUE Wwwwwkwwkwkwwww BATCH TRANSFER WITH ONE COMPONENT CALL TRANI1CIPV ITRIN RETURN 58 CONTINUE Wwwwwwwwwkwwkwx BATCH TRANSFER WITH COMPONENTS CALL TRANZCIPV ITRIN RETURN 68 CONTINUE KAKI TRANSFER AS A PRODUCT OF FLOW RATE AND CONCENTRATION CALL TRANSCIPV ITRIN RETURN 70 CONTINUE CALL TRANA CIPV ITRIN 88 RETURN Fig D 1 cont 129 IS PJ FO PO PQ ra Fa bea pea ea ta bi ba E E Et Eat th Eet ben tt ben pt HO OF OF Q Ch Cn gt gt SS GD CO CJ 69 253 OO lt J 2 Fe e w Fe e Set et NEF tQ O O O O O O O P G gt iQ zl zl Oh gt Eh Fa pb ba Fei fra bag 130 o00000000n00 aonana www END SUBROUTINE PRTBAL W Ye Ye e W CC Ww a t W W e t W e Ya Ye t Ye Wa c We W Ww
148. PV IF IPVTRN 1 LT G IPTNEG 1 218 CONTINUE IFC IPTNEG EQ 6O TO 240 DO 228 I 1 NPV IFCIPVTRNCI EQ 0 GO TO 228 IPVT IPVT 1 IPVTRN I 1 223 CONTINUE wwawwwwwawwkwwawaw FIND LARGEST INTEGER IN IFT ARRAY MAX 290 DO 23 I 1 NTRNPV MAX IFT 1 238 CONTINUE 248 CONTINUE NDUM NPV IPVT 2 DO 258 I21 NPV Fig C 1 cont 91 92 8146 8147 2148 2149 8158 8151 8152 8153 8154 8155 8156 2157 9158 9159 8158 9161 8162 2163 0164 8165 8166 8167 8168 2169 13172 8171 0172 0173 0174 0175 8176 8177 8178 8179 2182 2181 8182 8183 9184 8185 25g 268 278 288 298 38 319 328 332 340 350 IFCIPVTRNCI EQ 8 0GO TO 259 lt 1 1 NMDTRN 0 1 60 TO 258 NMDTRN CIPVTO IPVTRNCI IPVTRN 1 1 CONTINUE WRITE 6 NDUM WRITE 6 IPVTRN 2 2 DO 328 I 1 NPV IFC IPVTRN I EQ 1 GO TO 278 NPVCT 1 NINV IPVI IPVI 1 DO 268 J 1 NINV PVI J IPVI C I CONTINUE GO TO 328 12 1 IFCIPTNEG EQ 2 GO TO 388 ICNT 9 DO 298 J 1 MAX ICNT ICNT 1 IF ICNT GT NTRN GO TO 328 PVTCICNT 1 IF J GT IFTCIPVT D PVTCICNT IPVTO lt 2 CONTINUE GO TO 282 CONTINUE DO 318 J 1 NTRN PVTCJ IPVTOSC ID IF NMDTRNCIPVT EQ 2 GO TO
149. PVN JI K VTS NCTNOW J K SIG2NCIPVN JJ K STS NCTNOW J K SQRT VTS NCTNOW J K IF VTSC CNCTNOW J K EQ 2 0GO TO 308 IF K EQ 2 GO TO 290 IF J EQ 1 0GO TO 278 IFCI EQ 2 0GO TO 268 NRNS NRNS 1 NRNSAV NRNS GO TO 288 NRNSMX NRNS NRNS NRNSAV GO TO 280 NRNS NRNS 1 ISTRNS IPVNCJJ ENRNS GO TO 398 NRNS NRNS 1 NST 2 CONTINUE NRNS NRNSMX TRANSFER CORRELATION INDICATORS IF 1S 1 DO 320 I 1 2 DO 328 J 1 NST IF VTSCIS I1 J9 EQ 2 0GO TO 328 DO 318 II IS IF Fig D 1 cont 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2709 2781 2792 2783 2784 2785 2706 2707 2708 2709 lt NNNNNN ra ta RA ta a Set rer Se po 0 2728 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2744 2741 2742 2743 TSCICII I 0sJ DO 318 JJ IS IF TCI II JJ I J 318 CONTINUE 320 CONTINUE NCGF NCGF 1 ICGF NCGF IS 338 CONTINUE IF NCTNOW LE NCT GO TO 350 WRITE 1 349 WRITE NPROUT 340 348 FORMAT RUN TERMINATED IN ROUTINE SETMAS WITH NCTNOW NC
150. R OF INVENTORY MEASUREMENTS NMI NUMBER OF TRANSFER MEASUREMENTS NMT 2 NUMBER OF INVENTORY SYSTEMATIC ERRORS NSI 1 NUMBER OF TRANSFER SYSTEMATIC ERRORS NST 1 NUMBER OF RANDOM NUMBER STREAMS NNSTRM 9 NUMBER OF PULSE COLUMNS NCOLUM g INITIAL RANDOM NUMBER SEEDS 1842839332 273785636 1373287924 1291185537 2862984814 164960264 491400187 1352537143 271783562 SUMMARY FOR ALL INVENTORIES AND TRANSFERS 1 521 527 MAT BAL S2XMB CUSUM 8 8 0000 01 BBOUE 81 8 8088 81 8 0880 1 8 0808 81 48 80806 0 08 0000 21 0 0000 01 0 0000 01 1 B8 BALLE 01 20 0890 01 0 8 1 6 1035 05 9 4615 02 2 9678 82 6 1035 05 3 4615E 42 6 1835 5 2 8 950 01 00008 01 2 0000 01 6 1835 85 9 4615 82 2 9678 02 6 1835 05 9 4615 02 1 2207 04 3 8800 01 Z 900HE Ml 8 0408E 81 6 1035E 25 9 4615 02 2 9670 02 6 1835 05 9 4615 2 1 8311 04 4 0000 01 9 2888 21 4 0089 01 6 1215E 85 9 615 82 2 967dE 82 6 1035 05 9 4615 4 2 4414 04 5 8 0808F 31 8 0000 01 0 00001 01 6 1915 05 9 4615t 22 2 9670E 22 6 1035 05 9 4615E 82 3 0518E 44 5 H 08080E H1 8 8000 01 8 00007 01 6 1 35 85 9 4615 02 2 9670 02 6 1935E 85 9 4515 02 1 6621E 04 7 0080 01 8 00006 01 8 8 85 1 6 10352 05 9 4615 82 2 9672 82 6 1035 05 9 4o15E 22 4 2725E 24 8 01 8 0808 01 0 0008 01 6 1035 05 9 4615 2 2 9670 02 6 1035 0
151. ROCESS VALUES Fig C 4 Input data to PVGEN Example 3 NPV NUMBER OF PROCESS VARIABLES NUMBER OF VALUES PER INVENTORY PROCESS VARIABLE NTRN NUMBER OF VALUES PER TRANSFER PROCESS VARIABLE 12 12 12 9 24 24 Y 18 18 IPVTRN TRANSFER INDICATOR 12 6 22 022 1 9 9 15148 22 35 8998 PROCESS VARIABLES 5 Bi 1157 11111 676 25 Fig C 5 Input data to PVGEN Example 4 NPV NUMBER OF PROCESS VARIABLES NINV NUMBER OF VALUES PER INVENTORY PROCESS VARIABLE NTRN NUMBER OF VALUES PER TRANSFER PROCESS VARIABLE IPVTRN TRANSFER INDICATOR ARRAY 1 INDICATES TRANSFER P V 5 75 228827 PROCESS VARIABLE VALUES Fig C 6 Input data to PVGEN Example 5 93 APPENDIX D MEASIM CODE LISTING A complete FORTRAN IV listing of the MEASIM code as it is used on the PRIME 750 computer is given in Fig 0 1 indicated in Sec IX except for the FORTRAN PARAMETER statement the code employs very basic FORTRAN This should make it easily adaptable to other computers Los Alamos Identification No LP 1351 94 0001 9092 2023 0094 0085 806 2827 8287 2887 2807 8887 2088 4009 2818 8011 8012 0013 8014 0015 0016 8817 4918 4919 4920 0021 0022 8023 0024 8825 0026 0827 0928 0029 0930 931 8832 0033 8034 2035 2035 0835 8035 2835 8035 2035 2236 0037 0938
152. S W k ik ik k k k Ye ke Ya Wa X Wa Ke e Y c Ya Wa k k k Ke Ye e Ye e e Ya Ye Ye Ye e ke Ye Wa ae Wa Wa e X Wa Ya Ya Yk Ya Ke k k k e A We We e K Wk Y K U1 DRAND ISTRM U2 DRAND ISTRM IF U1 LE 2 U1 1 E 6 T SQRT 2 ALOG U1 RN12T COS TWOPI U2 RN2 T SIN TWOP I U2 RETURN END SUBROUTINE SETMAS COMPUTES THE INPUT VARIANCE AND CORRELATION INDICATOR ARRAYS FOR EACH TRANSFER AND INVENTORY kwwwkwkkkkwk KEYS ON PROCESS NUMBER TO SET UP THE DESIRED ARRAYS PROCESS NUMBER INDEX 1 INVENTORY AS SINGLE VARIABLE 133 2364 2365 2356 2367 2368 2369 2372 2371 2372 2373 2374 2375 2376 2377 2378 2379 2388 2388 2380 2380 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2390 2390 2390 2398 2390 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2488 2481 2402 2403 2404 2485 2406 2407 2408 134 INVENTORY AS PRODUCT OF TWO VARIABLES INVENTORY FROM COLUMNS OF A OR S TYPE INVENTORY FROM COLUMNS OF B OR Z TYPE TRANSFER AS SINGLE VARIABLE TRANSFER AS PRODUCT OF TWO VARIABLES TRANSFER AS A PRODUCT OF CONCENTRATION AND FLOW RATE NOOO GN EXPLANATION OF VARIABLES ISPNTI SPECIFIC UNIT TRANSFER INVENTORY SET NUMBER GIVES ALL ITIN TRANSFER INVENTORY TYPE INDICATOR NCINOW I
153. SED FOR THIS CASE NPVCNT 8 INVENTORY PROCESS VARIABLES NPVI 4 TRANSFER PROCESS VARIABLES NPVT 4 NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUMBER OF NUHBER OF NUMBER OF NUMBER OF NUMBER OF INVENTORY COMPONENTS NCI TRANSFER COMPONENTS NCT INVENTORY MEASUREMENTS NHI 2 TRANSFER MEASUREMENTS NNT 2 INVENTORY SYSTEMATIC ERRORS NSE 1 TRANSFER SYSTEMATIC ERRORS NST RANDOM NUMBER STREAMS NNSTRM 12 PULSE COLUMNS NCOLUM 2 SARRARRRAWRRKWRRAVARKAXARARWARAARARHARRRWARA ERATARATARATRTEAN INITIAL RANDOM NUMBER SEEDS 1242839332 763526641 ARANA NARRA RARA ARA AAA RA AA RARA 273785636 225695996 1973287924 SUMMARY FOR ALL INVENTORIES AND TRANSFERS 1291185537 2 3 1 ARARANUAARARARRARRAR ARALAR ARARTA RARA RUNNER xp WO IN G tn a Ne tQ NNN One XI 1 98898E 1 0088E 1 8888E 1 9888E 1 8885E 1 8880E 1 8888E 1 8088E 1 828DE 1 88808E 1 89888E 1 0000 1 1 0288E 1 88298E 1 8888E 1 8898E 1 8888E 1 0000 1 BOBE 1 0888E 1 0888E 1 0 180 1 0888E 1 8888E 1 0880E 1 0288E 1 8898E 1 0000 1 0888E 1 0000 1 1 1 080BE 1 9880E 1 0080 1 20D0E 1 8800E 1 0000 1 1 8088F 1 0090 1 02HBE 1 8288E 1 00 1 8088E 1 1 1 0000 1 1 0080E DI gi gi gi gl EU gl
154. SR PVIS 1 IPVN PV1 1 IPVN NBALP2 1 GO TO 198 CALL MEASR PVTS TI IPVND PVTCI IPVND NTRNP2 I CONTINUE IFCISPNTI EQ 2 GO TO 128 w W amp wxxx w x ISOLATED UNIT PROCESS COMPUTATIONS C IFCITIPRP EQ 1 1 138 ISPNTI CIPVNOCI ISPNTID In1 3 CALL PROCESX IPVNOCI ISPNTID ISPNTI GO TO 15g Fig D 1 cont 119 SUN IN IN e 1543 1544 1545 120 128 www 138 148 CONTINUE PROCESS CALCULATIONS DO 140 ITRIN 1 NTRIN IFCITIPRP EQ I 1 130 1 IPVNO I ITRIN 1 1 3 FORMAT PROCESS NUMBER 13 PV VARIABLE NUMBER 13 CALL PROCESCIPVNOCI ITRIND ITRIN CONTINUE 158 CALL PRTBAL IFC NRUN NE 1 RETURN IFCICLAPS EQ 2 CALL OUTDEC 168 RETURN wae END SUBROUTINE MESIN k k k k Wa We We We W yk k ke Sk kp SEER RR REESE ESA EERE Ya ake k k e Sk SERRE ESSE SERS EE ELSA RE EE SES k x READS INPUT DATA k k f ve vie W W W Wk Wa k k Ke ke k Ke k e Ye Wa Y k ke Wa y Se e a Sk ake IK e Ke Sk e k WK e ke Wa Ya ke ik Wa X k XK K Ik K X k i PARAMETER NBALMX 185 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 18 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 PARAMETER DEFINITIONS NBALMX MAXIMUM NUMBER OF BALANCES NPVMX MAXI
155. SS MOOEL USER S MANUAL LA 8761 M ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE IZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH NUMBER OF RUNS NRUN w 108 NUMBER OF BALANCES NBAL 58 NUMBER Of THANSFERS PER BALANCE NTRPBL 1 TIME INTERVAL DT 8 088 MASSAGE DEBUGG PRINT FLAG MASPRT 8 TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG ITIPRP sg PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR Y PRINTOUT FLAG FOR INPUT PROCESS VARIABLES IPVPRT 8 ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN 8 g wamwamuwwwwanawnawawwanwanwwwawawwanawwwawmkawwawwanwwwaww INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA NUMBER OF PROCESS VARIABLES NPV 8 NUMBER OF TRANSFER INVENTORIES NTRIN 5 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 6 2 2 5 5 ARRAY OF PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER OR INVENTORY IPVNO TRANSFER INVENTORY PROCESS VARIABLE NUMBER NUMBER 1 2 43 4 15 1 1 2 2 g 8 2 3 4 8 8 D 3 5 6 8 8 D 4 7 a 8 8 9 5 8 8 8 8 D SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI Y ARAN RARER RRR RRR ARR EE REAR REA BEGIN READING IN PROCESS VARIABLE ARRAY NUMBER OF DIFFERENT PROCESS VARIABLES IN ARRAY 8 IPVTRN TRANSFER INDICATOR ARRAY FOR PROCESS VARIABLES 1 FOR TRANSFER 1129988 1 NUMBER OF VARIABLES IN PV ARRAY FOR EACH PROCESS VARIABLE 55 55 53 53 53 53 55 55 READING OF PROCESS VARIABLE ARRAY COMPLETE SREARARRANENEREATNERENTAYRV
156. STEMATIC ERRORS NSI NUMBER Or TRANSFER SYSTEMATIC ERRORS NST NUMBER OF RANDOM NUMBER STREAMS NNSTRM 16 NUMBER OF PULSE COLUMNS NCOLUMI 2 wwawwa 7 8 COLUMN CONSTANTS HCC 5 1 VCC 3 1 CCC 3 1 8 250000 BB MB 364840 1 108000 02 B 52088DE G1 8 7229908E BJ 8 162808 gl 8 188 88 82 6888 85 81 INITIAL RANDOM NUMBER SEEDS 1842839332 763526641 273 4563b 9732 225695826 16539 g 582890E 81 326888E 81 87924 12911 87289 16738 46 0 0 00 8 963088E Bt 8 8042080t 80 8 800000 00 8 815089 2 Aananwnawanwawwwanawanwww 4 1 1 W EARWRSEFAAWTKRAERATRYHAAAEAANASANEM 85537 2863904914 1 02674 1567589483 17 DUTOT LTL SUMMARY FOR ALL INVENTORIES AND TRANSFERS TUTELLE OTT E DT CELL UE 80 6 2 0 2 tQ Xi 1 7757 81 1 7757 S1 1 7757 81 1 7 57 1 1 7757 01 1 7757 1 7757 M1 1 7757E 1 1 7757 1 7757 1 1 7757 01 521 9 3136 03 9 3136 03 9 3136 03 9 3136E 23 9 3125 23 9 3136 03 RESULTS OF CARLO SIMULATION WITH T 9 0000 01 5 9967 82 8 0467 02 5 0967E 62 5 9957E 8 5 9967 02 5 9967 0 8 9457 02 S 996 E 22 5 9967 2 5 9967 02 wwaqwnwaqawaawwan 188 SAMPLES KETTEL ELTH CHI SOUARE N 1 RATIO FOR 95 CONFIDENCE UPPER LIMIT 1 29223 LOWER LIMIT 8 736473 CUSUM BALANCE SAMPLE NUMBER AVERAGE 1 3 2287760 01 7 2 7 734398
157. STRMR DO 28 JK 1 2 ICALBC JK IF IPVTRN IPV GT ICALBC JK 1 IF SIGMAN IPV JK NE GO TO 18 ETA JK 8 BES ETASAV JK 8E9 GO TO 28 CONTINUE ISTRM ISTRNS IPV IF JK EQ 2 ISTRM ISTRM 1 CALL DRAND ISTRM CALL RNORM K JK 1 KK JK 1 ETA JK RN1 SIGMAN IPV JK ETASAV JK RN2 SIGMAN IPV JK CONTINUE 2 JJ 8 DO 148 I 1 N DO 68 JK 1 2 IF SIGMANCIPV JK EQ 2 GO TO 69 ICALBC 1 1 Tt W W e Ye Ye Ye Wa Ya We a Wa Ya a Ya Ya Ke Ya Ya Ya Ya Wa Ya 144241244454 2 ake ie Wa W W Tk aie WW Wr Wr We W RA CHECK FOR RECALIBRATION Ye k Yk K We We a We a Wa Wa We Wa a Ya Ya Wa Wa Ya Ye Ye ka Ya a Ya Ya Ka Wa a Ye Ye a Ya We Ye Ye Ya Sk a a ke Ke Wa k Wa ae Ya Ye We k k W W e 48 IFCICALBCCJKO LE INTCALCIPV JK GO TO 68 ICALBC JK 1 KC OK KC OK 1 IF K JK EQ 3 GO TO 4g ETA JK gt ETASAV JK GO TO 68 ISTRM ISTRMR JK CALL RNORM K JK 1 KK JK KK JK 1 IF KK JK EQ 2 GO TO 52 ETA JK RN1 SIGMAN IPV JK ETASAV JK RN2 SIGMAN IPV JK GO TO 6g e w cR w RR W Tk k W W W We W ie W e Yk k Wk Tk e e We e fe e e e Se ole se e e Wa Se a a e Ya e Wa Ye Ya e 8 We Wa e Wk W Y W W e W e kk We Wk W W k FLIP FLOP RANDOM NUMBERS W Ve k t e Yk e W W e e e e e Wa ke e Yk k We e e le e e Ac Ye Wa e t a e e Wa Yk Tk a k k Wa c e Yk We K ke K k Yk k k k k W e e We k Ye e e e d Wa W n k 59 68 78 ETASAV RNI SIGMANCIPV JK ETACJK s amp RN2 SIGMANCIPV JK
158. T IPVNO 1 J 1 1 5 WRITEC GNPROUT 168 J IPVNO I J 1 1 5 160 FORMAT 13X 12 9X 13 5X 13 5X 13 5X 13 5X 13 170 CALL BLANKS 1 READ NDAT ISPNTI WRITE NPROUT 188 ISPNTI 180 FORMAT 5X SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI I3 e Y eye de dec k k x READ PV ARRAY WRITEC NPROUT 198 198 FORMAT Vet A A AA A E e e e e e e e e A e e e e Y 1 BEGIN READING IN PROCESS VARIABLE ARRAY gt CALL REDPV WRITE NPROUT 294 200 FORMAT READING OF PROCESS VARIABLE ARRAY COMPLETE 1 k k k f fk Wk fk Ye W W k k k 2 k ke K ke ke k k K k ik ka ic e e ia e khkk k e k k K k 0 ia e e We kkk kkk c W w k k wk w k Wk fk W k c Ye We k Ye TK K Ke k k ik k e a TK ik Ta Ta a Ye a Ye Tae Tae Tae Wa e k Ya A PSE k Wk k W W W k k TCL k W W k W k k cc INITIALIZE STATISTICAL PARAMETERS RE TTT CALL BLANKS 3 WRITE NPROUT 219 218 FORMAT MEASUREMENT ERRORS FOR EACH PROCESS VARIABLE DO 228 I 1 NPV 1 0 MESTYP 1 1 DO 228 J 1 2 SIGMAN 1 J 9 228 INTCAL I 9 710298 DO 238 I 1 NPV CALL READEMCI SIG2E 1 SIGMAE 1 2 DO 238 J 1 2 SIG2N 1 J SIGMAN 1 J 2 238 CONTINUE KI DO 262 IPV 1 NPV WRITE CNPROUT 248 1 1 30 240 FORMAT 5X 39A2 IFCIPVTRNCIPV GT 2 GO TO 258 KI KI 1 WRITECNPROUT 27 PVISCI KI GO TO 268 258 1 WRITECNPRQUT 278 PVTSCI KT 260 CALL WRITEM 278 FORMAT 9X INITIAL VALUE F12 6
159. TEMATIC ERRORS DO 168 I 1 NCI DO 16 J 1 NMI KF ISCI 1 3 IF KF EQ 2 G0 TO 168 DO 158 Ks1 KF Fig 0 1 cont 109 8892 2893 8894 8895 8896 9897 9898 2899 2998 8981 8982 8983 0904 9905 0906 0927 2998 8992 4910 2911 8912 09913 8914 8915 2916 0917 0918 2919 2928 09421 8922 0923 0924 8925 2926 8927 8928 4929 8932 4931 2932 8933 19934 2935 0935 8937 8938 8939 29498 9941 8942 0943 8944 58945 28945 8347 4948 0949 0959 10351 8952 8953 4954 0955 8956 110 CALL MTFIX 2 IBP1 I J K XX1 CALL MTFIX 2 IB 1 9 K 4X2 CVSISCI J K 9XX1 XX2 VISCI 9 K 158 CONTINUE 168 CONTINUE DO 180 1 1 NCI DO 180 J 1 NMI DO 182 K 1 NSI IF CVSISCI J K LT 1 09 60 70 188 DO 178 I1 1 NCI IF CVISCI I1 J T 1 9 GO TO 178 CALL MTFIX 2 I 1 CALL MTFIX 2 I 2 XCVSIS 1 11 J SISCI J K SISCILI J K 178 CONTINUE 188 CONTINUE TRANSFER MEASUREMENTS 198 TR g DO 288 1 1 NCT 288 TR T IB I TR VARIANCE OF TOTAL RANDOM TRANSFER ERROR VTTR DO 218 I 1 NCT DO 218 J 1 NMT CALL MTFIX G IT 1 9 IDUM 218 VITReVTTR XX1 2 VTR 1 3 wwwwkwwwwwww RANDOM ERROR CORRELATIONS wwww wwxxx DEVELOPED FOR THE CASE WHERE TRANSFER IS COMPUTED AS wwxwwwwx THE INTEGRATED PRODUCT OF FLOW RATE AND CONCENTRATION N x x 3 IF NCFRC
160. TES CUSUM AND CUSUM VARIANCE k k ye y ve he e e e e he e e k k Ve e ke e e e e e t e je e Wa Ke e Ya e e t e Ye Ye ke e e e e e e e e ve ve k e e e e ve e e e e e W e e ye k k Xx xw PARAMETER NBALMX 195 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 10 NPVTMX 8 NCIMX 1 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 22 NCOLMX 2 DOUBLE PRECISION SUM SUMSQ DCS COMMON SAMPLE SUM NBMXP1 SUMSQ NBMXP1 INTEGER TSCI TCI COMMON MSINCM ICI NCIMX NCIMX NMIMX ISCI NCIMX NMIMX TCI NCTMX NCTMX NMTMXD TSCICGNCTMX VTRONCTMX NMTMX VISCNCIMX NMIMX 2 VTS NCTMX NMTMX 2 SIRCNCIMX 5 gt SIS NCIMX NMIMX 2 STSCNCTMX NMTMX 2 COMMON VAR XI NBMXP2 NCIMX S2I NBMXP1 CVI NBMXP1 T NTMXP1 NCTMX 2 TM NTMXP1 NCTMX NMTMX S2TCNTRNMX CVTCNTRNMX CS NBMXP1 S2CS NBMXP1 TTCNTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TRONTRNMX S2TBC NTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP 1 COMMON CON NBAL NBALP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCAL NCTMX 2 lt IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC ITRANCNPVMX IPVNO
161. TMX MAXIMUM NUMBER OF TRANSFER MEASUREMENTS NSIMX MAXIMUM NUMBER OF INVENTORY SYSTEMATIC ERRORS NSTMX MAXIMUM NUMBER OF TRANSFER SYSTEMATIC ERRORS NCMX MINIMUM OF NMIMX AND NMTMX MXPMX MAXIMUM OF NSIMX AND NSTMX NSTRMX MAXIMUM NUMBER OF RANDOM NUMBER STREAMS NCOLMX MAXIMUM NUMBER OF PULSE COLUMNS COMMON CVCOM CVSISC NCIMX NMIMX NSIMX CVITS ONCIMX NCTMX NMTMX MXPMX CVTS NCTMX NCETMX NMTMX NSTMX CVSTS NCTMX NMTMX NSTMX CVIS ONCIMX NCIMX NMIMX NSIMX CVITR ONCIMX NCTMX NMTMX XCVSIS NCIMX NCIMX NMIMX NSIMX XCVSTS NCTMX NCTMX NMTMX NSTMX 5 NMTMX MXP MX COMMON VAR XI NBMXP2 NCIMX 521 1 CVICNBMXP1 TCNTMXP1 XIM NBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX SZT NTRNMX CVT NTRNMX CS NBMXP1 S2CS NBMXP1 TT NTRNMX XIT NBMXP1 S2IR ONBMXP1 S2IB NBMXP1 S2TR NTRNMX S2TBCNTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON MESPAR SIGMAE NPVMX 2 5 2 SIGZN ONPVMX 2 MESTYPCONPVMX INTCALCNPVMX 2 ISTRPVCNPVMX IZE IMTICNCIMX NMIMX IMTTCNCTMX NMTMX ISTRNRCNPVMX ISTRNSCNPVMX INTEGER TSCI TCI Fig D 1 cont 113 ID OO e N gt 00 m e Set w w x w x Se Se Se x x Se sx lt but 42 wn G Q OA A YN Y Y 00 Y YU a i
162. TO 28 WRITE 1 10 IPV 1 WRITE NPROUT 19 IPV 1 FORMAT RUN TERMINATED IN SUBROUTINE INV1 WITH ICINV 1T PROCESS VARIABLE NUMBER 13 CALL CLOSEM CONTINUE JPV1 IPV 1 IPVTI NPVIT IPV1 IF IPVTRN IPV1 EQ 0 GO TO 4g DO 38 I 1 NBALP2 ITC 1 I 1 NTRPBL XIM I ICINV 1 PVT ITC IPVTI CONTINUE GO TO 68 DO 58 I 1 NBALP2 XIMCI ICINV 1 2PVICI IPVTI CONTINUE DO 78 I 1 NBALP2 XICI ICINV SXIMCI ICINV 1 CONTINUE IF NMI EQ 1 GO TO 98 DO 82 I 1 NBALP2 XIMCI ICINV 2 1 CONTINUE RETURN END SUBROUTINE INV2 IPV w xww x INVENTORY MODEL WITH TWO MEASUREMENTS PARAMETER NBALMX2105 NBMXPI NBALMX 1 NBMXP2 NBALMX 2 NPVIN NDECIN IPRPV NDAT IRNSCH ITIN NPVMX NCITST NFSEED INTRNC IPVNO 5 NPVMX NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOLCNPVMX HCCC B NCOLMX VCC 2 NCOLMX2 CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NCITS 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 18 NPVTMX 8 NCIMX 10 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 24 4 NCOLMX 2 COMMON PVCOM PVI NBMXP3 NPVIMX PVT NTMXP2 NPYTMX A COMMON VAR XI NBMXP2 NCIMX 521 1 CVI NBMXP1 T NTMXP1 XIM NBMXP2Z NCIMX NMIMX TM NTMXP1 NCTMX NMTMX XIT NBMXP1 S2IR NBMXP1 5218 SZTRONTRNMX A COMMON CON NB
163. UMBER OF TRANSFER AND INVENTORY SETS IN THE PROCESS H 28 H 25 INVENTORY TRANSFER NUMBERS H 27 6 2 2 5 5 H 28 4 29 IPVNO PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER INVENTORY 38 1 2 INPUT TRANSFER H 31 3 A4 INVENTORY H 32 5 6 TANK2 INVENTORY t 33 7 WASTE OUTPUT 34 87 PRODUCT OUTPUT V 35 4 36 8 ISPNTI SPECIFIC INVENTORY TRANSFER SET NO 0 GIVES ALL SETS H 37 38 w MEASUREMENT ERRORS ASSOCIATED WITH EACH PROCESS VARIABLE H 13 INPUT VOLUME 41 81 81 42 2 INPUT CONCENTRATION t 43 81 81 44 3 TANK1 VOLUME 45 817 H 46 4 TANK CONCENTRATION 4 47 B1 4 48 5 TANK2 VOLUME H 49 OO H 59 6 TANK2 CONCENTRATION 51 81 52 7 WASTE PU 53 81 81 54 8 PRODUCT PU H 55 B1 01 Fig 5 Input data Example 1 The IPVNO array defines the process variables associated with each inventory or transfer Each process variable has a number associated with it as defined in Table VIII These numbers are used to identify the process variables in the IPVNO input Each line of IPVNO input corresponds to a transfer or inventory as defined by the ITIN input The first line of IPVNO data must correspond to the first element of ITIN etc In this example the 6 in the first element of ITIN specifies the input transfer as the product of two measured values Thus the first line of IPVNO data contains a 1
164. VARIABLE 1 INPUT VOLUME 01 885 2 INPUT CONCENTRATION 883 881 3 HOLDUP PRECIPITATOR FEED INPUT TRANSFER CONTRIBUTION 2 1 2 INVENTORY PRECIPITATOR 167 5 INVENTORY FILTER 9833 8 OUTPUT MASS ADU CAKE B92 991 B 2 7 OUTPUT CONCENTRATION ADU CAKE 867 H5 1 24 2 INVENTORY POLISH FILTER 85 OUTPUT VOLUME BL 285 18 OUTPUT CONCENTRATION 1 857 Fig 18 Input data Example 5 70 INPUT DATA FILE 50718 PV ARRAY FILE PVARIS OUTPUT DECANAL FILE DECINN TUE OCT 28 1981 87 25 37 TITLE FROM PROCESS VARIABLE FILE EXAMPLE 5 CORRELATED INPUT TRANSFER AND INVENTORY ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE IZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH 8 NUMBER OF RUNS NRUN 188 NUMBER OF BALANCES 20 NUMBER OF TRANSFERS PER BALANCE NTRPBL 24 TIME INTERVAL DT 4 902 MASSAGE DEBUGG PRINT FLAG HASPRT 8 TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG CITIPRP g PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR Y PRINTOUT FLAG FOR INPUT PROCESS VARIABLES IPVPRT g ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN GT 8 2 WARATARBARARENRATARRARARTATARWAHWARAEARRARARTARAATARAS INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA NUMBER OF PROCESS VARIABLES NPV 18 NUMBER OF TRANSFER INVENTORIES NTRIN 8 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 5 5 1 1 1 1 6 ARRAY OF PROCESS VARIABLE NUMBERS ASSOC
165. X TCICNCTMX NCTMX NMTMX 5 NCTMX VIR NCIMX NMIMX VTRCONCTMX NMTMX VISCONCIMX NMIMX 2 VTSCNCTMX NMTMX 2 SIRCNCIMX NMIMX STRCNCTMX NMTMX gt SIS NCIMX NMIMX 2 STS NCTMX NMTMX 2 COMMON VAR XI NBMXP2 NCIMX S2I NBMXP 1D CVI GNBMXP I2 TUNTMXPI NCTMX XIM NBMXP2 NCIMX NMIMXO TM NTMXP1 NCTMX NMTMX S2T NTRNMX CVTCNTRNMX CS NBMXP1 S2CS NBMXP1 TT NTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB ONBMXP1 S2TRONTRNMX S2TB NTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP 1 DIMENSION IREC 6 2 2 INTEGER 2 DCNLIN PVARA COMMON TITLE ITITLE 4 IPVTI 32 NPVMX DCNLIN 3P MESINP 3 PVARAC3 DATA IREC 2 1 1 1 3 3 4 3 2 4 2 4 2 1 1 1 4 4 3 4 2 3 2 3 VARIABLE NAMES INPUT NCI NUMBER OF INVENTORY COMPONENTS NCT NUMBER OF TRANSFER COMPONENTS NMI NUMBER OF INVENTORY MEASUREMENTS NMT NUMBER OF TRANSFER MEASUREMENTS EXAMPLE LET H C1 V1 2 V2 THEN Ci V1 IS FIRST COMPONENT AND C2 IS THE FIRST MEASUREMENT VALUE OF SECOND COMPONENT NSI NUMBER OF ETA BIAS TERMS IN EACH INVENTORY MEASUREMENT NST NUMBER OF ETACBIAS TERMS IN EACH TRANSFER MEASUREMENT NC MINIMUM OF NMI AND NMT NP TOTAL NUMBER OF BALANCE PERIODS NNP NUMBER OF CURRENT BALANCE PERIODS I COMPONENT INDEX 11 COMPONENT INDEX J VALUE INDEX K BIAS TERM INDEX XI I J INVENTORY MEASUREMENT COMPONENT 1 9 TRANSFER MEASUREMENT COMPONENT VIRCI J VARIANCE OF INVENTORY RANDOM ERROR VTR 1 J VARIANCE OF TRANSFER RANDOM
166. a transfer computed as the product of measured values of volume and concentration both voiume and concentration are considered as measurements In most cases components are either directly equal to a measurement or to the product of two measurements Components and measurements associated with each of the transfer and inventory types currently used in the code are sum marized in Table IV which shows that the pulsed column inven tories are computed from the sum of four components The first three components are measurements computed from the product of a constant and a measured value of concentration while the fourth component is a collection of terms not dependent upon any meas urements These fourth components for all the pulsed columns in a given UPAA are summed in the same inventory component Four transfer components are required to model the transfer computed from the product of flow rate and concentration In this case each component is defined by the product of two meas urements namely the flow rate and the product of constant and the concentration The subscript 1 indicates measured process variables at the previous time and 2 indicates values at the current time 14 TABLE COMPONENTS AND MEASUREMENTS FOR INVENTORIES AND TRANSFERSA Inventory or Component Measurement Transfer No _ Type No Le cial 2 1 Inventory direct 1 I 2 Inventory product of volume and concen tration 1 V C 3 or 4 Inventory pulse
167. ables for each set can be computed from Eqs 8 and 9 With the number of mate rials balances NBAL equal to 50 and with 1 transfer per balance NTRPBL the minimum number of inventory and transfer process variables per set are 52 and 54 respectively Each nonzero measurement error requires a Separate random number stream Figure 5 shows 12 nonzero measurement errors for this example Therefore the input random number seed file must contain at least 12 numbers The random number seed file con taining 20 numbers is given in Fig 6 This file of random number seeds is used for all the examples in this manual The output file for this example is shown in Fig 7 The first page consists primarily of an echo check of the input data 41 1987987812 1 97659876 1776999876 1789876545 1679456398 1997638984 1543098747 1676554679 1787656778 1389898765 Fig 6 1895639857 Random number seeds Example 1 1674982654 1653987289 1673892674 1567589443 1739823648 1986540393 2098769873 1796576548 1876940346 At the top of the second page is a summary of the important inte gers calculated in subroutine SETMAS These integers computed from the input process data define the dimensions of the problem The summary table Sec V for this example appears on the bottom of the second page of the output file B Example 2 This example was chosen to illustrate the case where multiple transfers take place within materials b
168. adily available from tables However when the number of degrees of freedom df is gt 30 the chi squared percentile values can be calculated to a reasonable degree of accuracy by rela tively simple analytic approach For df 30 the function 2x2 1 2 2df 1 1 2 is almost distributed with mean zero and standard deviation one If z is the pth percen tile of the standardized normal distribution it follows that 2 1 2 _ _ 1 2 Zo 2x5 2df 1 Solving for xt gives 2 2 X 1 z Yy2df 8 5 83 For a 95 confidence interval 2 54 of the area under the density function curve must lie in each of the two tails requir ing percentiles of 2 5 and 97 5 For the standard normal distri bution Zo 5 1 96 and 297 5 1 96 Substituting these percentiles into Eq B 6 results in the following chi squared percentiles for a 95 confidence interval x 1 1 96 V2df 2 and B 6 2 5 2 2 _ 1 EE O B 7 The above expressions are approximations to the chi squared per centiles valid for the number of degrees of freedom df at least 30 or greater A comparison of these approximate chi squared percentiles with the exact tabular values is given in Table for different degrees of freedom df Inspection of Table B I shows that Eqs B 6 and B 7 are good approximations to the exact tabular values for degrees of freedom in the 30 1000 range Substitu
169. alance intervals The block diagram is given in Fig 8 l kg input transfer takes place every hour with a 10 output transfer at 10 h intervals Materials balances are calculated every 10 h The input and out put transfers and the inventory are each determined from one measured process value These process variables are summarized in Table IX In this case the input transfer occurs at a frequency of 10 transfers per balance with the output transfer at 1 transfer per balance However the code requires that all transfers take place at the same frequency This requirement is satisfied by struc turing the output transfer at the same frequency as the input transfer but with 903 of these transfers equal to zero The transfer measurement error models are of the mixed type with the 42 INPUT DATA FILE MESDTI PV ARRAY FILE OUTPUT DECANAL FILE DECINN MON OCT 19 1981 14 56 11 TITLE FROM PROCESS MODEL CODE EXAMPLE I SAMPLE PROBLEM 1 FROM PROCESS MODEL USER S MANUAL LA 8761 M ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE IZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH 8 NUMBER OF RUNS NRUN 1 NUMBER OF BALANCES NBAL 5g NUMBER OF TRANSFERS PER BALANCE NTRPBL 1 TIME INTERVAL DT D BH MASSAGE DEBUGG PRINT FLAG MASPRT 8 TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG ITIPRP g PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR B PRINTOUT FLAG FOR INPUT PROCESS VARIABLES
170. also made for the precipitation filter and polish filter units The third transfer for this UPAA is an out put from the filtrate storage unit at frequency of 10 batches per day The amount of uranium in each batch is computed from the products of volume and concentration The process variables required for this example along with their nominal values and transfer batch frequencies are given in Table XII Process variable 1 is labeled as the Input Volume in Table XII This process variable is the volume measured in the precipitation feed makeup tank and includes the tank holdup volume as well as the input volume Materials balances are calculated once per day Table XII shows that the transfers take place at a much higher frequency than this The ADU cake has the highest frequency with 24 output batches day Because the MEASIM code requires that all the trans fers have the same frequency it is necessary to supplement the TABLE XII PROCESS VARIABLES FOR EXAMPLE 5 Nominal Frequency No Variable Value Batches Day 1 Input vol L 12 6 12 2 Input conc kg L 0 22 12 3 Holdup precip feed kg 0 022 4 Inventory precipitator kg 0 1 5 Inventory filter kg 0 9 6 Output mass ADU cake kg 9 0 24 7 Output conc ADU cake kg L 0 15148 24 8 Inventory polish filter kg 0 22 9 Output vol filtrate storage 1 35 0 10 10 Output conc filter storage kg L 0 0008 10 67 other transfers with zeros to increase their frequency
171. and a 2 the process variable numbers 40 corresponding to this transfer Similar reasoning applies to the remaining four lines of IPVNO data The O input for ISPNTI at line 36 indicates to the code that all the inventories and trans fers defined by ITIN are to be included in the materials balance CUSUM and variance calculations The input data file is concluded with the measurement errors for each of the process variables These measurement errors appear in the order defined by the process variable numbering In this example all the measurement error standard deviations are set at 0 01 As indicated in Sec IV each line of process vari ble measurement input should contain six entries In this example the is used to terminate the input measurement error data with maximum of 1 2 entries per Line The omitted entries take on their respective default values as defined 1 Table VI an example line 41 of the input data assigns a 0 01 standard deviation to the uncorrelated and short term correlated errors with the remaining entries for that line taking on default values This implies a zero for the long term correlated error a multiplicative error model and recalibration intervals for the correlated errors of 10 000 transfers that is no recalibration The input process variable file must contain eight sets of numbers corresponding to the eight process variables The number of required transfer and inventory process vari
172. ansfer per materials balance all transfers must have the same frequency Thus the output transfer consists of 9 zero and 1 nonzero entries for every balance period The output file is shown in Fig 10 Again it is important to note that the integers calculated in subroutine SETMAS are consistent with the process model and measurement errors A total of 7 random number streams is required because there are 7 nonzero measurement errors The tabular summary of the zero error case 46 INPUT DATA FILE MESDT6 PV ARRAY FILE PVARAG OUTPUT DECANAL FILE DECINN MON OCT 19 1981 15 18 03 TITLE FOR PROCESS VARIABLE ARRAY EXAMPLE 2 SEPTEMBER 1981 TFN INPUT TRANSFERS PER MATERIALS BALANCE ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE IZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH Y NUMBER OF RUNS NRUN 180 NUMBER OF BALANCES NBAL 59 NUMBER OF TRANSFERS PER BALANCE NTRPBL 18 TIME INTERVAL DT 8 090 MASSAGE DEBUGG PRINT FLAG MASPRT Y TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG ITIPRP sg PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR PRINTOUT FLAG FOR INPUT PROCESS VARIABLES IPVPRT g ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN ET B 8 w BRRRARAEARRARAHWNARRATAREY INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA NUMBER OF PROCESS VARIABLES NPV 3 NUMBER OF TRANSFER INVENTORIES NTRIN e 3 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN 5 1 5 ARR
173. ation For a l day materials bal ance 63 SOLUTION IN 12 BATCHES PRECIPITATION 12 5 L BATCH MAKE UP m Fig 17 Process block diagram Example 5 mus rius ADU CAKE FILTRATE STORAGE TO ION EXCHANGE MB Try Hg where Tin input transfer Ho initial holdup residue and 2 final holdup after 1 day 12 batches The input transfer for the 12 batches will be C V H ii IN 1 1 64 2 summation over i from 1 to 12 Ci input concentration for ith batch Vi measured volume of the precipitation feed makeup tank for the ith batch and Hi1 hoidup before ith batch is added Substituting this expression for Tin into the equation for MB gives Hg Hg This particular transfer and inventory combination can be handled by considering LC V as a correlated input trans fer BH as a correlated output transfer and Ho 2 1 normal inventory The CiVi terms are not correlated with the H terms However the ZH transfer is correlated with the inventory term Ho Biz Because of the canceling effect of the Hg Hi2 term however these inventory transfer cor relations will have a very small effect upon the materials balance variance in the steady state case see Appendix A and are neg lected in the propagated variance calculations The ADU cake is output at a frequency of 24 batches per day Uran
174. code The process variables for the five examples in this user s manual were generated this way to make it relatively easy for a potential user to generate the process variable file for code checkout The code required to generate process variables for the five examples in this user s manual is called PVGEN A listing of PVGEN is given in Fig C 1 PVGEN requires an input data file consisting of five input variables summarized in Table B 1 in the order that they must appear on the input file Of these five input variables only the transfer indicator IPVTRN requires further explanation Each of the NPV entries in the IPVTRN array corresponds to a single process variable IPVTRN 1 corresponds to the first process variable IPVTRN 2 to the second process variable etc zero indicates inventory process variable whereas a nonzero value indicates a transfer process variable For positive values of IPVTRN for example N only every Nth value of the corresponding transfer process variable will be nonzero As an example if IPVTRN I is equal to 10 then for the Ith process variable every 10th value will be nonzero with all the other values zero Negative entries for IPVTRN still indicate a transfer but with a different sequenc ing of zero and nonzero values The negative IPVYRN with the largest absolute value establishes the number of transfers over a given repeating cycle and indicates that all the process variable values are n
175. counting systems This report provides the necessary informa tion for a potential user to employ the code in these applications A number of examples that demonstrate most of the cap abilities of the code are provided I INTRODUCTION The MEASIM MEAsurement SIMulation code was developed as one in a set of three codes to be used for diversion sensitivity studies in nuclear materials processing facilities MEASIM as the name implies simulates process measurements The other two codes in this set are MODEL and DECANAL MODEL is used to simulate process dynamics and DECANAL DECision ANALysis uses measured values to determine the likelihood of missing material MEASIM applies measurement errors to the true values of the process variables generated by MODEL These measured values of process variables are the primary input to DECANAL In addition to simulating process measured values MEASIM performs numerous other useful calculations Input data to the DECANAL code can become relatively complex for large process simu lations MEASIM writes the complete DECANAL input file Other MEASIM calculations include total inventories net transfers materials balances cumulative summations CUSUMs of materials balances and measurement error variances associated with each of the above quantities These calculations serve as a useful check on the input file to DECANAL because DECANAL computes the same quantities MEASIM also has a built in mu
176. cussed The results of the Monte Carlo simulation show good agreement between the sampled and propagated CUSUM variances with only one ratio outside the 95 confidence interval VIII COMPUTER REQUIREMENTS The MEASIM code has been checked out and run on a PRIME 750 computer Computer core memory requirements are relatively high because of the large arrays required for process variables trans fers and inventory components and variances and covariances The code itself requires 22 148 l6 bit words of computer memory to load An additional 67 819 words are required for common block storage giving a total of 89 967 words for the complete program with the capability for modeling a maximum of 105 materials bai ances and 515 transfers Computation times are very much problem dependent summary of the computer Central Processor Unit CPU time for the 5 exam ple problems in this manual is given in Table XIII TABLE XIII CPU TIME REQUIREMENTS FOR THE EXAMPLE PROBLEMS Time Example s 1 3 5 2 210 2 3 939 1 4 34 0 5 519 1 APRIME 750 Central Processor Unit 72 Example problem 1 consists of one zero error run with 50 balances and 50 transfers The larger computation times asso ciated with examples 2 5 are due to additional transfer components and to the Monte Carlo runs Additional transfers have signifi cant effects upon computation times because the code must check for the numerous correlation possibilities for t
177. e namely the precipitator feed holdup is used twice This discrepancy causes no computation problems however so long as the array sizes are set to handle 11 process variables Similar reasoning applies to the number of random number streams NNSTRM Counting the precipitator holdup twice causes the number of random number seeds to be 20 instead of 18 Because there are only 17 nonzero measurement errors it would be reasonable to expect only 17 random number streams How ever the code always allocates a random number stream for uncor related errors whether or not the error is zero In this example the uncorrelated error associated with the ADU cake concentration 68 nnnm mm mmm m m AAA TO TO j e pur pe Ee Een Een SD OW OY UI a C 0 00 lt N Q xO 0 4 O U a 0 57 5 22 e bet A A e e A a e a A en a be de de 69 0 C CO Lo Q M A A A m O AAA A E Am A AAA A A A oogicatintnaogodugtngasasJ3e 3 PO tQ vD CO lt 0 t 0 09 N SON IR D J CO Je QU PJ amp Se Te Do M M M M y EXAMPLE 5 CORRELATED INPUT TRANSFER AND INVENTORY PARAMETERS HBALMX 195 NTRNMX 515 12 NPVIMX 12 NCIMX 19 NCTMX 8 NMIMXs2 NMTMX 2 NS
178. e MEASIM code contains the random number seeds Each seed is a positive ten digit integer Less than equal to 2 147 483 648 The number of seeds must be equal to or greater than the number of nonzero measurement errors with the seeds entered one per line With the three input files constructed as above the next step is to compile the MEASIM code Before compiling however it is advisable to check the parameter values in the FORTRAN PARAMETER statement to make certain that the dimensions of the arrays are adequate to handle the problem under consideration The parameters are defined in Table I After checking the parameters the code can be compiled link loaded and then run On the PRIME 750 computer these operations can be performed with the following statements 1 FTN MEASIM 64V L 2 SEG 3 VLOAD MEASIM 4 LO B MEASIM LIB VAPPLB 6 LI 7 MA MAP O 8 QU m 9 SEG MEASIM 75 10 MESDT1 11 PVARA1 12 DECINN 13 SPOOL MESOUT 14 co TTY Line 1 compiles the code lines 2 8 load the code and lines 9 13 run the code and transfer the output file to the high speed printer A complete FORTRAN listing of MEASIM appears in Appendix D X ACKNOWLEDGMENTS The author wishes to thank all of the Safeguards Systems personnel who contributed to this user s manual A Dayem developed an early version of the code J T Markin and J P Shipley developed subroutine MASAGE which wa
179. e can then be calculated by direct substitu tion into Eq 1 16 The CUmulative SUMmation CUSUM of materials balances is defined over a time interval spanning one or more materials bal ance intervals and is equal to the sum of the materials balances over that interval In the general case where N materials balance intervals span the interval to to ty the CUSUM will be II t CUSUM tt MB t _ t 1 1 N 1 Substituting MB from Eq 1 into the above equation gives N CUSUM t sty I t I ty uS DE nic 2 As indicated in Sec I the materials balance and CUSUM cal culations serve mainly as valuable debugging aids F Measurement Error Models The primary purpose of the MEASIM code is to model measure ment errors and hence compute measured values for process vari ables Measurement errors are considered to be of two types correlated and uncorrelated sometimes called systematic and random Correlated errors are further classified as either short or long term Uncorrelated errors change each time a measurement is made Short term correlated errors remain constant until the measuring instrument is recalibrated whereas long term correlated errors remain constant over the entire simulation For each measurement the MEASIM code allows for three errors an uncorre lated error a short term correlated error and a long term cor related error All errors are generated as deviates from zero mean
180. e code 1 rrimary input file 2 process variable file and 3 random number seed file The primary input file defines the UPAA the measurement errors and measurement model and other information pertinent to the simulation The process Variable file contains at a minimum those process variables from the MODEL code that are necessary to perform a materials balance calculation for the UPAA and the random number seeds file contains the numbers necessary for start ing the random number generator 20 Primary Input File Table V gives a complete listing of all possible input data to the code The input is free format is used to termi nate an input data line Input variables that do not appear on the input file take on their corresponding default values A in the first column is frequently used to indicate a comment line The data sequencing and the comment lines must be adhered to strictly An explanation of all input variables and their default values is given in Table VI The specific process is defined by the NPV NTRIN ITIN IPVNO and ISPNTI inputs NPV is equal to the number of different process variables read in from the process variable file In general NPV must be greater than or equal to the number of proc ess variables required for the UPAA of interest NTRIN specifies the number of transfers and inventories required to define the UPAA Specific inventory and transfer types are defined by the ITIN vector as d
181. e of transfers and inventories in ITIN is the user s choice and has no effect upon the results of this simulation However each transfer and inventory is assigned an inventory transfer number by virtue of its position in the ITIN array This number must be strictly adhered to for the subsequent IPVNO and ISPNTI inputs 39 4 n A annaran MEASIM INPUT DATA EXAMPLE 1 SEPTEMBER 1981 1 4 3 PARAMETERS EE NTRNMX 515 NPVMX 12 NPVIMX 19 NPVTMX 8 H CIMX 18 NCTMX 8 NMIMX 2 NMTMX 2 NSIMX 2 NSTMX 2 5 Aa MXPMX 2 NSTRMX 29 NCOLMX 2 6 7 EXAMPLE 1 SAMPLE PROBLEM 1 FROM PROCESS MODEL USER S MANUAL LA 8761 M 8 9 17 12 ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE ig 87 IRNSCH RANDOM NUMBER SEEDS CHANGE FROM RUN TO RUN WHEN NONZERO 11 17 NRUN NUMBER OF RUNS 12 587 NBAL NUMBER OF MATERIALS BALANCES t 13 1 NTRPBL NUMBER OF TRANSFERS PER BALANCE 14 87 DT TIME CONSTANT NOT USED IN THIS EXAMPLE 15 MASPRT PRINTS MASSAGE DEBUGG OUTPUT WHEN NONZERO H 16 8 ITIPRP PRINTS TRANSFER INVENTORY SET NO AND PROC VAR NO IFag 17 87 IMESPR PRINTS INPUT MEASUREMENT ERRORS WHEN EQUAL TO 1 18 IPVPRT PRINTS PROCESS VARIABLE FILE WHEN NON ZERO 1 22 t ICLAPS REDUCES DIMENSIONS OF DECANAL INPUT FILE WHEN NONZERO 21 s a INPUT DATA FOR DEFINING UNIT PROCESS ACCOUNTING AREA 22 4 23 87 NPV NUMBER OF PROCESS VARIABLES 24 5 NTRIN N
182. ed by the units used for the input process variables For the TABLE I VARIABLES IN THE FORTRAN PARAMETER STATEMENT Current Variable Definition Value NBALMX Maximum number of materials balances 105 NBMXP1 NBALMX 1 106 NBMXP2 NBALMX 2 107 NBMXP3 NBALMX 3 108 NT RNMX Maximum number of transfer values for each transfer process variable 515 NTMXP 1 NTRNMX 1 516 2 NTRNMX 2 517 NPVMX Maximum number of process variables 12 NPVIMX Maximum number of inventory process variables 10 NPVTMX Maximum number of transfer process variables 8 NCIMX Maximum number of inventory components 10 NCTMX Maximum number of transfer components 8 NMIMX Maximum number of inventory measure ments per component 2 NMTMX Maximum number of transfer measure ments per component 2 NSIMX Maximum number of correlated errors per inventory measurement 2 NSTMX Maximum number of correlated errors per transfer measurement 2 NCMX Minimum number of NMIMX and NMTMX 2 MXPMX Maximum number of NSIMX and NSTMX 2 NST RMX Maximum number of random number streams 20 NCOLMX Maximum number of pulsed columns 2 example problems appearing in this manual the input process vari ables have units in kilograms liters and hours Hence the outputs from MEASIM will have similar units Input Output Files The MEASIM code requires five files for input output pur poses These files and their associated logical unit numbers are summarized in Table II Content and
183. ed errors in the inventory variance calculations that is is not assumed to be zero However if initial and final inventories are almost equal then will be small Hence the inventory variance from correlated errors will be small and will have a relatively small effect upon the CUSUM variance MEASIM s neglect of correlation between different inventories and most correlations between inventories and transfers implies that Kj and K are zero will be small if either of the inventories Ii or 1 have initial final values that are almost equal Constant K4 will be small if the change in inventory 1 is small or if the net input transfer rT is approximately equal to the net output transfers 27 4 Similar reasoning applies to 1 and 81 APPENDIX B CONFIDENCE INTERVALS FOR MONTE CARLO SIMULATIONS As indicated in Sec V and VI the Monte Carlo option is very valuable for verifying the correctness of the simulation The MEASIM code when running in the Monte Carlo mode makes one zero error run for computing the propagated or analytic CUSUM standard deviation G and then a series of runs with measurement errors to calculate the sampled CUSUM oc Both propagated and sampled o s are computed for each materials balance If sam pled CUSUM 0 s are within some confidence interval of the prop agated o s then some assurance is provided that the propagated CUSUM G is being calculated correctly and that measurement error
184. ed in line 30 An additive error model for weight measurements is selected with the 2 as the fourth entry in lines 40 and 42 59 60 mmmn RRR RAR ARR AR RR RAR RRR RAR AR AR RAR AR RAR ARR A e A e TABLE XI PROCESS VARIABLES FOR EXAMPLE 4 Nominal No Variable _Value 1 Input concentration kg kg 0 676 2 Initial cylinder weight kg 25 0 3 Final cylinder weight kg 0 5 4 Output volume L 75 0 5 Output concentration kg L 0 2208 upDOuogaufm 4 G N NNDD Ra be E 5 4 EXAMPLE 4 INPUT TRANSFER AS PRODUCT OF CONC AND WT DIFF PARAMETERS NBALMX 195 NTRNMX2515 NPVMX 12 NPVIMX 19 NPVTMX B NC1MX 18 NCTMX 8 NMIMX 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 MSTRMX 29 NCOLMX 2 X 4 INPUT TRANSFER AS THE PRODUCT OF CONCENTRATION AND WEIGHT DIFFERENCE 1 12 ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE 8 IRNSCH RANDOM NUMBER SEEDS CHANGE FROM RUN TO RUN WHEN NONZERO 198 NRUN NUMBER OF RUNS 587 NBAL NUMBER QF MATERIALS BALANCES 2 NTRPBL NUMBER OF TRANSFERS PER DALANCE 2 7 DT TIME INTERVAL DT gf MASPRT PRINTS MASSAGE DEBUGG OUTPUT WHEN NONZERO 8 PRINTS TRANSFER INVENTORY SET NO AND PROC VAR NO IFs g IMESPR PRINTS INPUT MEASUREMENT ERRORS WHEN EQUAL TO I g IPVPRT PRINTS PROCESS VARIABLE FILE WHEN NON ZERO 2 ICLAPS COLLAPSES MATRIX
185. educed to one component each PROCES Calls the individual process routines COLUMN INVI INV2 TRAN1 TRAN2 TRAN3 and TRAN4 for computing components and measurements PRTBAL Computes materials balances and associated variances and prints a table of important variables calculated by the MEASIM code READEM Reads measurement error and type information from the input data file for each process variable REDPV Reads the input array of process variables RNORM Generates a deviate from a standard normal distribu tion SETMAS Computes the variance and correlation indicator arrays associated with each transfer and inventory STNDEV Computes the CUSUM sample variance for a given number of runs Prints a table summarizing the Monte Carlo simu lation Computes the transfer component and measurement for a transfer consisting of one measured value TRAN2 Computes the transfer component and measurements for a transfer consisting of the product of two measured values TRAN3 Computes the transfer components and measurements for a transfer consisting of the product of flow rate and concen tration TRAN4 Computes the transfer components and measurements for the case when the transfer is modeled as the product of centration and the difference between a full weight and an empty weight WRTB Writes to the output file DEBUG mode only the arrays of correlated error variances WRTC
186. escribed in Table VI The ordering of inventories and transfers in the ITIN vector is optional but this ordering is used to assign a number to each inventory or transfer Hence if a transfer is specified in the Mth element of ITIN this trans fer is assigned an inventory transfer number of M The process variables corresponding to each inventory or transfer are selected with the IPVNO array Each process variable has a number determined by the order that it is read in from the process variable file A process variable is selected for a given inventory or transfer by inserting this number in the IPVNO array Each line of input data for the IPVNO array contains the process variable numbers for one inventory or transfer maximum of five numbers can be used for any one line The ordering of the IPVNO input data Lines must correspond to the sequence of inventories and transfers established the ITIN vector For example if the third entry in ITIN specifies a column inventory then the third line of input data for IPVNO must specify the process variables for the column inventory calculation Each line of the IPVNO input contains the process variable numbers 21 22 TABLE V INPUT DATA This is a summary of the input data to the MEASIM code The 6 lines shown here beginning with are used for comments a D o 3 IDENTIFIER IZE IRNSCH NRUN NBAL NTRPBL DT MASPRT ITIPRP IMESPR IPVPRT ICLAPS Input data fo
187. format details of these files will be given in later sections of this manual III FUNDAMENTALS OF MEASUREMENT MODELING Before discussing the more detailed aspects of the MEASIM code it will be helpful to present some of the fundamental con cepts on which the code is based A Unit Process Accounting Area The overall process can be considered to consist of one or more distinct individual processes called unit processes As an example consider the hypothetical process shown in Fig 2 In this case the complete process consists of five unit processes including the surge tank pulsed column feed tank catch tank and sample tank A Unit Processing Accounting Area UPAA con sists of one or more unit processes around which it is desired to TABLE II INPUT OUTPUT FILE SUMMARY Logical Fortran Unit No Symbol Description 11 NDAT Input data 12 NPVIN Input process variable 13 NFSEED Input random number seeds 14 NDECIN Output to DECANAL 15 NPROUT General descriptive MEASIM output 11 T PULSE COLUMN 1 Fig 2 Example process SAMPLE TANK UPAA 2 do materials accounting process of Fig 2 is divided into the two unit process accounting areas UPAAl and UPAA2 defined by the dashed lines UPAAl contains the surge tank pulsed column and feed tank and UPAA2 contains the catch tank and sample tank B Process Variables From the standpoint of the
188. generate a process variable file containing all the process variables of interest for the complete process Only a portion of these process variables may be used by the MEASIM code for any single UPAA However the number of process variables defined by the input data variable NPV must be equal to the number of different process variables on the process variable file If an inconsistency exists among these process variable numbers an error message is printed and the run is terminated The order of occurrence of the process variables on the input process variable file defines the numbering of the process vari ables Sec III The input data file must be structured to be consistent with this ordering of the process variables TABLE VII CONTENTS PROCESS VARIABLE FILE TITLE N IPVTRN 1 IPVTRN 2 IPVTRN N NPVC 1 NPVC 2 NPVC N 1 1 2 1 1 1 PV 1 2 PV 2 2 PV NPVC 2 2 PV 1 N PV 2 N PV NPVC N N 27 Two types of process variables are those associated with transfer calculations and those with inventory calculations Inventory process variables are required only at materials balance times but transfer process variables are required any time a transfer is made Usually the number of transfer process vari ables will be at least equal to or greater than the number of inventory process variables In some isolated instances a process variable is used for both transfer and in
189. he transfers Although example problem 3 has only 10 balances the computation time is relatively large because there are ten transfers per materials balance and Monte Carlo runs are made for the entire UPAA and for each individual transfer and inventory element In addition both input and output transfers are computed from the product of flow rate and concentration Because each of these transfers requires 4 transfer components the large number of transfer correlations causes the computation time to be increased Example 5 has only 20 materials balances but 24 batch transfers per balance period IX OPERATIONAL PROCEDURES This section provides guidelines for computer implementation of the code and a suggested procedure for measurement modeling a given process The entire source code resides on one file and is written with very standard FORTRAN IV for a PRIME 750 computer Possibly the only nonstandard feature of the code is the use of the FORTRAN PARAMETER statement to dimension the arrays The PARAMETER state ment makes it possible to change the problem dimensions very quickly and easily This capability is particularly advantageous for the inexperienced user For those machines that do not sup port the PARAMETER statement it would be necessary for the user to replace the parameters with integers in the COMMON and DIMENSION statements In addition subroutines WRTB WRTC WRTR WRTS WRT3 and WRT5 called from subroutines MASAGE and S
190. ium concentration remains the same over each set of 24 batches but each batch is weighed out separately Therefore the ADU cake transfer for 24 batches can be represented by where C is the concentration for all 24 batches M is the wet cake mass for the ith batch and 2 represents the summation 65 over i from 1 to 24 This type of transfer where the concentra tion remains constant for a set of batches is not directly avail able within the framework of the MEASIM code However the trans fer of the type ECM where the concentration Ci changes for each batch is available The LC M type transfer can pe easily converted to the type transfer by setting the C uncorrelated error to zero and equating the uncorrelated and short term correlated errors for C to the short term and long term correlated errors for Ci For example let c u ltertn and 6 C u l e n 0 where u true value uncorrelated error n short term correlated error and 8 long term correlated error Then ZCM can be equivalent to CEM by setting 0 and m II 6 n and recalibrating the short term correlated error ni every 24 batches In this case Ci will change every 24 batches just as C according to the uncorrelated error component of C Also and will be governed by the same correlated errors 66 In addition to the precipitation feed makeup unit inventory measurements are
191. ively of the table Column 5 contains the ratio of the sample to propagated variance A 95 confidence interval see Appendix B is defined for this ratio at the top of this page If this ratio of sample to gated variances lies within the confidence interval then an OK appears in the sixth column If the ratio lies outside the fidence interval then RATIO OUTSIDE THE INTERVAL appears in column 6 As discussed in Appendix B the correlation of the sample CUSUM variances at each materials balance time makes it impossible to conclude that about 95 of the ratios will lie within the 95 confidence interval for a given Monte Carlo simu lation The correct conciusion is that for a sufficiently large number of different Monte Carlo simulations the ratio at a given balance time will lie within the confidence interval for about 34 95 of simulations any given Monte Carlo simulation because of the correlations between the ratios it is possible that the ratios at every balance time lie outside the confidence interval In these cases the Monte Carlo simulations should be repeated before drawing any conclusions concerning the correctness of the measurement model and the propagated variances The output is concluded with the final random number seeds and the computer CPU time in seconds VI DEBUGGING AIDS A number of useful debugging aids have been built into the code to assist the user in case of difficulty
192. k k K k K 0 k K t k SETS SRE SESE SLT K R k fk k k 104 CONTINUE 5 1 148 vc e k W We c k o e e e e e k k e e elec e a k e e Ya Ya We Ya K e ie e e EE RES ERE e We a Wa Wa kc k e e k a Ya Pte e e e ee e k xe ic MULTIPLICATIVE MODEL We e se ve We e e e e e e Wa e Ya Ya We Ya c We fe e k ka e e e e c K e e e t K e c k e e e e e t e Ke e e e e e e e c e c Wa e e CA k X 110 XMES I XPROC 1 1 9E8 ERS ETAC1 ETA 2 TO 148 We Ve K ecce e A O e ee K oe e e e K K A e e e ec e e e e e e k k We A e e e A ve e ia k k e e e e k W ee ADDITIVE MODEE Y Ye he We We We MEA Wa Ye S Ye ia Ya Ya k ye Ya Yc Ae Yc Sp Ye Ya Ye Ve Ya Yc Ye Ye Ye W Ya c Yc S e fe W k tk We Wa W dk ROO Ve Ya TK S kk e sk ia k W Ya Wa We We We W W Ye w We Se We 128 XMES I XPROC I EPS ETA 1 ETA 2 GO TO 1480 TTT CN RON OR Ya ye We Y Ya Ye Ye ON Wa FE ya Yk Ye Ya zk We T Ye Ya Wa Ye Va ye Ya Ya He I Wa Ya W Y Wa ye We W a Ye We Ya We we Wa ye We We W W CN OR E HYBRID MODEL MULTIPLICATIVE FOR RANDOM AND SHORT TERM SYSTEMATIC ERRORS ADDITIVE FOR LONG TERM SYSTEMATIC ERRORS POPPE EEE EE SALES ES EL ES ESE ECE ESE RRS SS SELES SE SES ERS SSE e e AAC A A e e e lr A A de e He 130 5 XPROC 1 1 EPS ETA 1 2 148 CONTINUE RETURN END SUBROUTINE MESDRV W Yk Ye Wr Ya Ya Ye Ye Ya ae e Wa Ve e Ye ae e ae ve Ya k k k Ya Ya a Ye ae ve
193. lation The number of materials balances NBAL 51 52 Z COLUMN ZA AND COLUMN 28 USING OPERATING CONDITIONS FROM MINIRUN 6 PAGE 0281 Se s oe tte LR E gm qas nnanananan EE E A E E EN E EN EN E E E eee e A A e N et A A A 19 00 OY C IQ ID lt ch x gt o er e et M N E 21 22 23 24 25 26 27 28 29 38 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 58 51 52 53 54 55 56 57 58 59 68 61 b2 63 64 65 66 67 68 69 78 y COLUMN 2A AND COLUMN 2B USING OPERATING CONDITIONS FROM MINIRUN 6 y amp PARAMETERS NBALMK 185 NTRNMX 515 NPVMX 12 10 NPVTMX 8 NCIMX 12 NCTMX 8 2 NMTMX 2 NSIMX 2 NSTMX 2 NCNX 2 MXPMX 2 NSTRMX 28 NCOLMX 2 COLUMNS 2A AND 2B USING OPERATING CONDITIONS FROM AGNS MINIRUN 6 7 1 12 ZERO ERROR FLAG 1 GIVES ZERO ERROR CASE g IRNSCH RANDOM NUMBER SEEDS CHANGE FROM RUN TO RUN WHEN NONZERO 128 NRUN NUMBER RUNS 1g NBAL NUMBER OF MATERIALS BALANCES 18 NTRPBL NUMBER OF TRANSFERS PER BALANCE 1 DT TIME INTERVAL g MASPRT PRINTS MASSAGE DEBUGG OUTPUT WHEN NONZERO Bs PRINTS TRANSFER INVENTORY SET NO AND PROC VAR NO 1f 8 E IMESPR PRIHTS INPUT MEASUREMENT ERRORS WHEN TO 1 E IPVPRT
194. ltirun capability where in measurement calculations can be repeated with different random numbers At the end of these multirun simulations MEASIM com putes the sample CUSUM variance and compares this sample with the theoretical or propagated CUSUM variance This computation has proven to be a very powerful tool for checking measurement and variance calculations Except for the array sizes MEASIM is completely process independent because all specific process information is contained in the input data file This process independence is made pos sible through the modular manner in which MEASIM handles the process accounting areas Array sizes are set in the code by a FORTRAN PARAMETER statement in which all the parameters Clearly defined Another useful feature of MEASIM is the capability to reduce the dimensions of subsequent DECANAL calculations Generally DECANAL treats each transfer and each inventory separately For large processes this approach can lead to long computation times and large array sizes for the DECANAL code MEASIM provides the user with options of either combining the transfers into one equivalent transfer and the inventories into one equivalent inven tory or only combining the inventories into one equivalent inven tory Reducing the dimensions of the problem in this manner can significantly reduce the DECANAL computation times array sizes However for some problems these simplifications intro duce errors
195. m number seed file must contain at least NNSTRM numbers The input random number seeds are ten digit integers with a maximum value of 2 147 483 648 231 The NNSTRM numbers must appear on the input random number seed file with one number per line If the input integer IRNSCH in the primary input file is set to 1 then the random number seed file will be changed at the end of each simulation The random number seed file will remain unchanged if IRNSCH O The maximum number of random number seeds that the program can handle is determined by NSTRMX in the FORTRAN PARAMETER state ment In the current version of the code NSTRMX is set at 10 V OUTPUTS The MEASIM code generates two output files the primary out put and the output to the decision analysis code DECANAL The primary output contains an echo check of the input and the results of the simulation whereas the output to DECANAL contains all the required measured process values measurement error standard deviations o s and correlation indicators An example of the primary output file is given in Fig The first three lines of the output file indicate the file names 3 for the input data the input process variables and the output to the DECANAL code Two descriptor lines one from the process 29 INPUT DATA FILE MESDTI PV ARRAY FILE PVARAI OUTPUT DECANAL FILE DECINN MON OCT 19 1981 14 49 44 TITLE FROM PROCESS MODEL CODE EXAMPLE 1 SAMPLE PROBLEM 1 FROM PROCE
196. n be PS PS f f ND m 1 tus ta dede bb CJ CQ C 62 0303 C2 C3 WWD NDA GJ NL t O OO lt OT A GJ tQ Bw O00000000000 OO0O000000000050575700 2 NST CALL WRTA XCVSTS NCTMX NCTMX NMTMX NCT NCT NMT NST NPROUT WRITE NPROUT 522 500 FORMAT COVARIANCE BETWEEN SUCCESSIVE TRANSFER AND INVENTORY C 1O0MPONENTS XCVITS NCI NCT NMT NST CALL WRTACXCVITS NCIMX NCTMX NMTMX NCI NCT NMT NST NPROUT 518 CONTINUE 528 FORMAT 8EI15 8 530 FORMAT 2014 RETURN END SUBROUTINE MASCUS PROVIDES A BUFFER BETWEEN MASSAGE AND CUSUM TAKES OUTPUT FROM MASSAGE AT EACH BALANCE TIME AND COMPUTES VARIANCES AND COVARIANCES REQUIRED FOR THE CUSUM VARIANCE CALCULATION VARIABLE DEFINITIONS 521 1 INVENTORY VARIANCE FOR THE I TH BALANCE 52 0 INVENTORY VARIANCE THE INITIAL TIME S2T 1 TRANSFER VARIANCE OVER THE ITH BALANCE INTERVAL CVT I COVARIANCE BETWEEN ADJACENT TRANSFERS PARAMETER NBALMX 185 NBMXPizNBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 1 NTMXP2 NTRNMX 2 2 NPVMX 12 NPVIMX 19 NPVTMX 8 NCIMX 18 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 28 4 NCOLMX 2 PARAMETER DEFINITIONS NBALMX MAXIMUM NUMBER OF BALANCES NP VMX MAXIMUM NUMBER OF PV VARIABLES NCIMX MAXIMUM NUMBER OF INVENTORY COMPONENTS NCTMX MAXIMUM NUMBER OF TRANSFER COMPONENTS NMIMX MAXIMUM NUMBER OF INVENTORY MEASUREMENTS NM
197. nce 1 DT Time interval between transfers meaningful 1 only if transfer is computed as product of flowrate and concentration MASPRT Provides detailed printout of MASAGE 0 calculations when MASPRT 1 ITIPRP Provides transfer and inventory number 0 printout when ITIPRP 1 IMESPR Echo prints measurement error data when 0 IMESPR 1 IPVPRT Provides printout of the input process variable array when IPVPRT 1 0 ICLAPS Flag for reducing dimensions of the 0 output file written to DECANAL code O no reduction l all inventories reduced to one inventory with single variance and covariance 2 all inventories and transfers reduced to one inventory and one transfer each with one equivalent variance and covariance NPV Number of process variables 1 23 TABLE VI cont Default Variable Description Value NTRIN Number of transfers and inventories in UPAA 1 ITIN I Selector for the Ith inventory or transfer 1 Inventory as one measured value 2 Inventory as product of two measured values 3 Inventory as a type A pulsed column 4 Inventory as a type B pulsed column 5 Input transfer as one measured value 6 Input transfer as the product of two measured values 7 Input transfer as the product of flow rate and concentration 8 Input transfer as the product of concen tration and the difference between an initial and final weight 5 Output transfer as one measured value 6 Output transfer as the product of two measured values
198. ning the correctness the measurement modeling and variance propagation A relatively lengthy computer run was conducted to lend support to the above discussion The process of Example 1 was used for this case A total of 1000 sets of Monte Carlo simula tions were performed with each Monte Carlo set consisting of 100 calculations of the CUSUM at each of the 50 materials balances For each Monte Carlo set of 100 runs it was determined at each Materials balance whether or not the ratio 52 02 was inside or outside the confidence interval This Monte Carlo simulation was then repeated 1009 times At each materials balance a count was made of the number of times the ratio 52 02 was outside the confidence interval The results from this simulation are given in Fig B 1 For a 95 confidence interval at each materials balance the percent age of 52 02 ratios outside the confidence interval theo retically should be 5 The results shown in Fig B 1 appear to support the theory for this case 86 INTERVAL PERCENT OUTSIDE CONFIDENCE 0 10 20 30 40 MATERIALS BALANCE NUMBER Fig B 1 Per cent of the 52 02 ratios lying outside the 95 confidence interval 50 87 PROCESS VARIABLE FILES Normally the process variable files are generated by the process model code However for simple models with zero process variations the process variables can be generated directly with a small special purpose computer
199. normal distributions Subroutine RNORM generates deviates from a standard normal distribution zero mean and a standard 17 deviation of one The resulting random number from RNORM is multiplied by the standard deviation of the measurement error to obtain the actual error The measurement model defines the way the actual process values and measurement errors are combined in computing measured values The following three error models are currently available in the MEASIM code multiplicative m u 1 n 6 3 additive m u n 0 4 5 mixed m u 1 n where m measured value true process value uncorrelated error n short term correlated error and 9 long term correlated error G Variances and Covariances The primary purpose of MEASIM is to compute measured values from true values and measurement errors and write these measured values to a file that can be read by the decision analysis code DECANAL However MEASIM also performs other auxiliary calcula tions that necessitate the computation of variances and covari ances In the normal operation mode each transfer and inventory measurement along with the measurement error standard deviations are output by MEASIM to DECANAL However for some processes very little accuracy is lost by first combining the inventories and transfers into a single inventory and a single transfer along with the equivalent variances and
200. nsfer The Monte Carlo simulation option which is one of the most useful debugging tools available in the code is activated by setting the NRUN input integer to the desired number of runs As indicated in Sec V the Monte Carlo simulation generates a sample CUSUM variance 0 for each materials balance and then com putes the ratio of the sample c to the propagated 4 If this ratio lies far outside the 95 confidence interval 36 determined from the chi squared distribution see Appendix then there is most likely an error in either the sample or propa gated variances The ratio of the variances for each materials balan 2 along with the limits for the 95 confidence interval appear on the output file when the Monte Carlo option is selected Sec V If an error is detected when using the Monte Carlo simulation option for the complete UPAA then the error can be isolated with a Monte Carlo run for each individual inventory and transfer This can be accomplished as discussed earlier in this section by setting the ISPNTI input to the appropriate inventory transfer number while at the same time maintaining NRUN at the desired number of runs Subroutine SETMAS calculates some important integers that define the dimensions of the simulation Section V indicates that these integers appear on the output file just before the initial random number seeds These integers are computed from the user supplied input data describing the proces
201. ntories ITIN 3 or 4 or for a transfer as the product of a concentration and a mass change ITIN 8 is the order of the numbers important For pulsed columns the process variable specified by a line of IPVNO data input must define the process variables in the following order 1 feed concentration 2 waste concentration 3 product concentration 4 top organic volume and 5 bottom aqueous volume For transfers calculated from the product of a concentration and the change in weight the IPVNO input must define the process variables in the following order 25 1 concentration 2 full weight and 3 empty weight For all other transfers and inventories the sequence for defining the process variables with the IPVNO input is unimportant As an example if an inventory is calculated from the product of volume and concentration the order for specifying the volume and concen trations process variables in the corresponding IPVNO input data line is optional The ISPNTI input variable defines the specific inventory or transfer to be computed Each inventory or transfer has a number assigned to it by the order in which it is defined by the ITIN input vector For example if performing isolated measurement calculations on a specific inventory is desired and this inven tory appears as the Mth element in the ITIN input then ISPNTI would be set to M including all the inventories and transfers in the UPAA is desired
202. ntries can be appended at the end of the input data to generate another run with the same input data but a dif ferent inventory transfer In this manner all the individual inventory transfers as well as the combined set can be computed with one execution of the code Exceeding the dimensions of an array is one of the most dif ficult diagnostic problems for a programmer If an over extended array destroys part of the code and the program becomes lost during execution the user can spend hours finding the problem and correcting it Most of the important array sizes in the code are established by the FORTRAN PARAMETER statement In most cases the code calculates the required array sizes based on the problem specified by the input data If for any array the required array size is larger than the actual array size an error message is printed and the run is terminated The materials balance in column 3 of the primary output file also serves as a useful check on the correctness of the calcula tions In most cases when all the inventories and transfers are being considered the materials balance should be zero or very close to zero A nonzero materials balance is usually caused by one of the following a process variables in error or read incorrectly from input file b inventory transfer selector ITIN in error on input and process variable number IPVNO on the input file assigns incorrect process variable to an inventory or tra
203. oe We k Ye Ve e de e e a e e e e e e e e t Yc e e e e e e e ce Ya e e e e Pec e e e e Xe e e k k e k k Ye Ye k k k PARAMETER NBALMX 125 NBMXP1 NBALMX 1 NBMXP2 NBALMX 2 1 NBMXP3 NBALMX 3 NTRNMX 515 NTMXP1 NTRNMX 1 NTMXP2 NTRNMX 2 2 NPVMXz12 NPVIMX212 NPVTMX 8 NCIMX s12 NCTMX 8 NMIMX 2 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 27 4 NCOLMX 2 PARAMETER ZP 1 96 DOUBLE PRECISION SUM SUMSQ XNRUN COMMON SAMPLE SUM NBMXP1 SUMSQ NBMXP1 COMMON VARY XI NBMXP2 NCIMX S2I NBMXP1 CVI NBMXP1 T NTMXP1 NCTMX XIMC ONBMXP2 NCIMX NMIMX TM NTMXP1 NCTMX NMTMX SZT ONTRNMX2 CVT NTRNMX CS NBMXP1 S2CS NBMXP1 TTONTRNMX XIT NBMXP1 S2IR NBMXP1 S2IB NBMXP1 S2TRONTRNMX S2TB NTRNMX TTSUM NBMXP1 S2TRSM NBMXP1 S2TBSM NBMXP1 COMMON CON NBAL NBAEP1 NBALP2 NTRPBL NTRN NTRNP1 NTRNP2 NPROUT DT NCAL NCTMX NMTMX 2 NPVIT NPVMXD IBLANK NPVIN NDECIN IPRPV NDAT IRNSCH ITINCNPVMX NCITST NFSEED INTRNC IPVNO 5 NPVMXD NTRIN MASPRT ITIPRP IMESPR ICLAPS ICTRN ICINV NCOL NPVMX HCCC 5 NCOLMX VCCC2 NCOLMX CCC 3 NCOLMX NPV NCI NCT NMI NMT NSI NST NC MXP NNSTRM NCOLUM NCFRC ICFR 4 NPVCTCNPVMXD NPVI NPVT NCGF ICGFC A NPVCNT COMMON RUNCOM NRUN IRUN ISPNTI DIMENSION IWARN 14 2 DATA IWARN OK 1 RATIO OUTSIDE INTERVAL Q0 IN 68 WRITE NPROUT 12 NRUN 18 1 e E IE HE H
204. onzero in that cycle The remaining negative IPVTRN entries with smaller absolute values specify the number of nonzero values for the corresponding process variable in that cycle For example if 88 IPVTRN 2 12 IPVTRN 5 24 and IPVTRN 7 lt 16 then the number of transfer process variable values per cycle is 24 process variable 5 has all nonzero values process variable 2 has 12 nonzero values and process variable 7 has 16 nonzero values The PVGEN code input data files for Example problems 1 5 are giver in Figs C 2 through C 6 respectively Each data file contains the five input variables in the order shown in Table Similar to the MEASIM code the array sizes are set in the PVGEN code by a FORTRAN PARAMETER statement The current values of the parameters are sufficient to handle the 5 examples in this manual Upon executing the code the user is required to enter the file names for the input data file and the output process variable file This output file then serves as the input process variable file to the MEASIM code TABLE C I INPUTS TO PROCESS VARIABLE CODE PVGEN NPV Number of different process vari ables PVs NINV Number of values for each inventory PV NTRN Number of values for each transfer PV IPVTRN 1 IPVTRN 2 IPVTRN NPV Transfer indicator PV 1 PV 2 sz set PV NPV Process variable values 89 8881 8092 8883 2004 0005 0006 0907 0048 0009
205. orre lated from balance to balance For example the CUSUM at the kth materials balance is the sum of the first k materials balances while the CUSUM at the k l th materials balance is equal to the CUSUM at the kth balance plus the 1 th materials balance Therefore the sample variance s cannot change significantly between the kth and 1 th balance and leads to situations in 2 2 a given Monte Carlo simulation where all the 857 ratios 85 are clustered in one region either inside or outside of the confidence interval for all NBAL CUSUMs To correctly interpret the confidence intervals for this case attention must be focused on a CUSUM calculated from a given number of materials balances for example k balances Let the sample variance be s for this CUSUM A 95 confidence interval indicates that if the Monte Carlo simulation is repeated a large number of times the ratio 52 02 will fall within that interval about 95 of the time other words the confidence intervals must be in terpreted at a fixed number of balances over a sufficiently large number of Monte Carlo runs and not over the balances within any one Monte Carlo simulation Suppose for example with a 95 confidence interval that the s 2 ratio lies outside the confidence interval for all the balance times Because of the strong correlation between the ratios additional sets of Monte Carlo runs should be made before any conclusions are drawn concer
206. pulsed column CUSUM Computes the inventory and transfer variances and covariances the CUSUM and the CUSUM variance DRAND Generates uniform random numbers in the interval 0 1 INVL Computes the measured inventory for a container where the inventory is equal to the measured value INV2 Computes the measured inventory for a container where the inventory is equal to the product of two measured values MASAGE Computes variances and covariances for individual transfer and inventory components Writes output file to DECANAL for the case where no reductions are made in the number of trans fer and inventory components MASCUS Combines the variances and covariances computed by subroutine MASAGE into a form suitable for the CUSUM variance calculation Writes an output file to DECANAL for the case where all the inventories are combined and reduced to one inventory MEASR Computes measured values for individual process vari ables MESDRV Selects the set of desired transfer and inventory measurements for the process and calls subroutine MEASR to compute the measured values Calls subroutine PROCES which in turn calls the individual transfer and inventory routines MESIN Reads and echo prints all input data Calculates components of the variances and covari ances as a function of the measurement type OUTDEC Writes output file to DECANAL for the case where both the transfers and inventories are r
207. r defining unit process accounting area NPV NTRIN ITIN 1 ITIN 2 ITIN NTRIN IPVNO 1 1 IPVNO 2 1 IPVNO 5 1 IPVNO 1 2 IPVNO 2 2 IPVNO 5 2 IPVNO 1 NTRIN IPVNO 2 NTRIN IPVNO 5 NTRIN ISPNTI 1 Identifier for first process variable SIGMAE 1 SIGMAN 1 1 SIGMAN 1 2 MESTYP 1 INTCAL 1 1 INTCAL 1 2 2 Identifier for second process variable SIGMAE 2 SIGMAN 2 1 SIGMAN 2 2 MESTYP 2 INTCAL 2 1 INTCAL 2 2 NPV Identifier for NPVth process variable SIGMAE NPV SIGMAN NPV 1 SIGMAN NPV 2 MESTYP NPV INTCAL NPV 1 INT CAL NPV 2 Column Data one line per column This data including these four comment lines are not present when no columns are modeled HCC I 1 121 5 VCC I 1 1 1 2 CCC I 1 I 1 3 HCC 1 2 1 1 5 VCC I 2 1 1 2 CCC 1 2 1 1 3 HCC I NCOLUM I 1 5 VCC I NCOLUM I 1 2 CCC I NCOLUM I 1 3 ISPNTI ISPNTI This last set of ISPNTI inputs indicates to the code ress that the run is to be repeated for specific inventory transfer numbers ISPNTI TABLE VI EXPLANATION OF INPUT VARIABLES AND DEFAULT VALUES Default Variable Description Value IZE All measurement errors are set to zero 0 when IZE 1 IRNSCH Random number seeds change between 0 simulations when IRNSCH 1 NRUN Number of runs If NRUN gt 1 a Monte Carlo 1 simulation is assumed NBAL Number of materials balances to be computed 1 NTRPBL Number of transfers per materials bala
208. relations between the input transfer and inventory and also because of the slightly different approach that must be taken to model the ADU CAKE output INPUT DATA FILE MESDT9 PV ARRAY FILE PVARA9 QUTPUT DECANAL FILE DECINN TUE OCT 28 1981 01 87 35 TITLE FROM PROCESS VARIABLE FILE EX 4 INPUT TRANSFER AS THE PRODUCT OF CONCENTRATION AND WEIGHT DIFFERENCE ZERO ERROR FLAG 11 GIVES ZERO ERROR CASE 1ZE 1 FLAG FOR CHANGING RANDOM NUMBER SEEDS IRNSCH NUMBER OF RUNS NRUN 184 NUMBER OF BALANCES NBAL 58 NUMBER OF TRANSFERS PER BALANCE NTRPBL 2 TIME INTERVAL DT 8 898 MASSAGE DEBUGG PRINT FLAG MASPRT Y TRANSFER INVENTORY AND PROCESS VARIABLE NO PRINT FLAG 1TIPRP gt PRINTOUT FLAG FOR INPUT MEASUREMENT ERRORS IMESPR g PRINTOUT FLAG FOR INPUT PROCESS VARIABLES PVPRT g ICLAPS COLLAPSE MATRIX OUTPUT TO SCALARS WHEN Dis 2 AMARA RRA A RARA NA NAR AAA ARRA MARA ARA RARA NARA RAR RARA INPUT FOR DEFINING UNIT PROCESS ACCOUNTING AREA UPAA NUMBER OF PROCESS VARIABLES NPV 5 NUMBER OF TRANSFER INVENTORIES NTRIN w 2 ARRAY OF TRANSFER INVENTORY NUMBERS ITIN ARRAY OF PROCESS VARIABLE NUMBERS ASSOCIATED WITH EACH TRANSFER OR INVENTORY TRANSFER INVENTORY PROCESS VARIABLE NUMBER NUMBER 1 21 4 5 1 1 2 3 g D H 5 D D SPECIFIC TRANSFER INVENTORY NUMBER ISPNTI g MAYATAARRRANRASETATARSETRAASETSESARNATATRRARTERAT SRERREARRRE BE
209. s All the inventories and transfers required to model a given UPAA are combined to form an inventory transfer set The number TABLE III INVENTORY AND TRANSFER SUMMARY Inventory measured directly Inventory product of volume and concentration Inventory type A pulsed column Inventory type B pulsed column Transfer measured directly Transfer product of volume and concentration Transfer product of flow rate and concentration 0 0 Q Transfer product of concentration and a change in mass 13 of inventories and transfers in the set and the specific inventory and transfer types are defined with input data D Components and Measurements Inventories transfers are constructed from components and measurements Each inventory and transfer can be formed from the sum of one or more ccmponents A component can be defined as the smallest entry into which an inventory or transfer can be divided and still retain the dimensions of an inventory or trans fer As an example if a transfer is computed from the product of volume aad concentration then this product is a transfer com ponent Inventory and transfer components are functions of the measured values of the process variables In this code measure ments are defined as the measured value of a process variable multiplied by a suitable constant The product of flow rate and a time interval is an example of a measurement In this example of
210. s They should be consistent with the UPAA being modeled VII EXAMPLES The five examples in this section demonstrate most capabil ities of the MEASIM code Each example includes a discussion of the process the input data and the corresponding output 11 outputs are for the zero error case wherein the variances and covariances are calculated from input measurement errors but the measured process values are set equal to the input process vari ables Because the process variables are free of process varia tions a potential user can easily check his or her version of the code regardless of the computer on which it is implemented Introducing errors would make duplicating the results on another computing machine almost impossible because of the machine depend ency of the random number generators For all the examples 37 volumes will be in liters L concentrations in kilograms per liter kg L flow rates in liters per hour L h and masses in kilograms kg A Example l The process block diagram which is the same process used for the first example of Ref 1 is shown in Fig 4 All the input and output transfers to the two tanks are batched with all transfers taking place simultaneously at 0 5 intervals UPAA is drawn around the entire process The input transfer and both tank inventories are computed from the product of volume and concentration The waste and product outputs are assumed to be measured directly
211. s variables are used twice The 2A column feed concentration is used to calculate both the input transfer and the 2 column inven tory Similarly the 2B column product concentration is used to 49 COLUMN Fig 11 Process block diagram Example 3 2B COLUMN Tour TABLE X PROCESS VARIABLES FOR EXAMPLE 3 Nominal No Variable Value 1 Flow rate 2A feed L h 106 0 2 Concentration 2A feed kg L 0 0542 3 Concentration 2A waste kg L 0 00004 4 Concentration 2A product kg L 0 0488 5 Top organic volume 2A L 97 0 6 Bottom aqueous volume 2A L 190 0 7 Concentration 2B waste kg L 0 0006 8 Top organic volume 2B L 81 5 9 Bottom aqueous volume 2B L 133 0 10 Flow rate 2B product L h 160 0 11 Concentration 2B product kg L 0 0359 50 calculate both the 2B column inventory and the output transfer The product concentration for the 2A column is identical to the feed concentration for the 2B column Therefore this process variable is used in inventory calculations for both columns In those cases where a process variable is used for both transfer and inventory calculations the process variable should be con sidered as a transfer in the process variable file to assure suf ficient transfer values to perform the materials balance calcula tions The number of transfer values per set must always be equal to or greater than the number of inventory values per set The flow rates and concentrations associated with the
212. s are being correctly modeled The purpose of this appendix is to derive the confidence intervals that form the basis for comparing the propagated and sample standard deviations Most of the theory for this development is taken from Ref 4 Let X x denote the values of the CUSUM at 1 some fixed materials balance for n different runs The sample mean X is defined B 1 n where X indicates summation over i from 1 to n and the sample variance s unbiased estimate is e S E X X B 2 Because the CUSUM or X consists of the sum of random vari ables it is reasonable to conclude from the Central Limit Theorem that xi is a normally distributed random variable 82 For normally distributed Xi and with oi the true variance of the entire Xi population it follows from Ref 4 that the random variable n 1 82 02 is chi squared distributed with n 1 degrees of freedom The true variance c is equal to the propa propagated or analytic variance calculated by the MEASIM code For a 95 confidence interval it follows from Ref 4 that lt 2 2 1 5 2 X2 5 5 2 3 lt x E 97 5 where SE is the pth EE value for the chi squared distribu tion For example X97 5 defines a point along the horizontal axis such that 97 5 of the area under the chi squared density curve lies to the left of that point The percentile values for the chi squared distribution are re
213. s very important in attaining the high level of process independence for the MEASIM code A S Goldman provided some valuable insight for the chi squared confidence interval tests J Roybal and M L Bonner prepared the figures and K C Eccleston and S L Hurdle typed the manuscript 76 APPENDIX INVENTORY CORRELATED ERRORS AND THE CUSUM VARIANCE As indicated in Sec III E calculation of the CUSUM variance is a very important tool for program debugging The definition for the variance calculation is given in Eq 6 For large UPAAs with many correlated errors this calculation can become very complex To simplify these calculations the MEASIM code neglects correlation between two different inventories and between most inventories and transfers The purpose of this appendix is to provide some justification for these simplifications The UPAA shown in Fig 1 with two transfers and two inven tories will be adequate for this development From Eq 2 it follows that the CUSUM for this system over the time interval O t with N input and output transfers taking place during this time will be CUSUM I 0 I5 o I t I t Eau 1 where 2 indicates a summation from i 1 to N For this development it will be assumed that 1 measurement errors behave according to a multipiicative error model 2 uncorrelated errors are zero 3 only one correlated error is present in each measure ment and 4
214. sS2TCIT CVTSCI 9J K L CONTINUE S2TB IT S2TCIT VTTR Wwwwwwwwwwaxww COVARIANCE BETWEEN SUCCESSIVE TRANSFERS 88 DO 88 I 1 NCT DO 88 11 1 NCT DO 88 J 1 NMT DO 88 Kx 1 NST CVT 1T CVTCIT XCVSTS 1 11 3 K CONTINUE OUTPUT TO DECANAL FOR THE CASE OF COLLAPSED INVENTORY wxwwkww kxx AND NON COLLAPSED TRANSFERS 98 188 IFCICLAPS NE 1 GO TO 138 IFCIII EQ 12WRITECNDECIN 112 XITCIB 118 TM IB I J J 1 NMT I 1 NCT WRITE NDECIN 128 IT IFCIB NE 1 GO TO 138 IFCIII NE 1 GO TO 138 SRI SQRT S2IR 1 XIT I SSI SQRT S2IB 1 XIT 1 DO 98 I 1 NCT DO 98 J 1 NMT SRT CI J SSQORT CVTRCI J DO 98 K 1 NST SST I J K SQRT VTS I J K CONTINUE WRITECXNDECIN 1128 SRI WRITE NDECIN 112 CCSRTCI O00 J71 NMT I 1 WRITECNDECIN 118 SSI WRITE NDECIN 118 SST 1 9 K K 1 NST 3 1 NMT 1 1 NCT ICI 1 1 1 1 ISCIC1 1 1 00 188 I 1 NCT ITCICI I 1 28 CONTINUE Fig D 1 cont 115 1297 1298 1299 1399 1381 1322 WEIER 1384 1385 1326 1327 1388 1332 116 0 128 ICI WRITECNDECIN 128 CCT 120 ITC 128 ISC WRITE GNDECIN 126 TS 110 8615 128 FORMAT 20140 138 CONTINUE RETURN END 1 1 1 CICI I1 22 9
215. ter the UP enters the UPAA from cylinders the amount of uranium transferred is calculated from the product of the UFG concentration and the difference between the full and empty weight of the cylinder that is Tin C W We where TIN input U kg input U concentration kg kg W initial cylinder weight kg and We final cylinder weight kg Because initial and final cylinder weights are measured on the same instrument these measurements are correlated and are shown to have the same correlated error The batch output transfer is determined from the product of the volume and uranium concentra tion in the storage tank No inventory measurements are made in this UPAA The cylinder weight measurement errors are additive while all the other measurement errors are multi plicative These batch input and output transfers take place at a frequency of two per day with the materials balance calculations performed once per day The process variables for this example along with their nominal values are given in Table XI The input data are given in Fig 15 Setting the number of runs NRUN equal to 100 in line 11 of the input data selects the Monte Carlo option with 100 samples The number of transfers per balance period NTRPBL is set to 2 at line 13 8 for the first entry in line 27 for the inventory transfer number selects the input transfer Process variables corresponding to this input transfer are defin
216. ters in the PARAMETER statement are used primarily for setting the dimensions of the arrays The only other places in the code where the parameters are used are in some 1 indices at the beginning of subroutine SETMAS and in the calling arguments to subroutines WRTB WRTC WRTR WRTS WRT3 and WRT4 that occur in subroutines MASAGE and SETMAS Hence if the PARAMETER statement cannot be used it is only necessary to replace the PARAMETERs with numerical values in 1 statements that define the array sizes 2 DO loop indices at the beginning of subroutine SETMAS and 3 calling arguments of subroutines WRTB WRTC WRTR WRTS WRT3 and WRT4 in the subroutines MASAGE and SETMAS This limited use of the PARAMETERs makes adapting the MEASIM code to computer installations not supporting the PARAMETER statement eacy The PARAMETER statement in the current version of the code is PARAMETER NBALMX 105 NBMXP1 NBALMX 1 NBALMX 3 NTRNMX 515 NBMXP2 NBALMX 2 NBMXP3 NTRNMX 1 NTMXP2 NTRNMX 2 NPVMX 12 NTMXPl NPVIMX 10 NPVTMX 8 NCIMX 10 NCTMX 8 NMIMX 2 NMTMX 2 NSIMX 2 NSTMX 2 NCMX 2 MXPMX 2 NSTRMX 20 NCOLMX 2 These PARAMETER values are sufficiently large to support all the exar le problems appearing in this manual The variables appear ing in the PARAMETER statement are summarized in Table I D Units The set of units in which the MEASIM code computes is deter min
217. then ISPNTI should be set to O Each NPV process variable requires a set of measurement error data that include the standard deviation for uncorrelated and correlated errors measurement type and recalibration intervals The measurement data for each process variable must appear in the same order that the process variables are numbered This number ing is established from the process variable sequencing on the input process variable file B Input Process Variable Array Except for the first title line the process variable file is an unformatted or binary file The contents of this file as written by the process model code is given in Table VII TITLE can have a maximum of 80 characters In normal operation TITLE will be read in on the input data file for the process model code and then written to the process variable file for input to the MEASIM code The remaining entries on the process variable file are unformatted and are as follows 26 N number of different process variables on the file IPVTRN I transfer indicator flag for the Ith process vari able O inventory process variable 1 transfer process variable NPVC I number of entries for the Ith process variable PV I J Ith entry for Jth process variable The number of different process variables transmitted to MEASIM can be larger than the number of process variables required for the UPAA materials balance As an example the process model code could
218. ting n 1 for df in Eqs B 6 and B 7 sub stituting the resulting x expressions into Eq B 3 and dividing by n 1 gives 1 96 2 n 1 SCALES 27 110 40838 2 n 1 c 17 84 TABLE B I COMPARISON OF APPROXIMATE CHI SQUARED PERCENTILES WITH EXACT TABULAR VALUES Degrees of 2 5 5 Freedom nU Table Eq B 6 Table Eq B 7 30 16 8 16 4 47 1 46 5 100 74 2 73 8 130 0 129 1 500 440 0 439 5 565 0 563 4 4 000 914 0 913 8 1090 0 1089 1 Inequality B 8 forms the basis for computing 95 confidence limits on the S Jo ratio Recall that s is the unbiased sample CUSUM variance computed from n samples while is the responding propagated variance The MEASIM code performs measurement modeling for a given UPAA for a number of materials balances as specified by the NBAL input integer A CUSUM is calculated at the end of each mate rials balance along with the 52 02 ratio Thus NBAL mate rials balances for a given UPAA will yield an equal number of 52 02 ratios Suppose for example that there are 100 balances NBAL 100 It might be easy to conclude that with 95 con fidence interval that about 58 of tne 52 52 ratios for given Monte Carlo simulation of n runs will 11 outside the boundary However this is an incorrect interpretation of the confidence intervals in this particular application The diffi culty here is that the sample variances S are strongly c
219. to 24 batches day This means that 12 zero transfers per day be in cluded with the input transfer and 14 zero transfers per day with the filtrate storage output transfer The input file for this example is given in Fig 18 Monte Carlo simulation with 100 runs NRUN 100 and 20 materials bal ances NBAL 20 is selected et lines 11 and 12 The number of transfers per balance period NTRPBL is set at 24 in line 13 At line 27 for the inventory transfer numbers the input transfer corresponds to the first two entries 6 and 5 a result of the method used to model the input transfer as discussed above Correspondingly at lines 31 and 32 the precipitation feed holdup process variable No 3 is selected as the process variable for two different inventory transfers The holdup is used as a trans fer at line 31 and as an inventory at line 32 At line 56 the actual uncorrelated error for the ADU cake output concentration appears as the short term correlated error with recalibration every 24 batches and the actual short term correlated error appears as the long term correlated error so modeling the trans fer within the framework of the MEASIM code becomes possible The output file for this example is given in Fig 19 For the IMPORTANT INTEGERS CALCULATED IN SUBROUTINE SETMAS the number of process variables used NPVCNT is 11 even though there are only 10 process variables The code has no way of knowing that one process variabl
220. ut The remainder of the output on the first page of Fig 3 consists mainly of the echo check of the input Part of the information from the process variable file is printed after the statement BEGIN READING IN PROCESS VARIABLE ARRAY The IPVTRN vector indicates whether a process variable is associated with an inventory or a transfer 1 indicates transfer and a O indicates inventory The number of values read in for each process variable also is printed in this region of the output file 32 complete echo check of the measurement error information follows the process variable information Also included here is the initial value for each process variable as read from the process variable file The six numbers follow ng the initial value are SIGMAE standard deviation for uncorrelated error SIGMAN 1 standard deviation for short term correlated error SIGMAN 2 standard deviation for long term correlated error MESTYP measurement error model type 1 multiplicative 2 additive 3 mixed INTCAL 1 number of transfers between recalibration of short term correlated error and INTCAL 2 number of transfers between recalibration of long term correlated error Subroutine SETMAS uses input information defining the UPAA to compute a set of integers that define the dimensions of the problem These integers appear on the second page of Fig 3 Frequent use is made of these integers in the subsequent calculations
221. ventory calcula tions In this case the process variable should be considered as a transfer on the process variable file The minimum number of entries on the process variable file for each transfer and inventory process variable is a function of the number of required materials balances and the number of trans fers per materials balance interval With the number of materials balances given by NBAL and the number of transfers per materials balance interval by NTRPBL the minimum number of entries for each inventory and transfer process variable are given by NMININ NBAL 2 and 8 NMINTR NBAL 1 NTRPBL 3 9 where NMININ minimum number of entries for each inventory process variable and NMINTR minimum number of entries for each transfer process variable The number of entries can be larger than but not smaller than the above values If the numbers of transfer or inventory entries are less than the required minimum the code prints an error message and the run is terminated 28 Input Random Number Seeds The random number seeds that serve as starters for the uni form random number generator DRAND are input to the code on a separate file Each nonzero measurement error uncorrelated or correlated requires a separate random number seed The actual number of random number seeds required for a given simulation is NNSTRM with NNSTRM computed by the code in subroutine SETMAS As a consequence the input rando
Download Pdf Manuals
Related Search
Related Contents
ALINEADOR DE DIRECCIONES PARA FtwwIw†„ÁBS - millplus.de catalog Epson EB-1771W manual de instrução Samsung 15'' 9. seeria sülearvutid NP900X4D User Manual (Windows 8) Safety, Operation and Maintenance Manual Manual de Copyright © All rights reserved.
Failed to retrieve file