Skip to main content

Matrix-friendly python API, transponse of Mvar

Answered

Comments

2 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    Have you tried ignoring the transpose? The API tries to intuit how the matrix multiplication should be performed. E.g., I suspect the following would work:

    sum(v_pEV[i][:, t] @ B[i] @ v_pEV[i][:, t] for i in range(Nb) for t in range(Nt))

    If not, could you please post a minimal working example that includes the definitions of \(\texttt{v_pEV}\) and \(\texttt{B}\)?

    0
  • Orlando Valarezo
    Gurobi-versary
    First Comment
    First Question

    Hi Eli!

    Thanks so much for your kind reply. I followed your recommendation and ignored the transpose, effectively I didn't get errors!

    So I will continue with the implementation and when I get the final results I'll post an update.

     

    Many thanks!

    Orlando M. Valarezo

     

    0

Please sign in to leave a comment.