Listing of file='DECMKR.BAS;01' on disk='vmedia/chip_75-sector.ccvf'
10 REM ED DONN 2/28/79 12 CLEAR 2000 15 DIM D$(10),L$(4,16),T$(30) 20 PLOT 12 22 PRINT TAB( 22);"*** DECISION MAKER ***" 24 PRINT " " 28 PRINT "ANALYSIS STUDIES ONE DIMENSIONAL ALTERNATIVES OR CRITERIA" 30 PRINT 32 PRINT "SELECTION CHOOSES AMOUNG MULTIPLE ALTERNATIVES AND CRITERIA" 34 PRINT 36 PRINT "LISTER LISTS ALTERNATIVES AND ORDERS ATRIBUTES":PRINT 60 PRINT "TYPE 1 FOR ANALYSIS" 62 PRINT " 2 SELECTION" 64 PRINT " 3 LISTER" 65 PRINT " 4 INSTRUCTIONS" 66 INPUT Z 70 ON ZGOTO 77,1000,2000,3000 77 PLOT 12,3,28,1:PRINT "ANALYSIS" 80 PRINT :PRINT " ENTER UP TO 10 ALTERNATIVES:" 84 GOSUB 3100 90 FOR I= 1TO 10:C(I)= 0:NEXT 100 PRINT :PRINT " WHAT DECISION IS REQUIRED?" 110 INPUT D$ 200 PRINT :PRINT " LIST IMPORTANT CRITERIA:":PRINT 205 FOR I= 1TO 10 210 PRINT TAB( 5);:INPUT C$(I) 220 IF C$(I)= "*"THEN 240 225 IF C$(I)= "ERROR"THEN I= I- 1:GOTO 210 230 NEXT I 240 N= I- 1 300 PLOT 12 310 PRINT :PRINT "SELECT THE MOST IMPORTANT WITH RESPECT TO" 320 PRINT "";D$;":" 330 FOR I= 1TO N- 1 340 FOR J= I+ 1TO N 350 PLOT 3,7,6,11:PRINT "1 ";C$(I) 360 PLOT 3,7,8,11:PRINT "0 ";C$(J);"" 370 PLOT 3,32,2:INPUT B 380 IF B< > 1AND B< > 0THEN 370 390 C(I)= C(I)+ B:C(J)= C(J)+ 1- B 400 NEXT J 410 NEXT I 420 PLOT 12,3,5,3:PRINT "";D$;"" 430 PLOT 3,0,5 440 FOR I= 1TO N 450 C(I)= INT (100* C(I)/ ((N^ 2- N)/ 2)+ .5) 460 NEXT I 470 GOSUB 1600:REM SORT 480 FOR I= 1TO N:X= T2(I) 490 PRINT "";C(X);"",C$(X) 500 NEXT I 510 PLOT 3,0,20:INPUT Z 520 PRINT "TYPE 1 FOR REPEAT" 530 PRINT " 2 HARDCOPY" 540 PRINT " 3 ANALYSIS" 550 PRINT " 4 SELECTION" 560 PRINT " 5 LISTER" 570 PRINT " 6 INSTRUCTION" 580 INPUT Z 590 ON ZGOTO 600,700,77,1232,2000,3000 600 FOR I= 1TO N:C(I)= 0:NEXT :GOTO 300 1000 PLOT 12:PRINT TAB( 25);"SELECTION" 1005 PRINT :PRINT "SELECTION CHOOSES AMOUNG MULTIPLE ALTERNATIVES AND CRITERIA." 1010 PRINT "THE RANKING IS FROM 0 (BAD) TO 10 (GOOD)." 1015 PRINT :GOSUB 3100 1020 PRINT :PRINT "WHAT DECISION IS REQUIRED" 1030 INPUT D$:PRINT 1040 REM 1050 PLOT 12,3,5,3 1070 PRINT "LIST CRITERIA FOR DECISION ";D$;":":PRINT 1080 FOR I= 1TO 10 1090 PLOT 3,10,10+ I:INPUT C$(I) 1100 IF C$(I)= "*"THEN 1130 1110 IF C$(I)= "ERROR"THEN I= I- 1:GOTO 1090 1120 NEXT I 1130 N= I- 1 1140 FOR I= 1TO N:T2(I)= I:NEXT 1150 PLOT 12,3,5,5 1160 PRINT "RANK IMPORTANCE WITH RESPECT TO ";D$;":" 1170 FOR I= 1TO N:X= T2(I) 1180 PLOT 3,6,10+ I:PRINT C$(X) 1190 NEXT I 1200 FOR I= 1TO N:X= T2(I) 1210 PLOT 3,0,10+ I:INPUT F$ 1220 IF LEFT$ (F$,1)= "*"THEN I= I- 1:GOTO 1210 1230 C(X)= VAL (LEFT$ (F$,3)) 1240 NEXT I 1250 GOSUB 1600:REM SORT 1260 PLOT 12,3,0,3:REM REPEAT ENTRY 1270 PRINT "LIST ALTERNATIVES FOR ";D$;":":PRINT :PRINT 1280 FOR I= 1TO 10 1290 PRINT TAB( 5);:INPUT D$(I) 1300 IF D$(I)= "*"THEN 1330 1310 IF D$(I)= "ERROR"THEN I= I- 2:GOTO 1290 1320 NEXT I 1330 M= I- 1 1340 FOR I= 1TO N:S(I)= 0:NEXT :T0= 0 1350 FOR J= 1TO M:T(J)= 0:T1(J)= J:NEXT 1360 FOR I= 1TO N 1370 PLOT 12,3,0,5 1380 PRINT "RANK 0 (BAD) TO 10 (GOOD) WITH RESPECT TO" 1390 PRINT TAB( 8);"";C$(I);"" 1400 FOR J= 1TO M 1410 PLOT 3,8,10+ J:PRINT D$(J):NEXT J 1420 FOR J= 1TO M 1430 PLOT 3,4,10+ J:INPUT E$ 1440 D(I,J)= VAL (LEFT$ (E$,3)) 1450 S(I)= S(I)+ D(I,J) 1460 NEXT J:NEXT I 1470 FOR I= 1TO N:FOR J= 1TO M 1480 T(J)= T(J)+ C(I)* D(I,J) 1490 T0= T0+ C(I)* D(I,J) 1500 D(I,J)= INT (10* D(I,J)* C(I)/ S(I)+ .5) 1510 NEXT J:NEXT I 1520 REM T( ) SORT 1530 FOR I= 1TO M:FOR J= 1TO M- I 1540 X= T1(J):Y= T1(J+ 1) 1550 IF T(X)= > T(Y)THEN 1570 1560 T1(J)= T1(J+ 1):T1(J+ 1)= X 1570 NEXT J:NEXT I 1580 GOTO 1700 1600 REM C( ) BUBBLESORT 1610 FOR I= 1TO N:T2(I)= I:NEXT 1620 FOR I= 1TO N 1630 FOR J= 1TO N- I 1640 X= T2(J):Y= T2(J+ 1) 1650 IF C(X)= > C(Y)THEN 1670 1660 T2(J)= T2(J+ 1):T2(J+ 1)= X 1670 NEXT J:NEXT I 1680 REM END 1690 RETURN 1700 PLOT 12,3,32- LEN (D$)/ 2,0:PRINT "";D$;"" 1710 LF= (50- 4* M)/ 2 1720 DN= (26- M- N)/ 2 1730 FOR J= 1TO M 1740 PLOT 29,20,2,2* (LF+ 4* (J- 1))+ 1,127- 4* (DN+ M+ 1) 1750 PLOT 242,2* (LF+ 4* (J- 1))+ 1,127- 4* (DN+ J) 1760 PLOT 255,29,23 1765 PLOT 3,LF+ 4* (J- 1),DN+ J- 1 1770 PRINT D$(J):NEXT J 1780 PLOT 3,0,DN+ M+ 1 1790 FOR I= 1TO N:X= T2(I) 1800 FOR J= 1TO M:Y= T1(J) 1810 PRINT TAB( LF+ 4* (J- 1)- 1);"";D(X,Y); 1820 NEXT J 1830 PRINT TAB( LF+ 4* M);"";C$(X) 1840 NEXT I 1845 PRINT "" 1850 FOR J= 1TO M:Y= T1(J) 1860 PRINT TAB( LF+ 4* (J- 1)- 1);INT (100* T(Y)/ T0+ .5); 1870 NEXT J 1880 PRINT TAB( LF+ 4* M);"TOTAL":PRINT 1890 INPUT Z 1900 PRINT "TYPE 1 FOR REPEAT" 1910 PRINT " 2 ANALYSIS" 1920 PRINT " 3 SELECTION" 1930 INPUT Z 1940 ON ZGOTO 1950,77,1000 1950 INPUT "DECISION REQUIRED";D$ 1960 GOTO 1260 2000 REM LISTER 2010 PLOT 12 2020 PRINT TAB( 20);"LISTER" 2022 PRINT " ENTER UP TO 4 ALTERNATIVES WITH UP TO 20 ATRIBUTES":PRINT 2026 GOSUB 3100 2030 FOR I= 1TO 4 2040 PRINT :PRINT "ENTER ALTERNATIVE";I:INPUT D$(I) 2050 IF D$(I)= "*"THEN N1= I- 1:GOTO 2070 2055 GOSUB 2500 2060 NEXT I 2070 PLOT 12 2090 FOR I= 1TO 4 2100 X= 0:Y= 0:J= 0 2110 IF I= 2OR I= 4THEN X= 31 2120 IF I= 3OR I= 4THEN Y= 15 2125 IF D$(I)= "*"THEN D$(I)= "" 2130 PLOT 3,X,Y:PRINT "";D$(I);"" 2140 FOR J= 1TO 10 2150 PLOT 3,X,Y+ J 2160 PRINT L$(I,J) 2170 NEXT J 2180 NEXT I 2190 INPUT Z$:GOTO 60 2500 REM LISTSORT 2505 PLOT 12,27,24 2510 PRINT "LIST UP TO 30 ATTRIBUTES OF ";D$(I);"" 2515 PLOT 29,20,2,80,0,242,80,118,255,29,18 2520 GOSUB 3100 2525 LO= 1 2530 FOR J= LOTO 30 2540 PRINT J;"",:INPUT T$(J):PRINT ""; 2550 IF T$(J)= "*"THEN 2580 2560 IF T$(J)= "ERROR"THEN J= J- 1:GOTO 2540 2565 IF LEN (T$(J))> 31THEN 2540 2570 NEXT J 2580 NL= J- 1:L$(I,1)= "" 2590 PLOT 8,11,8:PRINT "SELECT UP TO 15 MOST IMPORTANT" 2600 FOR J= 1TO 15 2610 IF J> NLTHEN 2670 2620 PLOT 3,35,0:INPUT Z$ 2630 IF Z$= "*"THEN 2670 2640 IF Z$= "ERROR"THEN 2600 2650 Z= VAL (Z$) 2655 L$(I,J)= T$(Z):T$(Z)= "" 2660 PLOT 3,0,Z+ 1,11:REM ERASE LINE 2665 NEXT J 2670 HI= J 2680 PLOT 8,11,8:INPUT "REPEAT 1/0 ";Z 2690 IF Z= 0THEN RETURN 2700 PLOT 12,27,24 2710 PRINT "LIST UP TO 30 ATTRIBUTES OF ";D$(I);"" 2720 GOSUB 3100 2730 FOR J= 1TO HI- 1 2740 T$(J)= L$(I,J):L$(I,J)= "":PRINT J,T$(J) 2750 NEXT 2760 LO= HI:GOTO 2530 3000 REM INSTRUCTIONS 3010 PLOT 12,3,22,0 3020 PRINT "*** DECISION MAKER ***" 3022 PRINT :PRINT " USE THE PROGRAMS TO EXPLORE:" 3024 PRINT :PRINT " A) THE REAL PROBLEM 3026 PRINT " B) THE DECISION REQUIRED 3028 PRINT " C) CRITERIA FOR A SOLUTION 3030 PRINT " D) ALTERNATE SOLUTIONS 3032 PRINT :PRINT " MAKE LISTS IN ALL FOUR AREAS USING LISTER" 3034 PRINT "AND ANALYSIS." 3036 PRINT :PRINT " THEN USE SELECTION TO WEIGH ALTERNAIVE" 3038 PRINT "SOLUTIONS AGAINST CRITERIA." 3040 PRINT :PRINT " FOR EXAMPLE: TO DECIDE ON A VACATION," 3042 PRINT "USE ANALYSIS ON THE CRITERIA; ADVENTURE," 3044 PRINT "TIME AND COST. THEN USE SELECTION ON: 3046 PRINT "ASPEN, HAWAII, AND NEPAL." 3048 PRINT :PRINT 3080 GOTO 60 3100 PRINT "TYPE * TO END, ERROR TO EDIT.":RETURN