在算法环境后添加脚注

在算法环境后添加脚注

我有以下最小示例。我想在算法结束后立即添加脚注。您能指导我如何在该算法的底部添加脚注吗?

非常感谢您的宝贵时间。

\documentclass[a4paper,11pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{geometry}
\newgeometry{vmargin={30mm}, hmargin={25mm,25mm}}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amssymb}
\usepackage{academicons}

\begin{document}

\begin{algorithm}
\caption{The pseudo code of the proposed accelerated BDA}\label{Alg2}
\begin{algorithmic}[1]
\Statex Initiate the algorithm
\State $nPop \gets$ Size of population
\For {$n = 1:nPop$}
    \State $x_{ijk}$ and $l_{ijk} \gets 0$ \: \: $\forall i,j \in \mathcal{N}; k \in \mathcal{V}$
    \State $PC \gets$ All possible combinations of manufacturers and distributors
    \While {further retailer can be possibly assigned to vehicles}
        \State Randomly select a combination of manufacturer and distributor from $PC$
        \State $i \gets$ the selected manufacturer, $j \gets$ the selected distributor and
        \Statex $k \gets$ the first available vehicle of manufacturer $i$
        \If {}
        \EndIf
    \EndWhile
\EndFor
\end{algorithmic}
\end{algorithm}

\end{document}

答案1

我不确定我是否理解了你的问题正确但可能的解决方案如下:

\documentclass[a4paper,11pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{geometry}
\newgeometry{vmargin={30mm}, hmargin={25mm,25mm}}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amssymb}
\usepackage{academicons}

\begin{document}

\begin{algorithm}
\caption{The pseudo code of the proposed accelerated BDA}\label{Alg2}
\begin{algorithmic}[1]
\Statex Initiate the algorithm
\State $nPop \gets$ Size of population
\For {$n = 1:nPop$}
    \State $x_{ijk}$ and $l_{ijk} \gets 0$ \: \: $\forall i,j \in \mathcal{N}; k \in \mathcal{V}$
    \State $PC \gets$ All possible combinations of manufacturers and distributors
    \While {further retailer can be possibly assigned to vehicles}
        \State Randomly select a combination of manufacturer and distributor from $PC$
        \State $i \gets$ the selected manufacturer, $j \gets$ the selected distributor and
        \Statex $k \gets$ the first available vehicle of manufacturer $i$
        \If {}
        \EndIf
    \EndWhile
\EndFor \footnotemark
\end{algorithmic}
\end{algorithm}
\footnotetext{Here you can write your text}
\end{document}

相关内容