I am really sorry if this question is too basic. Before using all the advanced ideas in casADi, i.e. optimal control, sensitivity analysis etc, I just wish to make a simple time-domain simulation of my DAE model from t0 to tf. The idea is to simply plot the evolution of differential and algebraic variables over time (of the basic open loop system).
I have got started on the Robertson problem having formulated these as semi-explicit DAEs in MATLAB.
clear;close all;clc;format short g;
import casadi.*
y1 = SX.sym('y1');
y2 = SX.sym('y2');
y3 = SX.sym('y3');
dae = struct('x',[y1;y2],'z',y3,'ode',[-0.04*y1 + 1e4*y2*y3;0.04*y1 - 1e4*y2*y3 - (3e7)*y2.^2],'alg',y1+y2+y3-1);
F = integrator('F','idas',dae);
result = F('x0',[1;0],'z0',0);
disp(result.xf);
Any help on this is much appreciated.