Hi All,
I have a Pyomo model of a simple lab-scale chemical process. I am trying to conduct a model-based design of experiments. It involves solving an optimization problem with an objective function that is equal to the determinant of something called the Fisher Information Matrix; it is by definition is a (square) symmetric matrix. I have completed the model, and also evaluated the elements of the matrix.
The problem is that I cannot figure out a way to code in a rule for the objective function. This is because the number of kinetic parameters of the chemical process varies between each problem. The different number of kinetic parameters means that the size of the matrix varies. And I want a general rule function that can evaluate the determinant of my matrix for any number of kinetic parameters. I feel that it is possible to define a general rule function to evaluate the determinant of an arbitrary size matrix in Pyomo, it is just that I cannot come up with the formula.
My question is (i) if you guys can help me come up with the general formula, or (ii) point it out to me if I can use numpy's pre-written function to evaluate determinant and optimize my problem, or (iii) any other methods to solve my problem.
Many thanks for all your time, and any replies will be greatly appreciated.
I have attached my .py file containing my model and .dat the data for the model, I feel that it should not be necessary to understand the problem. But, it will be there for reference, in case it is needed.
Kind regards,
Kennedy