Summary
I propose the use of the following sign convention for duals in the new solver interfaces.
Given the problem
$$
\begin{align}
\min & f(x) \\
\text{s.t.} \\
& c_i(x) = 0 && \forall i \in \mathcal{E} \\
& g_i(x) \leq 0 && \forall i \in \mathcal{U} \\
& h_i(x) \geq 0 && \forall i \in \mathcal{L}
\end{align}
$$
Define the Lagrangian as
$$
\begin{align}
L(x, \lambda, \nu, \delta) = f(x) - \sum_{i \in \mathcal{E}} \lambda_i c_i(x) - \sum_{i \in \mathcal{U}} \nu_i g_i(x) - \sum_{i \in \mathcal{L}} \delta_i h_i(x)
\end{align}
$$
Then, the KKT conditions are [1]
$$
\begin{align}
\nabla_x L(x, \lambda, \nu, \delta) = 0 \\
c(x) = 0 \\
g(x) \leq 0 \\
h(x) \geq 0 \\
\nu \leq 0 \\
\delta \geq 0 \\
\nu_i g_i(x) = 0 \\
\delta_i h_i(x) = 0
\end{align}
$$
If a particular solver does not adopt this convention, then we will have to map things back and forth both when retrieving duals and when initializing duals.
This sign convention would have to be based on the (lower, body, upper) representation of constrains rather than the "raw" expression.
[1] Nocedal, Jorge, and Stephen J. Wright, eds. Numerical optimization. New York, NY: Springer New York, 1999.
Summary
I propose the use of the following sign convention for duals in the new solver interfaces.
Given the problem
Define the Lagrangian as
Then, the KKT conditions are [1]
If a particular solver does not adopt this convention, then we will have to map things back and forth both when retrieving duals and when initializing duals.
This sign convention would have to be based on the (lower, body, upper) representation of constrains rather than the "raw" expression.
[1] Nocedal, Jorge, and Stephen J. Wright, eds. Numerical optimization. New York, NY: Springer New York, 1999.