Matrix multiplications and Inverse in OR TOOLS CP-SAT? Or in Constraint programming?

67 views Asked by At

I am trying to fomulate a matrix multipication and inverse equation in OR TOOLS CP-SAT using python.

The equation is as follows:

G = [  [-4, 2, 1],
       [-2, 2, 1],
       [-1, 1, 1]
    ]

C = [ [-2],
      [2],
      [1)
    ]

and I want to find W vector such as:

W = G(G⊺G)^−1 C

That is, G(G transpose G)invrse C

is this matrix multiplication and most importantly the INVERSE of the multiplication is possible to fomulate in CP - SAT??

Help will be appreciated :)

1

There are 1 answers

0
Laurent Perron On

CP-SAT is an integral only solver. So this is not a good start it cannot represent the general inverse of a matrix.

Now, if you expand all computations manually, this can be done. I am not sure CP-SAT is the right tool though. Maybe a symbolic solver.