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

(Tajiki) #1

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.

(Michael C. Grant) #2

Why not use equality constraints?

(Mark L. Stone) #3

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.

(Michael C. Grant) #4

Yes, but you actually explained it, so thank you

(Tajiki) #5

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,:)?

(Michael C. Grant) #6

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.