ncpol2sdpa icon indicating copy to clipboard operation
ncpol2sdpa copied to clipboard

RuntimeError: The requested monomial ___ could not be found

Open grupot3 opened this issue 4 years ago • 1 comments

I'm getting the error RuntimeError: The requested monomial ___ could not be found

For instance, in this code

from ncpol2sdpa import *

X = generate_variables('x', 2)
obj = X[0]
inequalities = [X[1]]
sdp = SdpRelaxation(X)
sdp.get_relaxation(2, objective=obj, inequalities=inequalities,
                   chordal_extension=True)

the error appears, saying The requested monomial x0*x1 could not be found

However, in this other code (note that I've simply swiched X[1] and X[0]) the error does not appear

from ncpol2sdpa import *

X = generate_variables('x', 2)
obj = X[1]
inequalities = [X[0]]
sdp = SdpRelaxation(X)
sdp.get_relaxation(2, objective=obj, inequalities=inequalities,
                   chordal_extension=True)

grupot3 avatar Mar 29 '20 01:03 grupot3

Did you solve this problem? I came across the similar problem as well.

nnnnmj avatar Jul 20 '23 17:07 nnnnmj