There are several options available for ACADO users to help them debug their code.
In writing your model with ACADO's IntermediateState and DifferentialState, you are actually producing sxpression trees. Several options are available to inspect these trees.
Simply flush your Expression to a Function and flush this function into a file:
DifferentialState x,y; IntermediateState X=(some difficult expression involving x and y); Function f; f << X; FILE *file = fopen("debug.cpp", "w" ); file << f; fclose(file);
The two differential states in the generated C code are visible as x[0] and x[1] by default. If the differential states were declared with a name, they would appear with this name in the generated C code:
DifferentialState x("x"), y("y");
Introduce a Stream object to flush to stdout:
DifferentialState x,y; IntermediateState X=(some difficult expression involving x and y); Stream s; s << X;