I've written this pseudocode and I encountered two problems. First, it shows the message: Missing number, treated as zero 4 times; and second, I can`t write code inside the loops. Even if I write the endloop outside of the condition it goes before it. Can someone help me?



\caption{\greektext{Αλγόριθμος} \textlatin{Dantzig Wolfe}}
\footnotesize \begin{algorithmic}[1]
 \Procedure{Dantzig Wolfe}{}
\Statex \emph{\greektext{Βήμα 0 (Αρχικοποίηση)}}
\Statex \emph{\greektext{Επίλεξε κατάλληλα σύνολα μεταβλητών}}\\
\While {true}
\Statex \emph{\greektext{\{Κυρίαρχο πρόβλημα\}}}
\Statex \emph{\greektext{Λύσε το κύριο περιορισμένο πρόβλημα}}
\State Compute duals of coupling constraints $\ \pi_1$
\State Compute duals of $\ k^{th}$ convexity constraint $\ \pi^{(k)}_2$
\Statex \emph{\greektext{\{Υποπρόβλημα\}}}\\
\For {k=1,. . . ,K}
\State Plug $\ \pi_1$ and$\ \pi^{(k)}_2$ into sub-problem k
\State Solve sub-problem k\\
\If {$\ \sigma^*_k<0 $}
\State Add proposal $\ x^*_k$ to the restricted master
\If {No proposals generated}
\State STOP. The problem is optimal.
  • please most the complete error message you get. – Timothy Truckle Jan 13 at 11:59
  • pdflatex> !Missing number,treated as zero. It shows this 4 times at the output and it redirects me to the closing bracket of the pseudocode. – Μαρια Αγγελιδου Jan 13 at 12:02
  • I replaced your documentclass {epm-bs} with {article}, downloaded the optidef package, and enclosed the main algo within a \begin{document} ... \end{document} to get a valid pdf output. Don't know what's the issue with your compilation. However, my greeks all appear ; for some obscure reason-- though that's perhaps not your issue. – Partha D. Jan 14 at 14:27
  • Thank you, perhaps you`re ritght. – Μαρια Αγγελιδου Jan 15 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.