I'm trying to create a code that both calculates two contaminant levels and iterates w.r.t to one of the inputs to get them below their respective targets. There's a huge amount of code before the contaminants are calculated, so it would only be messy if I shared the entire code. I'll try my best with some pseudo-code/snippets of the calculations instead.
# pseudo inputs.
a = 10.0; b = 5.0; c = 15.0
d = 0.5; e = 1.0
# pseudo outputs
contaminant_1 = a * b + c
contaminant_2 = a * d + e
# target values
contaminant_1_target = 10.0
contaminant_2_target = 2.0
I want the code to use the input a to iterate in order to get contaminant_1 < contaminant_1_target and contaminant_2 < contaminant_2_target. Any tips on how I can do this?