Skip to main content

Matrix-friendly python API, transponse of Mvar

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • 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

Post is closed for comments.