Professional Documents
Culture Documents
( ) ( ) Cell- Width
( ) ( )
And the bed slope is expressed as: Hydrologic simulations involving channel flow is able depict
time varying backwater effects for simulated runoff flows.
( ) ( ) These backwater effects are continuous as they are carried
( )
through all associated channel junctions within the defined
The unit flow rate is approximated within the model for flow stream network (Saghafian 1992). The computational time
between two elements oriented in the x-direction, (j,k-1) and step in channels is first equal to the simulation time step. In
(j,k) as: the case in which the channel routing becomes unstable at a
given time step, this time step is cut in half and the flow is
( ) ( ) routed in the channel network in two smaller steps. If the the
(
( ) channel depth still becomes negative, the time step is divided
) ( ) again by two. This process is repeated until the water can be
routed in the channels without being unstable or until the time programming is a domain-independent method that genetically
step becomes unreasonably small (<0.0001). breeds a population of computer programs to solve a problem.
Specifically, genetic programming iteratively transforms a
IV. EXPLICIT SOLUTION FOR CHANNEL TRANSPORT population of computer programs into a new generation of
Most existing models are based upon the same fundamental programs by applying analogs of naturally occurring genetic
physical principles of conservation of mass and momentum operations. This process is illustrated in the following figure:
(Bennett 1974). In a physical model, the erosion components Genetic Population of Run Programs and
are normally subsidiary to a hydrologic model. Random Programs Evaluate their Quality
In the overland cells, the flow, q, is computed at each cell (j,k)
in two orthogonal directions to the neighboring cell (jj,kk) – to
the right of the cell and to the down side of the cell. In any of
those directions, the flux can be: Breed Fitter Programs
1. Positive: this is an inflow (q < 0) to that cell and Sf < 0. In
this case, the sediment is transported into the current
computational cell (j to = j , k to = k) from the source cell The basic tree like structure is given below:
(jfrom = jj, k from = kk).
2. Negative: this is an outflow (q > 0) from that cell and Sf ≥ Max
0. In this case, the sediment is transported out of the current
computational cell (j from = j , k from = k) and into the sink
cell (j to = jj , k to = kk).
Once the source or outgoing cell (j from, k from) and the sink
or receiving cell (j to, k to) has been determined, the transport
capacity is calculated using the Kilinc and Richardson
equation.
( )
| | | | ( )
( )
This volume of sediment is transported by size fraction from Genetic programming starts from a high-level statement of the
the suspended, deposited or parent material portion in the requirements of a problem and attempts to produce a computer
source cell (j from, k from) to the suspended portion of the program that solves the problem. The human user
sink cell ( j to, k to). In the channels, the total flow q is communicates the high-level statement of the problem to the
computed at each cell (j,k) between that cell and the genetic programming algorithm by performing certain well-
downstream cell (jj,kk). In case of a positive flow (inflow), the defined preparatory steps. The five major preparatory steps for
sediment is transported into the current computational cell (j to the basic version of genetic programming require the human
= j , k to = k) from the downstream cell (j from = jj, k from = user to specify
kk). In case of a negative flow (outflow), the sediment is 1. The set of terminals (e.g., the independent variables of the
transported out of the current computational cell (j from = j , k problem, zero argument functions, and random constants) for
from = k) and into the sink or downstream cell (j to = jj , k to each branch of the to-be evolved program,
= kk). Once the source or outgoing cell (j from, k from) and 2. The set of primitive functions for each branch of the to-be-
the sink or receiving cell (j to, k to) have been determined, the evolved program,
transport capacity is calculated using the Engelund and 3. The fitness measure (for explicitly or implicitly measuring
Hansen equation. This volume of sediment is transported by the fitness of individuals in the population),
size fraction from the suspended or deposited portion in the 4. Certain parameters for controlling the run, and
source cell (j from, k from) to the suspended portion of the 5. The termination criterion and method for designating the
sink cell (j to, k to) according to the scheme described. result of the run.
The first two preparatory steps specify the ingredients that are
available to create the computer programs. A run of genetic
V. DEVELOPMENT OF GENETIC ALGORITHM programming is a competitive search among a diverse
The goal of getting computers to automatically solve problems population of programs composed of the available functions
is central to artificial intelligence, machine learning, and the and terminals. The identification of the function set and
broad area encompassed by what Turing called “machine terminal set for a particular problem (or category of problems)
intelligence” (Turing 1948, 1950). In his 1983 talk entitled is usually a straightforward process. For some problems, the
“AI: Where It Has Been and Where It Is Going, machine function set may consist of merely the arithmetic
learning pioneer Arthur Samuel stated the main goal of the functions of addition, subtraction, multiplication, and division
fields of machine learning and artificial intelligence”: as well as a conditional branching operator. The terminal set
Genetic programming is a systematic method for getting may consist of the program’s external inputs (independent
computers to automatically solve a problem starting from a variables) and numerical constants. For many other problems,
high-level statement of what needs to be done. Genetic the ingredients include specialized functions
and terminals. For example, if the goal is to get genetic Accum(I+i-2,J) = Accum(I+i-2,J) +
programming to automatically program a robot to mop the Accum(i,j);
entire floor of an obstacle-laden room, the human user must
tell genetic programming what the robot is capable of doing. end;
For example, the robot may be capable of executing functions
such as moving, turning, and swishing the mop. If the goal is %Set the accumulation over the interior
the automatic creation of a controller, the function set may points of the eastern boundary
consist of integrators, differentiators, leads, lags, gains, adders, for i=2:M-1 %the column (x-value, or E-
subtractors, and the like and the terminal set may consist of value) is set to the end, N
signals such as the reference signal and plant output. If the
goal is the automatic synthesis of an analog electrical circuit, j=N;
the function set may enable genetic programming to construct [temp,I]=min(Psi(i-1:i+1,j));
circuits from components such as transistors, capacitors, and [I,J]=ind2sub([M,N],I);
resistors. Once the human user has identified the primitive Accum(I+i-2,J) = Accum(I+i-2,J) +
ingredients for a problem of circuit synthesis, the same Accum(i,j);
function set can be used to automatically synthesize an
amplifier, computational circuit, active filter, voltage reference end;
circuit, or any other circuit composed of these ingredients.
The third preparatory step concerns the fitness measure for the %Set the accumulation over the interior
problem. The fitness measure specifies what needs to be done. points of the northern boundary
The fitness measure is the primary mechanism for for j=2:N-1 %the column (y-value, or N-
communicating the high-level statement of the problem’s value) is set to 1
requirements to the genetic programming system. For
example, if the goal is to get genetic programming to i=1;
automatically synthesize an amplifier, the fitness function is [temp,I]=min(Psi(i,j-1:j+1));
the mechanism for telling genetic programming to synthesize [I,J]=ind2sub([M,N],I);
Accum(I,J+j-2) = Accum(I,J+j-2) +
a circuit that amplifies an incoming signal (as opposed to, say,
Accum(i,j);
a circuit that suppresses the low frequencies of an incoming
signal or that computes the square root of the incoming
end;
signal). The first two preparatory steps define the search space
whereas the fitness measure implicitly specifies the search’s
%Set the accumulation over the interior
desired goal. The fourth and fifth preparatory steps are
points of the southern boundary
administrative. The fourth preparatory step entails specifying
for j=2:N-1 %the column (y-value, or N-
the control parameters for the run. The most important control
value) is set to end
parameter is the population size. Other control parameters
include the probabilities of performing the genetic operations, i=M;
the maximum size for programs, and other details of the run. [temp,I]=min(Psi(i,j-1:j+1));
The fifth preparatory step consists of specifying the [I,J]=ind2sub([M,N],I);
termination criterion and the method of designating the result Accum(I,J+j-2) = Accum(I,J+j-2) +
of the run. The termination criterion may include a maximum Accum(i,j);
number of generations to be run as well as a problem-specific
success predicate. The single best-so-far individual is then end;
harvested and designated as the result of the run.
%Set the accumulation over the corner
points of the grid boundary
%First: NorthWest corner
VI. IMPLEMENTATION OF GENETIC ALGORITHM IN [temp,I]=min(Psi(1:2,1:2));
MATLAB [I,J]=ind2sub([M,N],I);
Coding for different subroutines have been developed in the Accum(I,J) = Accum(I,J) + Accum(1,1);
following paragraph:
%Set the accumulation over the interior %Set the accumulation over the corner
points of the western boundary points of the grid boundary
for i=2:M-1 %the column (x-value, or E- %Second: SouthWest corner
value) is set to 1 [temp,I]=min(Psi(end-1:end,1:2));
[I,J]=ind2sub([M,N],I);
j=1; Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) +
[temp,I]=min(Psi(i-1:i+1,j)); Accum(end,1);
[I,J]=ind2sub([M,N],I);
%Set the accumulation over the corner
points of the grid boundary
%Second: NorthEast corner % V - velocity vector in the geocentric
[temp,I]=min(Psi(1:2,end-1:end)); equatorial frame
[I,J]=ind2sub([M,N],I); % (km)
Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) + % r, v - the magnitudes of R and V
Accum(1,end); % vr - radial velocity component (km/s)
% H - the angular momentum vector
%Set the accumulation over the corner (kmˆ2/s)
points of the grid boundary % h - the magnitude of H (kmˆ2/s)
%Second: SouthEast corner % incl - inclination of the orbit (rad)
[temp,I]=min(Psi(end-1:end,end-1:end)); % N - the node line vector (kmˆ2/s)
[I,J]=ind2sub([M,N],I); % n - the magnitude of N
Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) + % cp - cross product of N and R
Accum(end,end); % RA - right ascension of the ascending
node (rad)
%Find the channels over the total % E - eccentricity vector
interior grid cells % e - eccentricity (magnitude of E)
% eps - a small number below which the
for(i=2:M-1) %sum over number of eccentricity is
northward cells (rows) % considered to be zero
for(j=2:N-1) %sum over number of % w - argument of perigee (rad)
eastward cells (columns) % TA - true anomaly (rad)
% a - semimajor axis (km)
% Assign values to variable input % pi - 3.1415926...
arguments. % coe - vector of orbital elements [h e
[temp,I]=min(Psi(i-1:i+1,j- RA incl w TA a]
1:j+1)); %
[I,J]=ind2sub([M,N],I); % User M-functions required: None
Accum(I+i-2,J+j-2) = Accum(I+i- % ---------------------------------------
2,J+j-2) + Accum(i,j); ---------------------
global mu;
end; eps = 1.e-10;
end; r = norm(R);
v = norm(V);
[temp,I] = sort(Accum,1,'descend'); vr = dot(R,V)/r;
for j=1:N, H = cross(R,V);
channel(I(1:numChans,j),j)=temp(1:numChan h = norm(H);
s,j); end; incl = acos(H(3)/h);
% for j=1:N, N = cross([0 0 1],H);
channel_dz(I(1:numChans,j),j)=realbed'(1: n = norm(N);
3,j); end; if n ? = 0
RA = acos(N(1)/n);
if(strcmp(plotopt,'plot')) if N(2) < 0
subplot(2,1,1); surf(flipud(Psi)); RA = 2*pi - RA;
view([0,90]); axis tight; end;
title('Potential'); xlabel('E-W'); else
ylabel('N-S'); RA = 0;
subplot(2,1,2); image(channel); axis end;
tight; title('Channel Locations'); E = 1/mu*((vˆ2 - mu/r)*R - r*vr*V);
end; e = norm(E);
Calculation of ORBITAL VECTOR from STATE VECTOR if n ? = 0
is shown in the following coding: if e > eps
% This function computes the classical w = acos(dot(N,E)/n/e);
orbital elements (coe) if E(3) < 0
% from the state vector (R,V) w = 2*pi - w;
% end;
% mu - gravitational parameter (kmˆ3/sˆ2) else
% R - position vector in the geocentric w = 0;
equatorial frame end;
% (km) else
w = 0;
end;
if e > eps [4] Patankar, S.V “Numerical Heat Transfer and Fluid Flow”,
TA = acos(dot(E,R)/e/r); Hemisphere Publication, ISBN-10: 0891165223, 1980
if vr < 0 [5] Cebeci, Tuncer, Jian P Shao, Fassi Kafyeke, Eric
TA = 2*pi - TA; Laurendeau “Computational Fluid Dynamics for Engineers”
end; Springer Publication
else [6] Oertel, Herbert “ Prandtl’s Essentials of Fluid Mechanics”
cp = cross(N,R); Springer Publication
if cp(3) >= 0 [7] Schlichting, Hermann, K Gersten “Boundary Layer
TA = acos(dot(N,R)/n/r); Theory”, Springer Publication
else [8] G K Batchelor “An Introduction to Fluid Dynamics”,
TA = 2*pi - acos(dot(N,R)/n/r); Cambridge Mathematical Library
end; [9] Pjush Kundu, Ira Kohen “Fluid Mechanics” 3rd Edition,
end; Elsevier Academic Press
a = hˆ2/mu/(1 - eˆ2);
coe = [h e RA incl w TA a];
VII. CONCLUSION
There is quite a huge application of genetic algorithm in the
field of civil engineering and environmental science. To
calculate the Stumpff function S(z) and C (z) and to calculate
the state vector from Kepler’s equation is the best application
of orbital mechanics in this area. Numerical simulation can be
easier if the programs are modified with the new advent of
genetic algorithm like:
Constrained Syntatic Structure
Automatically defined variables
Automatically Defined iterations (ADI) and
Automatically Defined Loops (ADL)
Besides that genetic programming solvers are now available
for fast computation. Wide application of this field in waste
engineering like incineration and composting is really a new
methodology.
At present genetic programming is certainly not in a position
to produce computer programs that would pass the full Turing
test for machine intelligence, and it might not be ready for this
immense task for centuries. Nonetheless, thanks to the
constant technological improvements in genetic programming
technology, in its theoretical foundations and in computing
power, genetic programming has been able to solve tens of
difficult problems with human-competitive results in the
recent past. It is, indeed, arguable that in a few years’ time
genetic programming will be able to routinely and competently
solve important problems for us in a variety of specific
domains of application, even when running on a single
personal computer, thereby becoming an essential collaborator
for many of human activities. This, we believe, will be a
remarkable step forward towards achieving true, human
competitive machine intelligence.
REFERENCE
[1] Anderson, John D, Jr “Computational Fluid Dynamics”,
McGraw-hill, Inc.NY
[2] Anderson, John D, Jr “Fundamentals of Aerodynamics”
McGraw-Hill, Inc, NY
[3] Ferziger Joel H, Peric Milovan “ Computational Methods
for Fluid Dynamics” 3rd ed, Springer Publication, 2003