164
Appendix A. Computer Program Listing and
Instructions
OPTIME statement describe the changes needed to revert the system to
its status before the project was considered.
For example, if we consider the addition or removal of reservoir 8, we
proceed as follows:
1. Go to the appropraite IF statement after the statement LOGICAL
OPTIME, e.g., IF(KX.EQ.8)GO TO 50. Thus we are interested in all
statements between statements 50 and 70.
2. If we want to remove dam 8 from the system, OPTIME = .FALSE. ,
and we consider all the statements between statements 60 and 70.
3. If we want to add dam 8 to the system, OPTIME = .TRUE., and we
consider all the statements between statements 50 and 60.
A.3.2.6. SUBROUTINE KNOKIN(KX)
The number of IF statements immediately after the statement
DO 60L = T,50
will be equal to the total number of possibly new projects (MM — N).
Once again the indices IRA, IRB, .. . , IRZ represent the number of
different projects that may be built at any one site. The number of sets
of these indices will be equal to the number of dam sites (in the example in
Chapter 4 there were 3 dam sites). The statements between statements
40 and 60 will have to be altered to account for the total number of projects
that may be built at any one site. For example,
40
IF(.NOT.OPTIME)GOTO50
GODBAR (IRA,L) = PERBAR (IRA,L)
GODBAR(IRB,L) = PERBAR (IRB,L)
GODBAR (IRE,L) = PERBAR (IRE,L)
GODBAR (IRZ,L) = PERBAR (IRZ,L)
50 GODBAR (IRA,L) =0.
GODBAR (IRB,L) =0.
GODBAR (IRE,L)=0.
GODBAR (IRZ,L)=0.
60 CONTINUE
A.3.3. Data
Input
The data input for the example problem worked out in Chapter 4 are
as follows; a computer listing is provided as well.
Précédent

- 173/282

Suivant