In gp(F0, g0, A = A, b = b) : No restrictions provided, trying solve()
This likely means that while you've specified A and b, the solver doesn't recognize any inequality (<=) or equality (=) restrictions - because in the context of the gp() function from the CVXR or similar geometric programming libraries in R, you're expected to provide explicit inequality/equality markers or properly formatted constraint matrices. So what's missing? Probably an argument like ineq = ... or eq = ... to declare the type of constraint. Here's how to express your constraint properly, assuming the library expects inequalities or equalities to be marked explicitly: # Properly declare equality constraints gp(F0, g0, eq=A, eq.b=b) Or possibly (depending on the package): gp(F0, g0, Aeq=A, beq=b) If the solver expects inequality constraints: gp(F0, g0, A=A, b=b, meq=1) # Indicating 1 equality constraint Jeff Reichman -----Original Message----- From: R-help <r-help-boun...@r-project.org> On Behalf Of kol...@science.iwi.ac.at Sent: Wednesday, July 30, 2025 2:32 PM To: r-help@r-project.org Subject: [R] Problem with function gp in package cccp Dear all! I tried to solve a simple test example of a geometric program: minimize x + y s.t. xy = 1 The solution should be (1, 1). I tried: F0 <- diag(2) # [m * n] m = number of terms of the posynomial, n = number of variables g0 <- log(matrix(1,2,1)) # [m * 1] A <- matrix(c(1,1), 1, 2) # one constraint, one row b <- log(matrix(1,1,1)) RES <- gp(F0, g0, A=A, b=b) Though I received the correct solution, the function gives a warning: In gp(F0, g0, A = A, b = b) : No restrictions provided, trying solve(). Also, when I try RES <- gp(F0, g0, A="A", b=b) or gp(F0, g0) receiving the same result, I find out, that my equality constraints are not considered at all. In my view, the unconstraint problem should have (0, 0) as a solution, btw. Am I missing something fundamental? Thanks in advance! Wolfgang [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.