Skip to content

Nicer workflow for non-Float64 #444

Description

@jeremypparker

Thanks for all the work on v0.8

This now works:

using SumOfSquares
using DynamicPolynomials
using Hypatia
using DoubleFloats


model = GenericModel{Double64}(Hypatia.Optimizer{Double64})

@polyvar x

_1 = one(GenericAffExpr{Double64, GenericVariableRef{Double64}})

p = _1 + x^2

@constraint(model, p in SOSCone())

optimize!(model)

However, it's very fragile and fiddly: even replacing using _1 = one(Double64) causes an error. I guess there could be GenericSOSModel very easily, I'm more concerned about the issue of p having hidden Float64 inside.

Setting a domain in the constraint does not work either

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions