1

could you please help with idea of realisation of solver from Excel (with function, restraints and variables). I have read answer to question 58002755, as well as the very question, but haven't caught the whole idea.

I have invoices and their amount (a). I need to assign them to calculated sums (b). So I have matrix of variables (x). X is equal 0-1 (I can assign not full amount of invoice to calculated sum b, but it's better to have mostly 1s as a variable, not many non-integrals (in Excel there is possibility to have constraint of the variables for them to be only integer). The next level of the task is to assign invoices depending on their expense group (ex. KG391 in first column amounts 2.900 and I need to choose invoices with this type of expense =KG391). Is it possible to solve? What should I start with?)

     2900,174, 50, 50
 -2830[ 1, 0, 0, 0]
  -70 [ 1, 0, 0, 0]
  -174[ 0, 1, 0, 0]
  -100[ 0, 0,0.5,0.5]
 -2830*1-70*1 + 2900 = 0, -174*1 + 174 = 0, -100*0,5 +50 = 0
     

enter image description here

Elina
  • 23
  • 6
  • Hello and welcome. Even though appreciating your work for the example, please make it a bit easier for everyone to help you. Have a look at [How to make good reproducible pandas examples](https://stackoverflow.com/a/20159305/12242625). And also I suggest to produce a "expected output", this is mostly way easier and faster to understand. Good luck. – Marco_CH Jan 16 '22 at 17:38
  • 1
    I'll try to add more details, thank you! – Elina Jan 16 '22 at 18:04

0 Answers0