-
Hi! First of all, thank you so much for the great framework! I am working on a fairly common optimization problem where we maximize performance vs. cost. Right now, I am simply minimizing total cost, but I was wondering if there was a way to decouple them (i.e. have the objective function be CAPEX + OPEX, but somehow pull out both CAPEX and OPEX from the result of the optimization). This leads on to another interesting question. Is there a way to track an intermediate value that changes due to your variables X, but is not a part of your objective function F? For example, if one were to optimize a shell-and-tube heat exchanger, the number of tubes in the heat exchanger will change as a function of Flowrate and Tube Diameter. So if Flowrate and Tube Diameter are both variables that are changing in the global optimization, then the number of tubes in each evaluation is set. Is there a way for us to pull intermediate values such as these out of the results of the minimize method? Thank you again! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, you can also store other attributes. Just write them to the |
Beta Was this translation helpful? Give feedback.
Yes, you can also store other attributes. Just write them to the
out
dictionary (in the_evaluate
function) like the objective values or constraints:out["AAA"] = x*2
You can later access it from the population object:
algorithm.opt.get("AAA")