A weighted sum with custom constraints tool.