我正在努力完成我的流程图(在 Herbert 和 Bernard 的极大帮助下)
如何避免 WIDE 项(其侧面没有元素)推动所有其他列?我希望其他列与 WIDE ITEM 位于同一位置,作为普通项(否则它不存在。)
代码:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsfonts,amssymb,latexsym}
\usepackage{pst-node}
\usepackage{pst-blur}
\usepackage{pstricks}%
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amsfonts,amssymb,latexsym}
\usepackage{graphicx}
\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue}
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink}
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green}
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}
\begin{document}
\resizebox{18cm}{!}{ % if you want to resize
\psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm}
\def\pscolhookii{\hskip 2cm}
\def\pscolhookiii{\psset[pst-node]{mcol = l}}
\begin{psmatrix}[rowsep=2,colsep=0.1]% defines the distance between two frames
%
& [name = SA]
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodeblue(0,0){0.15}{Current}
\rput[t](0,-1.15){Solución Actual}&
\\[1.2cm]
%
& [name=GV]
\psframegray(-1.00,-1.00)(1.00,1.00)%
\cnodeblue(0,0){0.15}{Current}
\cnodepink(-0.75,0.75){0.15}{Current}
\cnodepink(0,0.65){0.15}{Current}
\cnodepink(0.75,0.75){0.15}{Current}
\cnodepink(-0.55,0.15){0.15}{Current}
\cnodepink(0.65,0.15){0.15}{Current}
\cnodepink(-0.75,-0.55){0.15}{Current}
\cnodepink(-0.05,-0.5){0.15}{Current}
\cnodepink(0.65,-0.65){0.15}{Current}
\cnodepink(0.35,-0.40){0.15}{Current}
\rput[t](0,-1.15){Generar Vecindad}
\\[1.2cm]
%~\\
& [mnode = dia, shadow=true, linearc = 0.05,framesep=0.1,name = Vvacia]
\begin{tabular}{c}¿Vecindad=$\emptyset$? \end{tabular}
& [mnode = oval, shadow=true, linearc = 0.05,framesep=-0.22,name = LTfin]
\begin{tabular}{c}$\bullet$Finalizar\\$\bullet$Eligir Mejor\\Solución Visitada\end{tabular}
\\[0.75cm]
%
[name=Wr]
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodeblue(0,0){0.15}{Current}
\cnodepink(-0.75,0.75){0.15}{Current}
\cnodepink(0,0.65){0.15}{Current}
\cnodepink(0.75,0.75){0.15}{Current}
\cnodepink(-0.75,0.15){0.15}{Current}
\cnodegreen(0.65,0.15){0.15}{Boa}
\cnodepink(-0.75,-0.55){0.15}{Current}
\cnodepink(-0.05,-0.5){0.15}{Current}
\cnodepink(0.65,-0.65){0.15}{Current}
\cnodepink(0.35,-0.40){0.15}{Current}
\psset{linecolor=red,linewidth=0.09,opacity=0.3}
\psline(0.40,0.40)(0.90,-0.10)
\psline(0.40,-0.10)(0.90,0.40)
\rput[t](0,-1.15){Eliminar Vecino Elegido}
& [name=EMV]
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodeblue(0,0){0.15}{Current}
\cnodepink(-0.75,0.75){0.15}{Current}
\cnodepink(0,0.65){0.15}{Current}
\cnodepink(0.75,0.75){0.15}{Current}
\cnodepink(-0.75,0.15){0.15}{Current}
\cnodegreen(0.65,0.15){0.15}{Boa}
\psline[linewidth=0.1]{->}(1.5,-0.2)(0.84,0.16)
\cnodepink(-0.75,-0.55){0.15}{Current}
\cnodepink(-0.05,-0.5){0.15}{Current}
\cnodepink(0.65,-0.65){0.15}{Current}
\cnodepink(0.35,-0.40){0.15}{Current}
\rput[t](0,-1.15){Elegir Mejor Vecino}&
\\[1cm]
%
[mnode = dia, shadow=true, linearc = 0.05,framesep=-0.2,name = CA]
\begin{tabular}{c}¿Verifica\\Criterio de\\Aspiración?\end{tabular}
& [mnode = dia, shadow=true, linearc = 0.05,framesep=-0.2,name = LT]
\begin{tabular}{c}¿Está en\\Lista Tabú? \end{tabular}
\\[0.32cm]
%
& [name=Ace, mnode = r]
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodegreen(0.65,0.15){0.15}{Boa}
\psline[linewidth=0.1]{->}(1.5,-0.2)(0.84,0.16)
%\rput[t](0,-1.15){\tabular{c}$\bullet$ Actualizar Lista Tabú\\$\bullet$ Aceptar Vecino Elegido como nueva solución\\$\bullet$ Repetir proceso hasta alcanzar el máximmo de iteraciones.\\$\bullet$ Si se han agotado la iteraciones,\\ tomar como Solución, la mejor de todas las visitadas\endtabular}
&\\[1cm]
&
[mnode = oval, shadow=true, linearc = 0.05,framesep=-0.22,name = Repetir]
\begin{tabular}{c}$\bullet$ Actualizar Lista Tabú\\$\bullet$ Aceptar Vecino Elegido como nueva solución\\$\bullet$ Repetir proceso hasta alcanzar el máximmo de iteraciones.\\$\bullet$ Si se han agotado la iteraciones,\\ tomar como Solución, la mejor de todas las visitadas \end{tabular} &
\end{psmatrix}
%%% Links
\psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt, linearc=0.25, angleB=180, shortput=nab}
\ncline{LT}{CA}_{Si}
{\psset{nodesepB = 1.15}%
\ncline[nodesepA = 1.52cm]{SA}{GV}%
\ncline[nodesepA = 1.52cm,nodesepB=0.32]{GV}{Vvacia}
\ncline[nodesepA = 0.40cm]{Vvacia}{EMV}^{No}
\ncline[nodesepA = 0.1cm]{Vvacia}{Vfin}
%\ncline[nodesepA = 1.52cm]{GV}{EMV}
\ncline[nodesepA = 9pt]{LT}{Ace}^{No}
\ncline[nodesepB = 1.52cm]{CA}{Wr}^{No}
\ncangle[nodesepA = 7pt, angleA = -90]{CA}{Ace}^{Si} }%
\ncline[nodesepA = 1.67cm]{EMV}{LT}%%
\midAB(GV)(EMV){I}
\ncangle[nodesepA = 1.15, angleA = 90]{Wr}{Vvacia}
\ncline[nodesepA = 1.45cm]{Ace}{Repetir}
}
\end{document}
解决这个问题可以帮助我制作类似的流程图,您可以在第 3 行看到 2 个项目的一部分位于同一列下)
答案1
重新缩放到18厘米是没有意义的!
[...]
\begin{document}
\noindent
\resizebox{\linewidth}{!}{% if you want to resize
\psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm}
[...]
&\\[1cm]
& [name=Repetir] \makebox[0pt]{\psovalbox[shadow,framesep=-0.22]{%
\begin{tabular}{c}$\bullet$ Actualizar Lista Tabú\\$\bullet$ Aceptar Vecino Elegido como nueva solución\\$\bullet$
[...]