I need a way to calculate the very minimum of each variable for a grade average.

Each grade variable have a weighing percentage (I don't know if it's the right term)

The weighing sum must be the total (100%)

The value it must be `>=1` and `<=7`

For example

$$
0.25x + 0.2y + 0.25z + 0.3u = 4
$$
or any number of variables
$$
0.15x + 0.2y + 0.25z + 0.15u + 0.25w = 4
$$

So I need the minimum value for each grade/variable to match 4

How can I do that?

Sorry if it's a dumb question

Thanks