I am implementing a code that would like to sort some objects.
Each object has 5 attributes, which some of them I would like to maximize and at the same time minimize others attributes. Consider that I have the following attributes: $a$, $b$, $z$, $w$, and $y$. I would a function that returns a value $v$ that maximize $a$ and $b$ values and minimize $z$, $w$, and $y$. That is, a function $f(a, b, z, w, y) = v$.
For instance, I would like a to do a balance between these values. For my application, sometimes it is better to choose an object that has high $a$ and $b$ values. However, sometimes it is better to choose an object that has low $z$, $w$, and $y$ values.
Any recommendation, tip to do it?