2

After some researches I was not able to find any reference to this feature.

Is it possible to add a single name, say (P), to an optidef-defined model? The following is an image of what I'm trying to achieve

optidef model example

It is not necessary that the (P) is aligned to the objective function row, it might be wherever but it is important it is on the left.

And this is the code to produce it but without the red (P).

\documentclass[11pt]{article}

\usepackage[short]{optidef}

\begin{document}

\begin{mini!}
  {w,u}{f(w)+ R(w+6x)}{}{}\tag{1}
  \addConstraint{g(w_k)+h(w_k)}{=0,}{k=0,\ldots,N-1}\tag{2} 
  \addConstraint{l(w_k)}{=5u,\quad}{k=0,\ldots,N-1}\tag{3}
\end{mini!}

\end{document}
1

You can abuse the fourth argument:

\documentclass[11pt]{article}

\usepackage[short]{optidef}

\begin{document}

\begin{mini!}
  {w,u}{f(w)+ R(w+6x)}{}{\text{(P)}\quad}\tag{1}
  \addConstraint{g(w_k)+h(w_k)}{=0,}{k=0,\ldots,N-1}\tag{2}
  \addConstraint{l(w_k)}{=5u,\quad}{k=0,\ldots,N-1}\tag{3}
\end{mini!}

\end{document}

enter image description here

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.