This is the first time I ask a question on the site. I am working in R and am looking to optimise the total biomethane production as the sum of that allowed by each substrate I mobilise. However, I have to respect some process constraints. My final mix of substrates must have a total Carbon/Nitrogen ratio of <30. In other words, the average Carbon/Nitrogen ratio weighted by the mobilised quantity of each substrate must be less than 30. Using the lpsolveapi package, I don't know how I can achieve this. Would you have an idea please? The constraint should look like this:
((Amount Substrate A * C/N Substrate A)/(Amount Substrate A + B)) + ((Amount Substrate B * C/N Substrate B)/(Amount Substrate A + B)) < 30
I thank you in advance for your help. Have a nice day