流程图
遗传算法流程图
\begin{
figure}[htbp]
\tikzstyle{
startstop} = [rectangle, rounded corners,thick, minimum width=1cm, minimum height=0.5cm,text centered, draw=black, fill=white,text width=1cm] % 定义开始结束
\tikzstyle{
process} = [rectangle,thick, minimum width=3cm, minimum height=0.5cm, text centered, draw=black, fill=white,text width=3cm] % 定义步骤
\tikzstyle{
decision} = [diamond,aspect = 4, thick, minimum width=3cm, minimum height=0.5cm, text centered, draw=black, fill=white] % 定义判断框
\tikzstyle{
arrow} = [thick,->,>=Latex] % 定义箭头
\centering
\begin{
tikzpicture}[node distance=1cm]
% 定义流程图具体形状
\node (start) [startstop] {
开始};
\node (pro1) [process, below of=start] {
创建初始群};
\node (pro2) [process, below of=pro1] {
适应度计算};
\node (dec1) [decision, below of=pro2,yshift=-0.38cm] {
满足终止准则?};
\node (pro3) [process, below of=dec1,yshift=-0.38cm] {
选择操作};
\node (pro4) [process, below of=pro3] {
交叉操作};
\node (pro5) [process, below of=pro4] {
变异操作};
\node (pro6) [process, right of=pro3,xshift=3cm] {
变异操作};
\node (stop) [startstop, below of=pro6] {
结束};
% 连接具体形状
\draw [arrow](start) -- (pro1);
\draw [arrow](pro1) -- (pro2);
\draw [arrow](pro2) -- (dec1);
\draw [arrow](dec1) -- (pro3);
\draw [arrow](pro3) -- (pro4);
\draw [arrow](pro4) -- (pro5