mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2024-12-04 11:49:51 +00:00
406 lines
15 KiB
Plaintext
406 lines
15 KiB
Plaintext
|
10 HOME
|
||
|
20 PRINT SPC( 8)"APPLE NUCLEAR POWER PLANT"
|
||
|
30 PRINT SPC( 9)"BY STEPHEN R. BERGGREN"
|
||
|
40 PRINT
|
||
|
50 PRINT "THIS PROGRAM SIMULATES THE OPERATION OF"
|
||
|
60 PRINT "A NUCLEAR POWER REACTOR. THE OBJECT"
|
||
|
70 PRINT "IS TO OPERATE THE PLANT AT A MAXIMUM"
|
||
|
80 PRINT "AVERAGE POWER OUTPUT WITHOUT CAUSING"
|
||
|
90 PRINT "A REACTOR MELTDOWN."
|
||
|
100 PRINT
|
||
|
110 PRINT "THE CONTROL RODS ADJUST THE AMOUNT OF"
|
||
|
120 PRINT "HEAT PRODUCED BY THE REACTOR. PRIMARY"
|
||
|
130 PRINT "COOLANT TRANSFERS THIS HEAT TO THE HEAT"
|
||
|
140 PRINT "EXCHANGER. SECONDARY COOLANT TRANSFERS"
|
||
|
150 PRINT "HEAT FROM THE HEAT EXCHANGER TO THE"
|
||
|
160 PRINT "TURBINE, WHERE POWER IS PRODUCED, AND"
|
||
|
170 PRINT "FINALLY TO THE COOLING TOWER. THE"
|
||
|
180 PRINT "EMERGENCY COOLANT IS USED TO HELP SHUT"
|
||
|
190 PRINT "DOWN THE REACTOR WHEN OTHER SYSTEMS"
|
||
|
200 PRINT "FAIL. UNLIKE THE OTHER COOLANTS, "
|
||
|
210 PRINT "EMERGENCY COOLANT IS NOT RECYCLED."
|
||
|
|
||
|
220 PRINT : INPUT "ENTER 'D' TO SEE REACTOR DIAGRAM ENTER 'I' FOR WORKING INSTRUCTIONS ENTER 'S' TO START OPERATION ";A$
|
||
|
221 IF A$ = "D" THEN GOSUB 6000: GOTO 220
|
||
|
222 IF A$ = "S" THEN 390
|
||
|
|
||
|
225 TEXT : HOME
|
||
|
230 PRINT "THE CONTROLS ARE OPERATED BY TYPING IN"
|
||
|
235 PRINT "THE DESIRED CONTROL ROD SETTINGS AND"
|
||
|
240 PRINT "FLOW RATES.(USE VALUES FROM 0 TO 100)"
|
||
|
245 PRINT "IF NO ENTRY IS MADE, THE VALUES WILL"
|
||
|
250 PRINT "NOT CHANGE. USE THE SPACE BAR TO STEP"
|
||
|
255 PRINT "TO THE DIFFERENT FUNCTIONS. WHEN THE"
|
||
|
260 PRINT "DESIRED ENTRIES HAVE BEEN MADE, USE THE"
|
||
|
265 PRINT "'RETURN' KEY TO ADVANCE TO THE NEXT DAY."
|
||
|
270 PRINT "THE REACTOR CAN BE OPERATED UNTIL A"
|
||
|
275 PRINT "MELTDOWN OCCURS OR THE REACTOR FUEL IS"
|
||
|
280 PRINT "EXHAUSTED. THE FUEL WILL LAST FOR"
|
||
|
285 PRINT "ABOUT 100 TO 150 DAYS. WHEN THE FUEL"
|
||
|
290 PRINT "IS EXHAUSTED, YOUR PERFORMANCE WILL BE"
|
||
|
295 PRINT "EVALUATED.
|
||
|
298 PRINT : INPUT " (PRESS RETURN TO CONTINUE)";A$: HOME
|
||
|
|
||
|
300 PRINT : PRINT "IF YOU WANT TO REPAIR DAMAGE OR REPLACE"
|
||
|
305 PRINT "COOLANT, BRING THE REACTOR TEMPERATURE"
|
||
|
310 PRINT "DOWN BELOW 100 AND SHUT OFF THE COOLANT"
|
||
|
315 PRINT "FLOWS. THIS WILL CAUSE AN AUTOMATIC"
|
||
|
320 PRINT "MAINTENANCE SHUTDOWN AND ALL COOLANT"
|
||
|
325 PRINT "WILL BE REPLENISHED AND REPAIRS MADE."
|
||
|
330 PRINT "THE GREATER THE DAMAGE, THE LONGER THE"
|
||
|
335 PRINT "REPAIRS WILL TAKE."
|
||
|
340 PRINT
|
||
|
350 PRINT " WARNING: THIS POWER PLANT HAS"
|
||
|
360 PRINT " NO AUTOMATIC SAFETY DEVICES!!"
|
||
|
370 PRINT
|
||
|
380 GOTO 220
|
||
|
|
||
|
390 REM INITIATE
|
||
|
400 GOSUB 2000
|
||
|
410 RH = 0
|
||
|
420 RL = 0
|
||
|
430 DAY% = 0
|
||
|
440 TT = 0
|
||
|
450 DMGE% = 0
|
||
|
455 A% = 0:A1% = 0:A2% = 0
|
||
|
|
||
|
460 REM WRITE REPORT
|
||
|
470 TEXT : HOME
|
||
|
475 DAY% = DAY% + 1
|
||
|
480 PRINT SPC( 7)"APPLE NUCLEAR POWER PLANT"
|
||
|
490 PRINT SPC( 8)"STATUS REPORT - DAY ";DAY%
|
||
|
500 PRINT
|
||
|
510 PRINT "WARNINGS:"
|
||
|
520 IF RT% > 800 THEN PRINT " REACTOR OVERHEATED":RD% = RD% + 1 + (RT% > 850) + (RT% > 900) + 2 * (RT% > 950):PD% = PD% + 1:ED% = ED% + 1 + (RT% > 850)
|
||
|
530 IF XT% > 500 THEN PRINT " HEAT EXCHANGER OVERHEATED":XD% = XD% + 1 + (XT% > 600):PD% = PD% + 1:SD% = SD% + 1
|
||
|
540 IF GO% > 2000 THEN PRINT " TURBINE OVERLOADED":TD% = TD% + 1 + (GO% > 2500 ):SD% = SD% + 1
|
||
|
550 IF CT% > 300 THEN PRINT " COOLING TOWER OVERHEATED":SD% = SD% + 1
|
||
|
560 IF GO% < 1000 THEN PRINT " POWER OUTPUT LOW"
|
||
|
570 IF EV% < 200 THEN PRINT " EMERGENCY COOLANT LOW"
|
||
|
580 IF PV% < 100 THEN PRINT " PRIMARY COOLANT LOW":PD% = PD% + 1
|
||
|
590 IF SV% < 100 THEN PRINT " SECONDARY COOLANT LOW":SD% = SD% + 1
|
||
|
600 PRINT
|
||
|
610 PRINT "DAMAGE:"
|
||
|
620 IF RD% > 3 THEN PRINT " REACTOR CORE DAMAGED"
|
||
|
630 IF PD% > 4 THEN PRINT " PRIMARY COOLANT LEAK - ";PD%;"/DAY":PV% = (PV% - PD%) * ((PV% - PD%) > 0)
|
||
|
640 IF SD% > 4 THEN PRINT " SECONDARY COOLANT LEAK - ";SD%;"/DAY":SV% = (SV% - SD%) * ((SV% - SD%) > 0)
|
||
|
650 IF ED% > 2 THEN PRINT " EMERGENCY COOLANT LEAK - ";2 * ED%;"/DAY":EV% = (EV% - 2 * ED%) * ((EV% - 2 * ED%) > 0)
|
||
|
660 IF PB% THEN PRINT " PRIMARY COOLANT PUMP FAILURE -";10 * PD% * (PD% < 10) + 100 * (PD% > = 10);"%"
|
||
|
670 IF SB% THEN PRINT " SECONDARY COOLANT PUMP FAILURE - ";10 * SD% * (SD% < 10) + 100 * (SD% > = 10);"%"
|
||
|
680 IF XB% THEN PRINT " HEAT EXCHANGER FAILURE"
|
||
|
690 IF GB% THEN PRINT " TURBINE FAILURE"
|
||
|
700 PRINT
|
||
|
710 IF RD% > 5 THEN PRINT " MELTDOWN! MELTDOWN! MELTDOWN!":GOTO 3000
|
||
|
720 PRINT "INDICATORS:"
|
||
|
730 PRINT " REACTOR TEMP. (MAX 800) ";RT%
|
||
|
740 PRINT " HEAT EXCHANGER TEMP. (MAX 500) ";XT%
|
||
|
750 PRINT " COOLING TOWER TEMP. (MAX 300) ";CT%
|
||
|
760 PRINT " POWER OUTPUT (MAX 2000KW) ";GO%;"KW"
|
||
|
765 KW% = TT / DAY%
|
||
|
770 PRINT " AVERAGE POWER OUTPUT ";KW%;"KW/DAY"
|
||
|
800 PRINT " CONTROL RODS- ";A%
|
||
|
810 PRINT " COOLANTS"
|
||
|
820 PRINT " EMERGENCY LEVEL- ";EV%;" FLOW- ";EF%
|
||
|
830 PRINT " PRIMARY LEVEL- ";PV%;" FLOW- "PF%
|
||
|
840 PRINT " SECONDARY LEVEL- ";SV%;" FLOW- "SF%;
|
||
|
850 IF (100 - RL) < 5 THEN PRINT : PRINT : PRINT "REACTOR FUEL EXHAUSTED": GOTO 4000
|
||
|
|
||
|
900 REM GET NEW CONTROL VALUES
|
||
|
910 P = PEEK (37)
|
||
|
920 VTAB (P - 3)
|
||
|
930 HTAB (20)
|
||
|
950 A2% = A1%:A1% = A%
|
||
|
955 B$ = "": FOR I = 1 TO 4
|
||
|
960 GET A$:Z = ASC (A$)
|
||
|
965 IF (Z < > 13 AND Z < > 32) AND (Z > 57 OR Z < 48) THEN 960
|
||
|
970 B$ = B$ + A$: IF Z = 13 THEN 1170
|
||
|
975 IF Z = 32 THEN 990
|
||
|
980 A% = VAL (B$):A% = A% + (100 - A%) * (A% > 100)
|
||
|
985 PRINT A$;: NEXT I
|
||
|
990 VTAB (P - 1)
|
||
|
1000 HTAB (35)
|
||
|
1005 B$ = "": FOR I = 1 TO 4
|
||
|
1010 GET A$:Z = ASC (A$)
|
||
|
1015 IF (Z < > 13 AND Z < > 32) AND (Z > 57 OR Z < 48) THEN 1010
|
||
|
1020 B$ = B$ + A$: IF Z = 13 THEN 1170
|
||
|
1025 IF Z = 32 THEN 1050
|
||
|
1030 EF% = VAL (B$):EF% = EF% + (100 - EF%) * (EF% > 100)
|
||
|
1035 IF EF% > EV% THEN EF% = EF%
|
||
|
1040 PRINT A$;: NEXT I
|
||
|
1050 VTAB (P)
|
||
|
1060 HTAB (35)
|
||
|
1065 B$ = "": FOR I = 1 TO 4
|
||
|
1070 GET A$:Z = ASC (A$)
|
||
|
1075 IF (Z < > 13 AND Z < > 32) AND (Z > 57 OR Z < 48) THEN 1070
|
||
|
1080 B$ = B$ + A$: IF Z = 13 THEN 1170
|
||
|
1085 IF Z = 32 THEN 1110
|
||
|
1090 PF% = VAL (B$):PF% = PF% + (100 - PF%) * (PF% > 100)
|
||
|
1100 PRINT A$;: NEXT I
|
||
|
1110 VTAB (P + 1)
|
||
|
1120 HTAB (35)
|
||
|
1125 B$ = "": FOR I = 1 TO 4
|
||
|
1130 GET A$:Z = ASC (A$)
|
||
|
1135 IF (Z < > 13 AND Z < > 32) AND (Z > 57 OR Z < 48) THEN 1130
|
||
|
1140 B$ = B$ + A$: IF Z = 13 THEN 1170
|
||
|
1145 IF Z = 32 THEN 1165
|
||
|
1150 SF% = VAL (B$):SF% = SF% + (100 - SF%) * (SF% > 100)
|
||
|
1160 PRINT A$;: NEXT I
|
||
|
1165 HTAB (1): VTAB (P - 3): CALL - 958: GOTO 800
|
||
|
1170 IF PF% = 0 AND SF% = 0 AND RH < 1 AND RT% < 100 AND A% = 0 THEN GOSUB 2000: HTAB (1): VTAB (24): CALL - 922: PRINT " MAINTENANCE SHUTDOWN - ";MD%;" DAYS": FOR I = 0 TO 5000: NEXT
|
||
|
1180 IF EF% > EV% THEN EF% = EV%
|
||
|
|
||
|
1200 REM DAMAGE ASSESSMENT AND OPERATION CALCULATIONS
|
||
|
1205 EV% = EV% - EF% - 2 * ED% * (ED% > 3)
|
||
|
1210 PD% = PD% + (PF% > 90) * ( RND (20) > .95)
|
||
|
1220 SD% = SD% + (SF% > 90) * ( RND (20) > .92)
|
||
|
1230 PB% = PD% > 5
|
||
|
1240 SB% = SD% > 5
|
||
|
1250 IF PF% > (100 - PD% * 10) AND PB% THEN PF% = (100 - PD% * 10) * (100 - PD% * 10 > 0)
|
||
|
1260 IF SF% > (100 - SD% * 10) AND SB% THEN SF% = (100 - SD% * 10) * (100 - SD% * 10 > 0)
|
||
|
1270 RL = RL + RH / 50
|
||
|
1280 RH = (A% * 30 + A1% * 60 + A2% * 10) / 2500 * (100 - RL)
|
||
|
1300 PH = PF% * (100 * (PV% > 100) + PV% * (PV% < = 100)) / 350
|
||
|
1310 EH = EF% / 200 * (RT% - 25)
|
||
|
1320 RT% = RT% + RH - EH - PH - 5 * (RT% > 25)
|
||
|
1325 RT% = 25 + (RT% - 25) * (RT% > 25)
|
||
|
1330 XT% = ((RT% - 25) * PF% + (CT% - 25) * SF%) / (PF% + SF% + 1) + 25
|
||
|
1340 IF XB% THEN XT% = RT% * .8 + 5
|
||
|
1350 SH = SF% * (100 * (PV% > 100) + PV% * (PV% < = 100)) / 350 * (XT% - CT%)
|
||
|
1360 IF XB% THEN SH = SH * .2
|
||
|
1370 GO% = SH / XT% * (XT% - CT%) * 2 / 3
|
||
|
1375 IF GO% > 2600 THEN GO% = 2600
|
||
|
1380 GO% = GO% * (GO% > 0) * (GB% = 0)
|
||
|
1390 CT% = 25 + ((XT% - 25) * (SH - GO%) / (SH + 1) * .75)
|
||
|
1400 IF XB% < 1 THEN XB% = (XD% > 2) * ( RND (4) > .9)
|
||
|
1410 IF GB% < 1 THEN GB% = (GD% > 4) * ( RND (4) > .9)
|
||
|
1420 TT = TT + GO%
|
||
|
1430 GOTO 470
|
||
|
|
||
|
2000 REM MAINTENANCE REPAIR SUBROUTINE
|
||
|
2010 EV% = 300
|
||
|
2020 PV% = 120
|
||
|
2030 SV% = 120
|
||
|
2040 RT% = 25
|
||
|
2050 XT% = 25
|
||
|
2060 CT% = 25
|
||
|
2070 DMGE% = DMGE% + 2 * RD% + ED% + PD% + XD% + SD% + GD%
|
||
|
2080 MD% = 5 + 3 * (10 * (RD% > 3) + (ED% > 3) + (PD% > 3) + (SD% > 3) + 2 * PB% + 2 * SB% + 3 * XB% + 3 * GB%):DAY% = DAY% + MD%
|
||
|
2090 RD% = 0
|
||
|
2100 ED% = 0
|
||
|
2110 PD% = 0
|
||
|
2120 XD% = 0
|
||
|
2130 SD% = 0
|
||
|
2140 GD% = 0
|
||
|
2150 PB% = 0
|
||
|
2160 SB% = 0
|
||
|
2170 XB% = 0
|
||
|
2180 GB% = 0
|
||
|
2190 EF% = 0:PF% = 0:SF% = 0
|
||
|
2195 GO% = 0
|
||
|
2200 RETURN
|
||
|
|
||
|
3000 REM MELTDOWN ENDING
|
||
|
3010 PRINT
|
||
|
3020 IF RD% > 6 THEN 3100
|
||
|
3030 PRINT "THE REACTOR CORE HAS BEEN DISTROYED BY"
|
||
|
3040 PRINT "UNCONTROLLED THERMAL RUNAWAY. HOWEVER,"
|
||
|
3050 PRINT "THE CONTAINMENT BUILDING HAS NOT YET"
|
||
|
3060 PRINT "RUPTURED.
|
||
|
3070 PRINT
|
||
|
3080 PRINT "INITIATE YOUR EVACUATION PLAN."
|
||
|
3090 GOTO 5000
|
||
|
3100 PRINT "THE REACTOR CORE HAS MELTED DOWN AND"
|
||
|
3110 PRINT "PRODUCED A STEAM EXPLOSION. THE"
|
||
|
3120 PRINT "CONTAINMENT BUILDING HAS RUPTURED."
|
||
|
3130 PRINT "LETHAL RADIOACTIVE GASES AND DEBRIS"
|
||
|
3140 PRINT "HAVE ESCAPED."
|
||
|
3150 PRINT
|
||
|
3160 PRINT "INITIATE YOUR EVACUATION AND RADIATION"
|
||
|
3170 PRINT "CLEANUP PLANS AND GET MEDICAL"
|
||
|
3180 PRINT "ASSISTANCE."
|
||
|
3190 GOTO 5000
|
||
|
|
||
|
4000 REM EVALUATION OF GAME RESULTS
|
||
|
4010 PRINT
|
||
|
4020 PRINT "OVER A PERIOD OF ";DAY%;" DAYS, YOU HAVE"
|
||
|
4030 PRINT "PRODUCED AN AVERAGE POWER OUTPUT OF"
|
||
|
4040 PRINT KW%;" KILOWATTS PER DAY."
|
||
|
4050 AKW% = 1 + (KW% > 1000) + (KW% > 1200) + (KW% > 1500) + (KW > 1800)
|
||
|
4060 PRINT
|
||
|
4070 PRINT "YOUR AVERAGE POWER PRODUCTION RATE IS"
|
||
|
4080 ON AKW% GOTO 4090,4100,4110,4120,4140
|
||
|
4090 PRINT "HORRIBLE! FIND A LESS DEMANDING JOB.": GOTO 4200
|
||
|
4100 PRINT "WAY BELOW YOUR AREA'S POWER NEEDS.": GOTO 4200
|
||
|
4110 PRINT "ADEQUATE. YOU COULD DO BETTER.": GOTO 4200
|
||
|
4120 PRINT "EXCELLENT! POWER COSTS IN YOUR AREA"
|
||
|
4130 PRINT "WILL NOT BE INCREASED.": GOTO 4200
|
||
|
4140 PRINT "NEAR THE MAXIMUM! POWER COSTS IN YQUR"
|
||
|
4150 PRINT "AREA WILL DROP SIGNIFICANTLY."
|
||
|
|
||
|
4200 REM DAMAGE EVALUATION
|
||
|
4210 PRINT
|
||
|
4215 GOSUB 2000
|
||
|
4220 D% = 1 + (DMGE% > 10) + (DMGE% > 20) + (DMGE% > 30)
|
||
|
4230 PRINT "THE EQUIPMENT DAMAGE SUSTAINED DURING"
|
||
|
4240 PRINT "THIS PERIOD WAS ";
|
||
|
4250 ON D% GOTO 4260,4270,4280,4290
|
||
|
4260 PRINT "VERY LIGHT.": GOTO 5000
|
||
|
4270 PRINT "MODERATE.": GOTO 5000
|
||
|
4280 PRINT "HEAVY.": GOTO 5000
|
||
|
4290 PRINT "SEVERE."
|
||
|
|
||
|
5000 REM END
|
||
|
5010 PRINT
|
||
|
5020 PRINT "WOULD YOU LIKE TO TRY AGAIN? (Y OR N)";
|
||
|
5030 INPUT A$
|
||
|
5040 IF A$ = "" THEN 5030
|
||
|
5050 IF A$ = "Y" THEN GOSUB 2000: GOTO 390
|
||
|
5060 HOME
|
||
|
5070 END
|
||
|
5100 B$ = ""
|
||
|
5105 FOR I = 1 TO 4
|
||
|
5110 GET A$
|
||
|
5130 IF ASC (A$) < > 32 THEN 5140
|
||
|
5134 IF B$ = "" THEN RETURN
|
||
|
5136 OUT% = VAL (B$)
|
||
|
5138 RETURN
|
||
|
5140 IF ASC (A$) = 13 THEN POP : GOTO 1170
|
||
|
5150 B$ = B$ + A$
|
||
|
5160 PRINT A$;
|
||
|
5170 NEXT I
|
||
|
5180 RETURN
|
||
|
|
||
|
6000 GR : COLOR= 15: FOR I = 0 TO 39: HLIN 0,39 AT I: NEXT I
|
||
|
6005 DE = 6000
|
||
|
6010 HOME : VTAB 23
|
||
|
6020 PRINT " THIS IS THE REACTOR VESSEL"
|
||
|
6030 RESTORE
|
||
|
6035 COLOR= 1
|
||
|
6040 FOR I = 1 TO 29
|
||
|
6050 READ X1,X2,Y
|
||
|
6060 HLIN X1,X2 AT Y
|
||
|
6070 NEXT I
|
||
|
6080 DATA 7,9,6,15,17,6,6,18,7,5,19,8,5,7,9,17,19,9,5,6,10,18,19,10,5,6,11,18,19,11,5,6,12,18,19,12,5,6,13,18,19,13,5,6,14
|
||
|
6090 DATA 18,19,14,5,6,15,18,19,15,5,6,16,18,19,16,5,6,17,18,19,17,5,6,18,18,19,18,5,7,19,17,19,19,6,18,20,7,17,21,8,16,22
|
||
|
6100 COLOR= 0
|
||
|
6110 HLIN 13,14 AT 6
|
||
|
6120 COLOR= 12
|
||
|
6130 HLIN 14,15 AT 5
|
||
|
6140 HLIN 14,16 AT 4
|
||
|
6150 HLIN 15,16 AT 3
|
||
|
6160 FOR I = 1 TO DE: NEXT I
|
||
|
6170 VTAB 23
|
||
|
6180 PRINT " THIS IS THE REACTOR CORE "
|
||
|
6190 COLOR= 8
|
||
|
6200 FOR I = 9 TO 15
|
||
|
6210 VLIN 11,17 AT I
|
||
|
6220 NEXT I
|
||
|
6230 FOR I = 1 TO DE: NEXT I
|
||
|
6240 VTAB 23
|
||
|
6250 PRINT " THESE ARE THE CONTROL RODS "
|
||
|
6260 COLOR= 13
|
||
|
6270 VLIN 2,17 AT 11
|
||
|
6280 VLIN 2,17 AT 13
|
||
|
6290 FOR I = 1 TO DE: NEXT I
|
||
|
6300 VTAB 23
|
||
|
6310 PRINT " THE EMERGENCY COOLANT CAN COOL THE"
|
||
|
6320 PRINT " REACTOR IN AN EMERGENCY."
|
||
|
6330 COLOR= 2
|
||
|
6340 FOR I = 1 TO 36
|
||
|
6350 READ Y,X
|
||
|
6360 PLOT X,Y
|
||
|
6370 FOR J = 1 TO 200: NEXT J
|
||
|
6380 NEXT I
|
||
|
6390 DATA 4,2,4,4,5,2,5,3,5,4,6,2,6,3,6,4,7,3,8,3,9,3,10,3,11,3,12,3,12,4,12,5,12,6,12,7,12,8,12,9
|
||
|
6400 DATA 13,9,14,9,15,9,16,9,16,8,16,7,16,6,16,5,16,4,16,3,17,3,18,3,19,3,20,3 ,22,3,24,3
|
||
|
6410 FOR I = 1 TO DE: NEXT I
|
||
|
6420 HOME : VTAB 23
|
||
|
6430 PRINT " THE PRIMARY COOLANT CARRIES HEAT FROM"
|
||
|
6440 PRINT " THE REACTOR CORE TO THE HEAT EXCHANGER"
|
||
|
6450 FOR I = 1 TO 52
|
||
|
6460 READ Y,X
|
||
|
6470 PLOT X,Y
|
||
|
6480 FOR J = 1 TO 200: NEXT J
|
||
|
6490 NEXT I
|
||
|
6500 FOR I = 1 TO DE: NEXT I
|
||
|
6510 DATA 4,25,4,27,5,25,5,26,5,27,6,25,6,26,6,27,7,26,8,26,9,26,10,26,11,26,12,26,12,25,12,24,12,23,12,22,12,21,12,20,12,19
|
||
|
6515 DATA 12,18,12,17,12,16,12,15,13,15,14,15,15,15,16,15,16,16,16,17,16,18
|
||
|
6520 DATA 16,19,16,20,16,21,16,22,16,23,16,24,16,25,16,26,16,27,16,28,16,29,16,30,15,30,14,30,13,30,13,30,12,30,12,29,12,28,12,27
|
||
|
6540 HOME : VTAB 23
|
||
|
6550 PRINT " THIS IS THE HEAT EXCHANGER"
|
||
|
6560 COLOR= 5
|
||
|
6570 HLIN 28,34 AT 10
|
||
|
6580 VLIN 10,18 AT 34
|
||
|
6590 HLIN 28,34 AT 18
|
||
|
6600 VLIN 10,18 AT 28
|
||
|
6605 COLOR= 2: PLOT 28,12: PLOT 28,16: COLOR= 5
|
||
|
6610 FOR I = 1 TO DE: NEXT I
|
||
|
6620 VTAB 23
|
||
|
6630 PRINT " THIS IS THE GENERATOR TURBINE"
|
||
|
6640 HLIN 5,18 AT 30
|
||
|
6650 VLIN 30,36 AT 18
|
||
|
6660 HLIN 5,18 AT 36
|
||
|
6670 VLIN 30,36 AT 5
|
||
|
6680 COLOR= 0
|
||
|
6690 HLIN 2,17 AT 33
|
||
|
6700 FOR I = 7 TO 15 STEP 2
|
||
|
6710 PLOT I,34: PLOT I + 1,32
|
||
|
6720 NEXT I
|
||
|
6730 FOR I = 1 TO DE: NEXT I
|
||
|
6740 VTAB 23
|
||
|
6750 PRINT " THIS IS THE COOLING TOWER "
|
||
|
6760 COLOR= 5
|
||
|
6770 VLIN 23,25 AT 24
|
||
|
6780 VLIN 23,25 AT 36
|
||
|
6790 VLIN 25,26 AT 25
|
||
|
6800 VLIN 25,26 AT 35
|
||
|
6810 VLIN 26,28 AT 26
|
||
|
6820 VLIN 26,28 AT 34
|
||
|
6830 VLIN 28,36 AT 27
|
||
|
6840 VLIN 28,36 AT 33
|
||
|
6850 PLOT 34,36
|
||
|
6860 PLOT 26,36
|
||
|
6870 HLIN 25,35 AT 38
|
||
|
6880 FOR I = 1 TO DE: NEXT I
|
||
|
6890 VTAB 23
|
||
|
6900 PRINT " THE SECONDARY COOLANT CARRIES HEAT"
|
||
|
6910 PRINT " FROM THE HEAT EXCHANGER TO THE "
|
||
|
6920 PRINT " TURBINE AND THEN TO THE COOLING TOWER"
|
||
|
6925 COLOR= 2
|
||
|
6930 FOR I = 1 TO 123
|
||
|
6940 READ Y,X
|
||
|
6950 PLOT X,Y
|
||
|
6960 FOR J = 1 TO 200: NEXT J
|
||
|
6970 NEXT I
|
||
|
6980 DATA 4,35,4,37,5,35,5,36,5,37,6,35,6,36,6,37,7,36,8,36,9,36,10,36,11,36,12,36,12,35,12,34,12,33,12,32,13,32,14,32,15,32,16,32
|
||
|
6990 DATA 16,33,16,34,16,35,16,36,17,36,18,36,19,36,20,36,20,35,20,34,20,33,20,32,20,31,20,30,20,29,20,28,20,27,20,26,20,25,20,24,20,23,20,22,20,21
|
||
|
7000 DATA 21,21,22,21,23,21,24,21,25,21,26,21,27,21,27,20,27,19,27,18,27,17,27,16,27,15,27,14,27,13,27,12,27,11,27,10,27,9,27,8,27,7
|
||
|
7010 DATA 28,7,29,7,30,7,31,7,32,7,34,10,32,13,34,16,35,16,35,17,35,18,35,19,35,20,35,21,35,22,35,23,35,24,35,25,35,26,35,27,35,28
|
||
|
7020 DATA 34,28,34,29,34,30,35,30,35,31,35,32,34,32,34,33,34,34,34,35,34,36,34,37,34,38,33,38,32,38,31,38,30,38,29,38,28,38,27,38,26,38,25,38,24,38,23,38
|
||
|
7030 DATA 22,38,21,38,20,38,19,38,18,38,17,38,16,38,15,38,14,38,13,38,12,38,12,37
|
||
|
7040 HOME : VTAB 23
|
||
|
7060 RETURN
|
||
|
|
||
|
9000 REM VARIABLE PREFIXES
|
||
|
9010 REM A-CONTROL RODS, C-COOLING TOWER, E-EMERGENCY COOLANT, G-TURBINE, P-PRIMARY COOLANT, R-REACTOR, S-SECONDARY COOLANT, X-HEAT EXCHANGER
|
||
|
9020 REM VARIABLE SUFFIXES
|
||
|
9030 REM B-BROKEN, D-DAMAGE, F-FLOW RATE, H-HEAT FLOW, L-LIFE, O-OUTPUT, T-TEMPERATURE, V-VOLUME
|
||
|
9040 REM OTHER VARIABLES TOT-TOTAL POWER OUTPUT, KW-AVERAGE POWER OUTPUT, DAY-DAY OF OPERATION, DMGE-TOTAL EQUIPMENT DAMAGE
|
||
|
9050 REM PROGRAM DESCRIPTION BY LINE NUMBER
|
||
|
9060 REM 10-220 INTRODUCTION
|
||
|
9070 REM 225-380 INSTRUCTIONS
|
||
|
9080 REM 390-455 VARIABLE INITIATION
|
||
|
9090 REM 460-850 WRITE REPORT AND ASSESS DAMAGE
|
||
|
9100 REM 900-1165 INPUT NEW CONTROL VARIABLES
|
||
|
9110 REM 1170 MAINTENANCE SHUTDOWN EVALUATION
|
||
|
9120 REM 1200-1260 PUMP FAILURE ASSESSMENT
|
||
|
9130 REM 1270-1430 PLANT OPERATING ALGORITHMS
|
||
|
9140 REM 2000-2200 MAINTENANCE SHUTDOWN SUBROUTINE
|
||
|
9150 REM 3000-3190 MELTDOWN ENDING
|
||
|
9160 REM 4000-4290 EVALUATION OF GAME RESULTS
|
||
|
9170 REM 5000-5070 END
|
||
|
9180 REM 6000-7060 PLANT DIAGRAM SUBROUTINE
|
||
|
9190 REM 9000-9190 REMARKS
|
||
|
|
||
|
9200 REM APPLE NUCLEAR POWER PLANT
|
||
|
9210 REM BY STEPHEN R BERGGREN
|