The initial condition of a state variable can be calculated with m.free_initial(x). You create an objective to align model (x) with measurement in IMODE=5 only with Controlled Variable CV type. Otherwise, you can define your own objective function such as m.Minimize((x-xm)**2) where xm is the measurement. If you have a specific code question, I recommend that you post it to StackOverflow with tag gekko.
The initial condition of a state variable can be calculated with
m.free_initial(x)
. You create an objective to align model (x
) with measurement inIMODE=5
only with Controlled VariableCV
type. Otherwise, you can define your own objective function such asm.Minimize((x-xm)**2)
wherexm
is the measurement. If you have a specific code question, I recommend that you post it to StackOverflow with tag gekko.