Difference on Restricted Domain
The difference with domain . methods
one_minus_pos(x)
x
: An Expression , vector, or matrix.An Expression representing one minus the input restricted to .
This atom is log-log concave.
x <- Variable(pos = TRUE) y <- Variable(pos = TRUE) prob <- Problem(Maximize(one_minus_pos(x*y)), list(x <= 2 * y^2, y >= .2)) result <- solve(prob, gp = TRUE) result$value result$getValue(x) result$getValue(y)