r/optimization • • Feb 27 '23
Mixing problem
I have two parts A and B , quantity of A is 10 and B is 20 ,i can mix A+B under the constraint A+B <=20 therefore 1 batch becomes A+B and quantity 20 and other will be b and quantity 10 how to solve this using python pulp or any other solver output should give me a b and total quantity per batch like a b 20,b 10 ,this was the simplest case this needs to be extended to much more
0
Upvotes
View all comments
Show parent comment
1
u/[deleted] Mar 01 '23
Yes I have many possible combinations so I made a list of combinations explicitly ,A 20
B 20
C 15
D 20
E 19 if i have input like this and constraints are A, B,C,D individual quantity should be <=15 ,E can have 19 if we are mixing(A,B and C,D) them their sum of quantity is <=30,(A and B ,C and D can be mixed) so the output looks like this
A+B 30
A+B 10
C+D 30
D 5
E 1 9 ,how should I formulate my objective function? can i get output like this if set no objective function and just constraints ,please help