Hi!
I have a question about using imposing determinant as a constraint in JuMP
. Currently, I am trying to solve a problem that involve constraints of the form
where c is a given scalar. A and B are matrices of the same size.
I am aware that there are functions like RootDetConeSquare
that can impose constraints of the form \det(A)^{1/d} \geq t. But this is not what I need. So, I am wondering if there is a nice way to do it.
Besides, I also tried using LinearAlgebra.det
directly, but it seems the solvers I tried (e.g., KNITRO
, Ipopt
) do not register the function properly (I suspect that I did not register the operator correctly). Here is a MWE of what I tried:
model = Model(Ipopt.Optimizer)
@variable(model, x[1:3, 1:3])
@variable(model, y[1:3, 1:3])
dett(x...) = LinearAlgebra.det(reshape(collect(x), 3, 3))
@operator(model, f1, 9, (x...) -> dett(collect(x))[1])
@constraint(model, f1(x...) .== .5 * f1(y...))
@objective(model, Max, 1)
optimize!(model)
Any thoughts on this are very much appreciated. Thank you!