$$\min_{x\geq 0}\sum_{i=1}^n (a_i-x b_i)^2 [a_i-x b_i\leq 0],\quad a_i,b_i\in\mathbb R,n\in\mathbb N$$
where $[p]$ is an Iverson bracket.
The objective function seemed easy (convex).
1.Is there any the concrete name for this kind of optimization or specific method to solve?
2.Any reference material?
3.To find the solution, is there suitable package in R?