Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue between SymbolicWedderburn with SumsOfSquares #361

Open
kneshat opened this issue Jun 21, 2024 · 4 comments
Open

Compatibility issue between SymbolicWedderburn with SumsOfSquares #361

kneshat opened this issue Jun 21, 2024 · 4 comments

Comments

@kneshat
Copy link

kneshat commented Jun 21, 2024

Symmetry reduction does not work properly while doing SOS optimization. Here is a minimal example, which is similar to an example in the SumsOfSquares document. Here, I used poly = sum(x) + sum(x.^4) instead of poly = sum(x) + sum(x.^2)

import MutableArithmetics as MA
using MultivariatePolynomials
using MultivariateBases
using DynamicPolynomials
@polyvar x[1:3]
poly = sum(x) + sum(x.^4)
using PermutationGroups
G = PermGroup([perm"(1,2,3)",perm"(1,2)"])
import CSDP
solver = CSDP.Optimizer
model = Model(solver)
@variable(model, t)
@objective(model, Max, t)
pattern = Symmetry.Pattern(G, Symmetry.VariablePermutation())
con_ref = @constraint model poly - t in SOSCone() symmetry = pattern
optimize!(model)
value(t)

@kalmarek has checked the problem and said "Indeed this seems to be the problem with SumOfSquares.jl formulation, as SymbolicWedderburn.jl correctly reduces the optimization problem"

For more info:
https://discourse.julialang.org/t/symmetry-reduction-in-sumsofsquares/115727

@blegat
Copy link
Member

blegat commented Jun 21, 2024

Thanks, once #355 is merged, I'll rework the symmetry reduction part and take a look that this example

@kalmarek
Copy link
Contributor

@Khashayar-Neshat until then, if all you want is to solve the optimization problem and get the optimal value you may use sos_problem (or a modification of it). The actual model is created here

@kneshat
Copy link
Author

kneshat commented Jul 26, 2024

@blegat is there any change regarding this issue? I saw #355 was merged.

@blegat
Copy link
Member

blegat commented Jul 30, 2024

Things were on hold while I was away for JuMP-dev and ISMP but we're working on it. We need to figure out what's the best way to do this now with the new StarAlgebras

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants