I want to find a vector $w \in (0,1)^5$ that minimizes $w'd$ where $d \in (0,10)^5$. Further, $w$ is constrained s.t. $\sum_{i=1}^5 w_i = 2/3$ and $w'x = y$ where $x \in \mathbb{R}^5$ and $y \in \mathbb{R}$.
In my problem, I know already $d, x$ and $y$. I think I can solve this by Lagrange multiplier is that right? But I am not sure whether it has a unique solution at all.
P.S.: I'd like to implement this in R. So it would also be nice if someone could show how to do this.