Determine if a problem or expression complies with the disciplined geometric programming rules.
Value
A logical value indicating whether the problem or expression is DCP compliant, i.e. no unknown curvatures.
Examples
x <- Variable(pos = TRUE)
y <- Variable(pos = TRUE)
prob <- Problem(Minimize(x*y), list(x >= 5, y >= 5))
is_dgp(prob)
#> [1] TRUE
solve(prob, gp = TRUE)
#> ✔ Status: optimal
#> ✔ Objective value: 25.000000
#> ℹ Solver: MOSEK
#> → <me>$getValue(x) returns value of variable/constraint x