
The optimal solution \((a, {\mathbf {b}}, \mathbf {\lambda })\)  must have the Karush-Kuhn-Tucker (KKT) conditions hold [1]}, namely
\(& \frac{\partial \left(-{\mathbf {s}}^\top \mathbf {\lambda } - \epsilon H(\mathbf {\lambda }) + \epsilon \mathbf {1}^\top \mathbf {\lambda } + a (k-\mathbf {1}^\top \mathbf {\lambda }) + \mathbf {b}^\top (\mathbf {1} - \mathbf {\lambda })\right)}{\partial \mathbf {\lambda }} = 0 \\\Longleftrightarrow \qquad & \mathbf {\lambda } = \exp \left(\frac{{\mathbf {s}}+ a +{\mathbf {b}}}{\epsilon }\right)\quad \Longleftrightarrow \quad \lambda _i = \exp \left(\frac{s_i + a+{\mathbf {b}}_i}{\epsilon }\right) \ \ \forall i=1,\dots ,m\) 
