I know some parts of result, how to explain it for CVX

I have a MILP formulation. The variable is a 3 dimensional binary matrix. I know lots of it’s optimal values. For example suppose A(2020100) is the variable. I know that in optimal solution the A(1,1,i) equals to zero. A(2,2,i) is zero too. and so on.
As the solving time is very important in my context so how can i explain to CVX that some variables are determined.

Why not use equality constraints?

You can specify the known values as constraints. For example,

A(1,1,:) == 0
A(2,2,:) == 0

Edit: this is what mcg is talking about.

2 Likes

Yes, but you actually explained it, so thank you :slight_smile:

Thanks a lot
Is it efficient? As execution time is very important for me does CVX interpret A(1,1,:)==0 as a constraint or set the value of A(1,1,:)?

If execution time is very important to you then CVX is not your tool, which is focused on saving the modeler’s time, not the computer’s time.

That said, CVX will interpret that constraint “efficiently”, by not generating a variable at all.

1 Like