I'm working in a simulation-optimization problem, for which I'm using Matlab. The simulation consists in solving a set of ODE's, which in turn gives information to calculate an objective function and performing optimization afterwards.
I have some constraints on variables from simulation (which are not directly optimization variables, e.g., purity of the product) so I had to declare them as optimization variables and then put nonlinear equality constraints on them (I declared them equal to the output of the simulation, i.e., the model results) to be consistent with the model (I hope I fully described the situation)
Has anybody been in this situation? It seems that it's difficult for fmincon to fulfill the equality constraints.
Thanks in advance.