Problems with integrator with external initial conditions

2 views (last 30 days)
Channgin from Matlabe version 2009a to 2014a I detected that the real time code of the integrator block with external initial condition seems to have changed. I generate a model library in Windows which I use to solve an optimization problem. One of the optimization variable is an integrator with external initial condition. In Matlab version 2009a the optimization problem could be solved because the integrator state could be overwritten and used optimization variable. In Matlab version 2014a the optimization does not work any longer because the state does not change. Changing the integrator initial condition from external to internal initial conditon solves the optimization problem correctly BUT the overall model behaviour is not what I want.
Is there a nicer way to solve the problem than to introduce a switch where I differ between 'normal' model run and optimization run?

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!