Easy way to scale model in JuMP?

I’m developing a linear solver for an optimization solver that requires a scaled constraint matrix. I am solving an LP, so the constraint matrix is constant. I would like to be able to scale the constraints within the optimization solver, so each row in the matrix has norm 1. Currently I’m doing it within the linear solver

foreach(normalize!,eachrow(A))

I would like to be doing this in JuMP instead so it only needs to be done once. Is there an efficient way to do this?

No, there is no efficient way to do this in JuMP. Doing it in the solver is probably the best approach.

You might also want to look at other normalization approaches. Here’s a paper you might be interested in
https://optimization-online.org/2020/12/8166/

1 Like

Thanks, I have already done some tests with some “offline” linear systems pulled from optimization problems, and this seemed best.

Normalizing in JuMP seemed most natural, because I’m not actually changing the underlying optimization problem (as long as I divide the RHS as well). I’ll do it within the solver then

1 Like