Giving a text number to an equation in the equation mode

I want to write an optimization problem wherein I want the "number" to be something like "PP".

The code below achieves this in the align environment.

\begin{aligned}
& \underset{x}{\text{minimize}}
& & f_0(x) \label{Eq:PP} \tag{PP} \\
& \text{subject to}
& & f_i(x) \leq b_i, \; i = 1, \ldots, m.
\end{aligned}
\end{align}


However, doing that produces (PP) on the first line of the equation. I can use

\begin{aligned}
& \underset{x}{\text{minimize}}
& & f_0(x) \label{Eq:PP}\\
& \text{subject to}
& & f_i(x) \leq b_i, \; i = 1, \ldots, m.
\end{aligned}



Here, the number appears in the center, as it should, but if I try "tag{PP}", I get an error. I was wondering if there's a way to write the optimization problem so that the number "PP" appears is vertically at the enter of the problem, and not aligned with the first line.

Thanks!

The label and tag had to be outside of aligned environment:

\documentclass{article}
\usepackage{amsmath}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{equation}
\setlength\PreviewBorder{1em}

\begin{document}
\label{Eq:PP} \tag{PP} \begin{aligned} & \underset{x}{\text{minimize}} & & f_0(x) \\ & \text{subject to} & & f_i(x) \leq b_i, \; i = 1, \ldots, m. \end{aligned}
\end{document}


• That's great! Thanks. – avk255 Aug 30 at 8:12

I use another approach using optidef package that it is a library for optimization problems. The inconvenience of this package, IMHO, are the labels (in fact I have not able to put the label into the two equation or it is impossible).

\documentclass[a4paper,12pt]{article}

\usepackage{mathtools,amssymb}
\usepackage{optidef}
\begin{document}

\begin{mini!}
{x}{f_0(x)}{}{}\notag