[R] Problem with function gp in package cccp

koiier m@iii@g oii scie@ce@iwi@@c@@t koiier m@iii@g oii scie@ce@iwi@@c@@t
Wed Jul 30 21:31:53 CEST 2025


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]]



More information about the R-help mailing list