Solved

Substitute for "sumproduct" Function in Excel

  • 16 March 2022
  • 2 replies
  • 34 views

Badge

Hey Guys,

I have a small problem by modeling my MILP.

I created a Matrix do define some Binary Variables. Now I want to create a constraint, which contains a multiplication between the Matrix of the Variables an a Matrix with some parameters. The result should be a scalar value comparable to the sumproduct-function in Excel. I want to do a multiplication between the matrices an the result should be a scalar?

Hopefully there is a simple function in Aimms to solve my problem.

I am thankful for every help!

Best regards

Simon

icon

Best answer by gdiepen 16 March 2022, 22:02

View original

2 replies

Userlevel 4
Badge +7

If the variables and the parameters share the same indices, this could be done with 

 

sum( (indexOne, indexTwo), yourParameter(indexOne, indexTwo) * BinaryVariable(indexOne, indexTwo))

 

If this is not what you mean, then please clarify a bit what you want to achieve

Badge

Thank you really much. I had a small mistake in the indices, which caused some problems in my Model.

Thanks a lot!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator