How to make the following concave function to fit cvx?

Uncategorized
Nov 25, 2022
T

max_x log(1+ax/(bx+c)) - q(dx+e), where a, b, c, d, e, q are all non-negative.

M
T
Replying to #2

Thanks for your kind help!

T
Replying to #3

Hi, yesterday I made it by converting
log(1+ax/(bx+c)) - q(dx+e)
to
log(1+ a/b-(ac/b)*inv_pos(bx+c)) - q(dx+e).
But today it doesn’t work again…
the error is
Disciplined convex programming error:
Cannot perform the operation: {positive constant} .* {positive constant}

M

This requires a*c/b >= 0.

If that doesn’t resolve it, please show a complete, but minimal reproducible example, with all input data.

And please include all * in your program, i.e., actual code, not math for display with implied * .

T
Replying to #5

I’m sure a*c/b >=0, and it worked the day before yesterday…

M

Well, if you claim to have done the same thing, and it worked one day, and not the next, and you don’t show us exactly what you did, I don’t think we can provide much help.

If you saw this question, and you were going to reply, what would you tell the poster? Whatever that is, do it.