# Simulating an optimization problem

I have an optimization problem like below:

$\text{minimize } - \sum_k w_k \log r_k$

$a \leq r_k \leq b_k, k = 1, \cdots, 10$

Here, $w$ and $b$ is a set of constant: $w = [w_1, \cdots, w_{10}]$ and $b = [b_1, \cdots, b_{10}]$. Also $a$ is a constant too.

Now I want to simulate this problem. I can create a random array for $w$ and $b$, and then assign values to each $w_k$, $b_k$ using below code:

SeedRandom[42];
Array[(x[#] = RandomReal[1]) &, 10];
Definition @ x

But then how can I write the $\textbf{Nminimize}$ command so that it optimizes for all 10 equations? My question is, do I have to write all the equations? This is important because if I want to simulate with 100 constraints then it is not possible to write all the constraints. Is there any smart way in Mathematica to do this?