<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>ACADO Toolkit - Forum</title>
<description>This is the ACADO (Automatic Control and Dynamic Optimization) forum. Post all your questions, bug reports and feature requests here! Registered forum users can receive updates and our newsletter by e-mail.</description><link>http://forum.acadotoolkit.org/index.php</link><lastBuildDate>Sun, 20 May 2012 00:39:12 +0000</lastBuildDate>
<generator>Phorum 5.2.15a</generator>
<item>
<guid>http://forum.acadotoolkit.org/read.php?1,253,253#msg-253</guid>
<title>Forum registration closed due to spam issues</title><link>http://forum.acadotoolkit.org/read.php?1,253,253#msg-253</link><description><![CDATA[ Please send your questions by mail (see contact page)]]></description>
<dc:creator>David</dc:creator>
<category>Announcements / Releases</category><pubDate>Sat, 22 Jan 2011 15:10:28 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,211,252#msg-252</guid>
<title>Re: examples/modeling_tools</title><link>http://forum.acadotoolkit.org/read.php?5,211,252#msg-252</link><description><![CDATA[ Oh, and the example above makes use of a custom function <b>TxyRz</b>, which I defined as follows:<br /><br />(in kinetics_tools.cpp)<br /><pre class="bbcode">
Expression TxyRz(const Expression &amp;x, const Expression &amp;y, const Expression &amp;angle) {

  IntermediateState T = tr(x,y,0);
  IntermediateState R = Rz(angle);

  T(0,0) = R(0,0);  T(0,1) = R(0,1);  T(0,2) = R(0,2);
  T(1,0) = R(1,0);  T(1,1) = R(1,1);  T(1,2) = R(1,2);
  T(2,0) = R(2,0);  T(2,1) = R(2,1);  T(2,2) = R(2,2);
  
  return T;
}
</pre>]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>General Help</category><pubDate>Sat, 22 Jan 2011 13:02:31 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,211,251#msg-251</guid>
<title>Re: examples/modeling_tools</title><link>http://forum.acadotoolkit.org/read.php?5,211,251#msg-251</link><description><![CDATA[ For anyone who's interested, I've discovered that the modeling_tools *are* essentially working. I've personally tested Frames and LagrangianFormalism in v1.0.2367beta, and found them working.<br /><br />The examples are a little out-dated and won't compile 'out of the box' though. For instance, they refer to &quot;DifferentialStateVector&quot;, but the class is now named &quot;DifferentialState&quot;.<br /><br />It's a little long, but for the purpose of helping new users (like myself) get started with these modeling tools, I'm going to post a currently-working non-trivial example of Frame and LagrangianFormalism usage here. This optimal control example demonstrates a series of 3 links connected by 2 powered revolute joints, in 2D. I hope it's useful!<br /><br />(I'd like to extend this example in several ways, but I'm having trouble - I'll make another post about that soon).<br /><br /><pre class="bbcode">
#include &lt;acado_toolkit.hpp&gt;

#define PI (atan(1.0)*4.0)

using namespace std;
USING_NAMESPACE_ACADO

int main(int argc, char *argv[])
{
	const double g     = 9.81;		// gravitational acceleration

	const double L1    = 2.0;		// length of the first link
	const double L2    = 1.0;		// length of the second link
	const double L3    = 1.0;		// length of the third link

	const double m1    = 5.0;		// mass of the first link
	const double m2    = 10.0;		// mass of the second link
	const double m3    = 10.0;		// mass of the third link

	const double I1 = (m1*pow(L1,2))/12.0;	//inertia moments
	const double I2 = (m2*pow(L2,2))/12.0;
	const double I3 = (m3*pow(L3,2))/12.0;


	// DEFINE VARIABLES:
	// ---------------------------
	DifferentialState   q(5);	// the generalized coordinates (x,y,theta1,theta2,theta3)
	DifferentialState  dq(5);	// the associated velocities
	DifferentialState ddq(5);	// the associated accelerations (unused here, but fWorld requires it?)

	Control jointTorque(2);		// joint torques


	// DEFINE FRAMES:
	// ---------------------------
	Frame fWorld(&quot;world&quot;,q,dq,ddq);
	
	Frame fLink1a(&quot;link1a&quot;,fWorld,TxyRz(q(0),q(1),q(2)));
	Frame fLink1CoM(&quot;link1CoM&quot;,fLink1a,tr(0,-L1/2.0,0));
	Frame fLink1b(&quot;link1b&quot;,fLink1a,tr(0,-L1,0));
	
	Frame fLink2a(&quot;link2a&quot;,fLink1b,TRz(q(3)));
	Frame fLink2CoM(&quot;link2CoM&quot;,fLink2a,tr(0,-L2/2.0,0));
	Frame fLink2b(&quot;link2b&quot;,fLink2a,tr(0,-L2,0));

	Frame fLink3a(&quot;link3a&quot;,fLink2b,TRz(q(4)));
	Frame fLink3CoM(&quot;link3CoM&quot;,fLink3a,tr(0,-L3/2.0,0));
	Frame fLink3b(&quot;link3b&quot;,fLink3a,tr(0,-L3,0));
	
	
	// COMPUTE POSITIONS AND VELOCITIES:
	// ---------------------------
	//link 1 values
	IntermediateState link1aPos = pos(fLink1a,fWorld).getCoords();
	IntermediateState link1CoMPos = pos(fLink1CoM,fWorld).getCoords();
	IntermediateState link1bPos = pos(fLink1b,fWorld).getCoords();
	IntermediateState link1CoMVel = vel(fLink1CoM,fWorld,fWorld).getCoords();
	IntermediateState link1AngVel = rotVel(fLink1CoM,fWorld,fWorld).getCoords();

	//link 2 values
	IntermediateState link2aPos = pos(fLink2a,fWorld).getCoords();
	IntermediateState link2CoMPos = pos(fLink2CoM,fWorld).getCoords();
	IntermediateState link2bPos = pos(fLink2b,fWorld).getCoords();
	IntermediateState link2CoMVel = vel(fLink2CoM,fWorld,fWorld).getCoords();
	IntermediateState link2AngVel = rotVel(fLink2CoM,fWorld,fWorld).getCoords();

	//link 3 values
	IntermediateState link3aPos = pos(fLink3a,fWorld).getCoords();
	IntermediateState link3CoMPos = pos(fLink3CoM,fWorld).getCoords();
	IntermediateState link3bPos = pos(fLink3b,fWorld).getCoords();
	IntermediateState link3CoMVel = vel(fLink3CoM,fWorld,fWorld).getCoords();
	IntermediateState link3AngVel = rotVel(fLink3CoM,fWorld,fWorld).getCoords();


	// COMPUTE THE KINETIC ENERGY T AND THE POTENTIAL V:
	// -------------------------------------------------
	IntermediateState T =
		(0.5*m1*link1CoMVel.getSumSquare()) + (0.5*I1*link1AngVel.getSumSquare()) +
		(0.5*m2*link2CoMVel.getSumSquare()) + (0.5*I2*link2AngVel.getSumSquare()) +
		(0.5*m3*link3CoMVel.getSumSquare()) + (0.5*I3*link3AngVel.getSumSquare());

	IntermediateState V =
		m1*link1CoMPos(1)*g +
		m2*link2CoMPos(1)*g +
		m3*link3CoMPos(1)*g;

	IntermediateState Q(1,5);

	//joint torques
	Q(3) += jointTorque(0);
	Q(4) += jointTorque(1);


	// AUTOMATICALLY DERIVE THE EQUATIONS OF MOTION BASED ON THE LAGRANGIAN FORMALISM:
	// -------------------------------------------------------------------------------
	DifferentialEquation  f;
	LagrangianFormalism( f, T - V, Q, q, dq );

	
	// DEFINE AN OPTIMAL CONTROL PROBLEM:
	// ---------------------
	double t_start    =   0.0;
	double t_end      =   2.0;
	OCP ocp( t_start, t_end, 40 );
	ocp.minimizeMayerTerm( jointTorque.getSumSquare() );
	ocp.subjectTo( f );
	
	//links must stay above ground plane
	ocp.subjectTo( link1aPos(1) &gt;= 0.0 );
	ocp.subjectTo( link1bPos(1) &gt;= 0.0 );
	ocp.subjectTo( link2aPos(1) &gt;= 0.0 );
	ocp.subjectTo( link2bPos(1) &gt;= 0.0 );
	ocp.subjectTo( link3aPos(1) &gt;= 0.0 );
	ocp.subjectTo( link3bPos(1) &gt;= 0.0 );

	//some arbitrary constraints to make it do something interesting
	ocp.subjectTo( AT_START, q(2) == 0.0 );
	ocp.subjectTo( AT_END, q(2) == 2*PI );

	ocp.subjectTo( AT_START, q(3) == 0.0 );
	ocp.subjectTo( 20, q(3) == 2.0 );
	ocp.subjectTo( AT_END, q(3) == 0.0 );

	ocp.subjectTo( AT_START, q(4) == 0.0 );
	ocp.subjectTo( 20, q(4) == 2.0 );
	ocp.subjectTo( AT_END, q(4) == 0.0 );

	OptimizationAlgorithm algorithm(ocp);
	algorithm.set( KKT_TOLERANCE, 1e-2 );	//accuracy isn't that important  :)
	algorithm.solve();
		
	VariablesGrid rx;
	algorithm.getDifferentialStates(rx);
	

	// OUTPUT RESULTS
	// (this BVH can be loaded by Blender 2.5 for visualization)
	// ---------------------
	FILE *file = fopen(&quot;ThreeLinks.bvh&quot;, &quot;w&quot; );
	acadoFPrintf(file, &quot;HIERARCHY\n&quot;);
	acadoFPrintf(file, &quot;ROOT Link1\n&quot;);
	acadoFPrintf(file, &quot;{\n&quot;);
	acadoFPrintf(file, &quot;\tOFFSET	0.00	0.00	0.00\n&quot;);
	acadoFPrintf(file, &quot;\tCHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation\n&quot;);
	acadoFPrintf(file, &quot;\tJOINT Link2\n&quot;);
	acadoFPrintf(file, &quot;\t{\n&quot;);
	acadoFPrintf(file, &quot;\t\tOFFSET	 0.00	 -%f	 0.00\n&quot;, L1);
	acadoFPrintf(file, &quot;\t\tCHANNELS 3 Zrotation Xrotation Yrotation\n&quot;);
	acadoFPrintf(file, &quot;\t\tJOINT Link3\n&quot;);
	acadoFPrintf(file, &quot;\t\t{\n&quot;);
	acadoFPrintf(file, &quot;\t\t\tOFFSET	 0.00	 -%f	 0.00\n&quot;, L2);
	acadoFPrintf(file, &quot;\t\t\tCHANNELS 3 Zrotation Xrotation Yrotation\n&quot;);
	acadoFPrintf(file, &quot;\t\t\tEnd Site\n&quot;);
	acadoFPrintf(file, &quot;\t\t\t{\n&quot;);
	acadoFPrintf(file, &quot;\t\t\t\tOFFSET	 0.00	 -%f	 0.00\n&quot;, L3);
	acadoFPrintf(file, &quot;\t\t\t}\n&quot;);
	acadoFPrintf(file, &quot;\t\t}\n&quot;);
	acadoFPrintf(file, &quot;\t}\n&quot;);
	acadoFPrintf(file, &quot;}\n&quot;);

	acadoFPrintf(file, &quot;MOTION\n&quot;);
	acadoFPrintf(file, &quot;Frames: %i\n&quot;, rx.getLastIndex());
	acadoFPrintf(file, &quot;Frame Time: %f\n&quot;, 0.05);
	for(uint t = 0; t &lt; rx.getLastIndex(); t++)
	{
		Vector v = rx.getVector(t);

		//position of link 1 (root)
		acadoFPrintf(file, &quot;%f &quot;, 0.0);
		acadoFPrintf(file, &quot;%f &quot;, v(0));
		acadoFPrintf(file, &quot;%f &quot;, v(1));

		//rotation of link 1 (root)
		acadoFPrintf(file, &quot;%f &quot;, 0.0);
		acadoFPrintf(file, &quot;%f &quot;, (v(2)+(PI/2.0)) * (180.0/PI));
		acadoFPrintf(file, &quot;%f &quot;, 0.0);

		//rotation of link 2
		acadoFPrintf(file, &quot;%f &quot;, 0.0);
		acadoFPrintf(file, &quot;%f &quot;, (v(3)) * (180.0/PI));
		acadoFPrintf(file, &quot;%f &quot;, 0.0);

		//rotation of link 3
		acadoFPrintf(file, &quot;%f &quot;, 0.0);
		acadoFPrintf(file, &quot;%f &quot;, (v(4)) * (180.0/PI));
		acadoFPrintf(file, &quot;%f &quot;, 0.0);

		//end line
		acadoFPrintf(file, &quot;\n&quot;);
	}
	acadoFPrintf(file, &quot;\n&quot;);
	fclose(file);

	return 0;
}</pre><br />Cheers,<br />Spacecookies]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>General Help</category><pubDate>Sat, 22 Jan 2011 12:49:53 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,249,249#msg-249</guid>
<title>pow(Expression, double) with LagrangianFormalism results in 1.#QNAN0</title><link>http://forum.acadotoolkit.org/read.php?6,249,249#msg-249</link><description><![CDATA[ Hi there,<br /><br />In 1.0.2367beta, using the pow(Expression, double) function in the LagrangianFormalism results in a solution from the integrator consisting entirely of 1.#QNAN0.<br /><br />Test case:<br /><pre class="bbcode">
#include &lt;acado_toolkit.hpp&gt;

using namespace std;
USING_NAMESPACE_ACADO

int main(int argc, char *argv[])
{
	const double g	= 9.81;	// gravitational acceleration
	const double m	= 5.0;	// mass
	
	// DEFINE VALRIABLES:
	// ---------------------------
	DifferentialState   q(1);   // the generalized coordinate of the particle (y-axis)
	DifferentialState  dq(1);   // the associated velocities

	// COMPUTE THE KINETIC ENERGY T AND THE POTENTIAL V:
	// -------------------------------------------------
	IntermediateState dq0Sqr = pow(dq(0),2);	// doesn't work! (solution is 1.#QNAN0)
	//IntermediateState dq0Sqr = dq(0)*dq(0);	// works

	IntermediateState T = 0.5*m*(dq0Sqr);
	IntermediateState V = m*q(0)*g;	//gravity on y-axis
	

	// AUTOMATICALLY DERIVE THE EQUATIONS OF MOTION BASED ON THE LAGRANGIAN FORMALISM:
	// -------------------------------------------------------------------------------
	DifferentialEquation  f;
	LagrangianFormalism( f, T - V, q, dq );

	// Define an integrator:
	// ---------------------
	double t_start    =   0.0;
	double t_end      =   3.0;
	double q_start[2] = {0.0, 0.0};	//y-axis, y-axis velocity

	IntegratorBDF integrator( f );
	integrator.set( INTEGRATOR_PRINTLEVEL, HIGH );
	integrator.set( INTEGRATOR_TOLERANCE, 1e-5 );

	Grid timeInterval(t_start, t_end, 60 );
	integrator.integrate(timeInterval, q_start);

	// Output solution:
	// ---------------------
	VariablesGrid rx;
	integrator.getX(rx);

	FILE *file = fopen(&quot;solution.txt&quot;, &quot;w&quot; );
	for(int t = 0; t &lt; rx.getLastIndex(); t++)
	{
		Vector v = rx.getVector(t);
		acadoFPrintf(file, &quot;%f\n&quot;, v(0));
	}
	fclose(file);

	return 0;
}</pre><br />Expected output:<br /><pre class="bbcode">
0.000000
-0.012682
-0.050727
-0.114135
etc...</pre><br />Actual output:<br /><pre class="bbcode">
0.000000
1.#QNAN0
1.#QNAN0
1.#QNAN0
etc...</pre><br />Thanks,<br />Spacecookies]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>Bug Reports</category><pubDate>Sat, 22 Jan 2011 01:50:48 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,246,248#msg-248</guid>
<title>Re: Multiplication of Matrix and Scalar - Error</title><link>http://forum.acadotoolkit.org/read.php?6,246,248#msg-248</link><description><![CDATA[ Hi Spacecookies,<br /><br />thank you very much for your response and the solution.<br />That makes perfect sense now and helps a lot! Somehow I had not noticed that operator* was missing from the Matrix class for doubles...<br /><br />Best wishes,<br />Tobias]]></description>
<dc:creator>Tobias</dc:creator>
<category>Bug Reports</category><pubDate>Fri, 21 Jan 2011 08:57:03 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,246,247#msg-247</guid>
<title>Re: Multiplication of Matrix and Scalar - Error</title><link>http://forum.acadotoolkit.org/read.php?6,246,247#msg-247</link><description><![CDATA[ Hi Tobias,<br /><br />Basically, the Matrix class doesn't define an operator* that takes a double - just Matrix and Vector:<br /><br />(in matrix.hpp)<br /><pre class="bbcode">
/** Multiplies a matrix from the right to the matrix object and
		 *  stores the result to a temporary object.
		 *  \return Temporary object containing result of multiplication. */
		inline Matrix operator*(	const Matrix&amp; arg	/**&lt; Matrix factor. */
									) const;
/** Multiplies a vector from the right to the matrix object and
		 *  stores the result to a temporary object.
		 *  \return Temporary object containing result of multiplication. */
		inline Vector operator*(	const Vector&amp; arg	/**&lt; Vector factor. */
									) const;</pre><br />There might be a good reason it's left out... but if you wanted, you could add it yourself:<br /><pre class="bbcode">
/** Multiplies a double from the right to the matrix object and
		 *  stores the result to a temporary object.
		 *  \return Temporary object containing result of multiplication. */
		inline Matrix operator*(	const double&amp; scalar	/**&lt; Scalar factor. */
									) const;</pre><br />You would also need to add an implementation:<br /><br />(in matrix.ipp)<br /><pre class="bbcode">
inline Matrix Matrix::operator*(	const double&amp; scalar
									) const
{
	Matrix result( *this );
	result *= scalar;
	return result;
}</pre><br />And you would need to swap A and 5.0, when you call it:<br /><pre class="bbcode">
A = A * 5.0;</pre><br />Result:<br /><pre class="bbcode">
The matrix 5.0*A is:
[       5.0000000000000000e+000 5.0000000000000000e+000 ]
[       0.0000000000000000e+000 1.0000000000000000e+001 ]

The matrix 5.0*A is:
[       2.5000000000000000e+001 2.5000000000000000e+001 ]
[       0.0000000000000000e+000 5.0000000000000000e+001 ]</pre><br />Regards,<br />Spacecookies]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>Bug Reports</category><pubDate>Fri, 21 Jan 2011 03:32:36 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,246,246#msg-246</guid>
<title>Multiplication of Matrix and Scalar - Error</title><link>http://forum.acadotoolkit.org/read.php?6,246,246#msg-246</link><description><![CDATA[ Hi,<br /><br />I'm getting an error message when doing a simple multiplication of a scalar and a matrix, but due to my limited C++ knowledge have no idea what is missing.<br /><br />The following example code raises the error message &quot;|error: no match for 'operator=' in 'A = ACADO::operator*(const double&amp;, const ACADO::Expression&amp;)(((const ACADO::Expression&amp;)(&amp;Expression(((const ACADO::Matrix&amp;)((const ACADO::Matrix*)(&amp;A)))))))'|&quot;<br /><br /><pre class="bbcode">
#include &lt;acado/include/acado_optimal_control.hpp&gt;

int main() {

    USING_NAMESPACE_ACADO

    Matrix A(2,2);
    A(0,0) = 1.0;  A(0,1) = 1.0;
    A(1,0) = 0.0;  A(1,1) = 2.0;

    // works
    printf(&quot;\nThe matrix 5.0*A is:\n&quot;);
    A *= 5.0;
    A.print();

    // does not work
    printf(&quot;\nThe matrix 5.0*A is:\n&quot;);
    A = 5.0 * A;
    A.print();

    return 0;
}</pre><br />The multiplication A *= 5.0; works fine, but A = 5.0 * A; fails with the error.<br /><br />I would be really glad about any help!<br /><br />Thank you very much!<br />Tobias]]></description>
<dc:creator>Tobias</dc:creator>
<category>Bug Reports</category><pubDate>Wed, 19 Jan 2011 12:42:46 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,193,237#msg-237</guid>
<title>Re: Constraints implementation</title><link>http://forum.acadotoolkit.org/read.php?5,193,237#msg-237</link><description><![CDATA[ Can anyone tell me something about this, or where could I look it?<br /><br />(Sorry about the insistence)<br /><br />Thanks in advance!<br /><br />Fernando]]></description>
<dc:creator>ferqtpo</dc:creator>
<category>General Help</category><pubDate>Mon, 17 Jan 2011 09:50:26 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,233,233#msg-233</guid>
<title>Exporting to a C function - variable names not used</title><link>http://forum.acadotoolkit.org/read.php?6,233,233#msg-233</link><description><![CDATA[ In the tutorial <a href="http://www.acadotoolkit.org/tutorials/inspect.php#Method1" rel="nofollow" >Inspecting IntermediateStates, DifferentialStates and Expressions</a>, under Method 1: Exporting to a C function, it says &quot;If the DifferentialStates were declared with a name, they would appear with this name in the generated C code.&quot;<br /><br />In my tests with 1.0.2367beta though, this doesn't seem to work. The variables are always named acado_xd[0], acado_xd[1] etc...<br /><br />Test case:<br /><pre class="bbcode">
#include &lt;acado_toolkit.hpp&gt;

using namespace std;
USING_NAMESPACE_ACADO

int main(int argc, char *argv[])
{
	DifferentialState x(&quot;x&quot;),y(&quot;y&quot;);
	IntermediateState v = x * y + x;
	Function f;
	f &lt;&lt; v;
	FILE *file = fopen(&quot;debug.cpp&quot;, &quot;w&quot; );
	file &lt;&lt; f;
	fclose(file);
}</pre><br />Expected output:<br /><pre class="bbcode">
// COMPUTE THE INTERMEDIATE STATES:
// --------------------------------
acadoWorkspace.acado_aux[0] = ((x*y)+x);</pre><br />Actual output:<br /><pre class="bbcode">
// COMPUTE THE INTERMEDIATE STATES:
// --------------------------------
acadoWorkspace.acado_aux[0] = ((acado_xd[0]*acado_xd[1])+acado_xd[0]);</pre><br />(Additionally there is a small typo in the tutorial... flcose(file) should be fclose(file).)]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>Bug Reports</category><pubDate>Mon, 17 Jan 2011 00:53:38 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?12,232,232#msg-232</guid>
<title>How Do I debug C++ files in matlab?</title><link>http://forum.acadotoolkit.org/read.php?12,232,232#msg-232</link><description><![CDATA[ Debugging in WINDOWS, Microsoft Visual C++ EXPRESS<br /><ol type="1"><li>Open make.m</li><li>Set the DEBUG flag to 1</li><li>Run make.m</li><li>Start Microsoft Visual C++ Express Edition. Do not exit your MATLAB session.</li><li>From the menu, select Tools -&gt; Attach to process</li><li>In the Process GUI that opens, select the MATLAB.exe process and click Attach</li><li>You can now close the Process GUI if you wish.</li><li>Open the source files by selecting File -&gt; Open-&gt;File</li><li>Set a breakpoint on the desired line of code by right-clicking on the line of code, and selecting Insert Breakpoint. If you have not run the model yet and the breakpoint shows up with a &quot;?&quot; in it, do not worry. The .mexw32 file will load when you run the model.</li><li>Start the simulation in matlab (eg. run getting_started.m), and you should be running the S-function in the Microsoft Development Environment.</li></ol><br /><br />Debugging in UNIX<br />See <a href="http://www.mathworks.com/support/tech-notes/1800/1819.html" rel="nofollow" >http://www.mathworks.com/support/tech-notes/1800/1819.html</a><br /><br /><br /><br />Other interesting documentation<br />* Matlab MEX guide<br /><a href="http://www.mathworks.com/support/tech-notes/1600/1605.html" rel="nofollow" >http://www.mathworks.com/support/tech-notes/1600/1605.html</a><br /><br />* Installing Microsoft Visual C++ EXPRESS for Windows<br /><a href="http://www.microsoft.com/Express/VC/" rel="nofollow" >http://www.microsoft.com/Express/VC/</a><br /><br />* Installing GCC for Windows (MinGW and GNUMEX)<br /><a href="http://gnumex.sourceforge.net/" rel="nofollow" >http://gnumex.sourceforge.net/</a><br /><a href="http://www.mingw.org/wiki/MinGWiki" rel="nofollow" >http://www.mingw.org/wiki/MinGWiki</a>]]></description>
<dc:creator>David</dc:creator>
<category>FAQ</category><pubDate>Sun, 16 Jan 2011 07:42:44 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,211,211#msg-211</guid>
<title>examples/modeling_tools</title><link>http://forum.acadotoolkit.org/read.php?5,211,211#msg-211</link><description><![CDATA[ Hi all,<br /><br />I started experimenting with the acado toolkit (v1.0.2367beta) today, and so far I'm very impressed! I was particularly thrilled to see the examples/modeling_tools directory. This would seem to make the specification of mechanical systems *much* easier.<br /><br />However, the modeling_tools examples are not built by default. I attempted to build them with:<br /><pre class="bbcode">
cd examples/modeling_tools
make</pre><br />But there are some compiler errors...<br /><pre class="bbcode">
$ make
Creating spinningtop.exe
g++ -o spinningtop.exe -DLINUX -Wall -pedantic -Wfloat-equal -Wshadow -Winline -
D__DEBUG__ -g -O0 -finline-functions spinningtop.o -L../../libs   -lacado_toolki
t -lqpOASESextras2.0 -lcsparse
spinningtop.o: In function `main':
/cygdrive/c/lib/ACADOtoolkit/examples/modeling_tools/spinningtop.cpp:47: undefin
ed reference to `ACADO::Frame::Frame(ACADO::String const&amp;, ACADO::Expression con
st&amp;, ACADO::Expression const&amp;, ACADO::Expression const&amp;)'
/cygdrive/c/lib/ACADOtoolkit/examples/modeling_tools/spinningtop.cpp:48: undefin
ed reference to `tr(ACADO::Expression const&amp;, ACADO::Expression const&amp;, ACADO::E
xpression const&amp;)'
/cygdrive/c/lib/ACADOtoolkit/examples/modeling_tools/spinningtop.cpp:48: undefin
ed reference to `TRy(ACADO::Expression const&amp;)'
/cygdrive/c/lib/ACADOtoolkit/examples/modeling_tools/spinningtop.cpp:48: undefin
ed reference to `TRz(ACADO::Expression const&amp;)'
/cygdrive/c/lib/ACADOtoolkit/examples/modeling_tools/spinningtop.cpp:48: undefin
ed reference to `ACADO::Frame::Frame(ACADO::String const&amp;, ACADO::Frame const&amp;,
ACADO::Expression const&amp;)'

Etc...</pre><br />It looks like an #include is missing. Before I debug further though, I thought I would simply ask about the state of these modeling_tools and their examples. Should they be working or are they still a 'work in progress'?<br /><br />Thanks!<br />Spacecookies]]></description>
<dc:creator>Spacecookies</dc:creator>
<category>General Help</category><pubDate>Fri, 14 Jan 2011 01:24:10 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,194,194#msg-194</guid>
<title>cosine multiplication bug</title><link>http://forum.acadotoolkit.org/read.php?6,194,194#msg-194</link><description><![CDATA[ Hi there, and happy newyear!<br /><br />The master student Jan Goos just noticed a very weird bug in acado (1.0.2367beta release, not checked with svn trunk).<br /><br />The bugreport is committed as /tests/bugreports/bug4.cpp, but the important part is included here:<br /><pre class="bbcode">

	IntermediateState	x						= 0.0;

	IntermediateState v(6);

  v(0)=cos(x);
  v(1)=cos(x)*1.0;
  v(2)=cos(x)*1;
  v(3)=cos(x)/1;
  v(4)=1.0*cos(x);
  v(5)=cos(0)*1.0;</pre><br />v should evaluate to a vector with all zeros, but v(1) and v(2) are displayed as 0.0<br />We can avoid the bug for now, but it should be looked at.<br /><br />regards,<br />Joris]]></description>
<dc:creator>jgillis</dc:creator>
<category>Bug Reports</category><pubDate>Mon, 03 Jan 2011 23:33:21 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,193,193#msg-193</guid>
<title>Constraints implementation</title><link>http://forum.acadotoolkit.org/read.php?5,193,193#msg-193</link><description><![CDATA[ Hello all,<br /><br />My name is Fernando, this is my first post here. Thanks a lot for your software, and your effort.<br /><br />I have a question about how the constraints are implemented. If I have a constraint of the type f(y,x,t)-limitmax &lt; 0 (limitmax is a number, and f(y,x,t) a expression that depends on the states,algebraic and/or control variables), in an OCP problem, which is the constraint value what is sent to the NLP solver, i.e, is the maximum of that difference f(y,x,t)-limitmax (when it is greater than zero) in the integration? is the area of the integration in which f is greater than limitmax, etc??<br /><br />Thanks in advance!!<br /><br />Greetings<br /><br />Fernando]]></description>
<dc:creator>ferqtpo</dc:creator>
<category>General Help</category><pubDate>Wed, 29 Dec 2010 14:30:14 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?8,192,192#msg-192</guid>
<title>single shooting</title><link>http://forum.acadotoolkit.org/read.php?8,192,192#msg-192</link><description><![CDATA[ Hi,<br /><br />I have installed 1.0.2367beta release, compiled the Matlab interface, and run the package successfully.<br /><br />I was trying to set the discretization mode to single shooting using<br /><br />algo=acado.OptimizationAlgorithm(ocp);<br />algo.set('DISCRETIZATION_TYPE','SINGLE_SHOOTING');<br /><br />but received same results.<br /><br />Is single shooting supported in this release?<br /><br />msz]]></description>
<dc:creator>msz</dc:creator>
<category>General Help</category><pubDate>Tue, 21 Dec 2010 07:58:13 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,183,191#msg-191</guid>
<title>Re: The use of INTERMEDIATESTATES</title><link>http://forum.acadotoolkit.org/read.php?5,183,191#msg-191</link><description><![CDATA[ Hello Jonas,<br /><br />I'm not totally sure, but I think that Intermediate States are not what you need here. Intermediate States are used for a faster calculation of &quot;expensive&quot; expressions and functions, but not for constraints along a path.<br /><br />I don't know what the right approach for your problem is, but why don't you separate your trajectory planing into two problems:<br /><br />First: START_POINT to INTERMEDIATE_POINT, with a free end time T1<br />Second: INTERMEDIATE_POINT to END_POINT again with a free end time T2<br /><br />Regards,<br />Tobias]]></description>
<dc:creator>Tobias</dc:creator>
<category>General Help</category><pubDate>Sun, 19 Dec 2010 12:04:52 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,183,190#msg-190</guid>
<title>Re: The use of INTERMEDIATESTATES</title><link>http://forum.acadotoolkit.org/read.php?5,183,190#msg-190</link><description><![CDATA[ Is there an answer for this problem in Acado available?<br /><br />Thanks<br />Jonas]]></description>
<dc:creator>Jonas</dc:creator>
<category>General Help</category><pubDate>Sat, 18 Dec 2010 12:37:59 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,186,186#msg-186</guid>
<title>setting decomposition</title><link>http://forum.acadotoolkit.org/read.php?5,186,186#msg-186</link><description><![CDATA[ Is it possible to set Cholesky decomposition? I have NLP problem and in each iterate of SQP i would like to apply Cholesky decomposition while solving QP problem by active-set method. I have no idea how to do that. Anyone can help me?]]></description>
<dc:creator>ukasz</dc:creator>
<category>General Help</category><pubDate>Mon, 13 Dec 2010 01:10:03 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,183,183#msg-183</guid>
<title>The use of INTERMEDIATESTATES</title><link>http://forum.acadotoolkit.org/read.php?5,183,183#msg-183</link><description><![CDATA[ Hi,<br /><br />I would like to use Intermediate states to generate a trajectory with fixed points between start end end positions.<br /><br />For example in 2D : calculation of optimal path (with dynamics as constrains and minimize to time)<br /><br />START point = (1,1)<br />Intermediate point = (5,5) No time specified when the trajectory should pass this point !<br />END point = (8,11)<br /><br />How can I implement this extra constrain ? Should i use IntermediateState and how should i initialize it ?<br /><br />Thanks a lot !<br /><br />Jonas]]></description>
<dc:creator>Jonas</dc:creator>
<category>General Help</category><pubDate>Sat, 27 Nov 2010 11:17:18 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,181,182#msg-182</guid>
<title>Re: Function x^4</title><link>http://forum.acadotoolkit.org/read.php?5,181,182#msg-182</link><description><![CDATA[ Simply write<br /><br /><pre class="bbcode">
pow(x,4)</pre><br />or use the <i>pow</i> function for more complicated symbolic expressions.<br /><br />Best regards,<br />Joachim]]></description>
<dc:creator>ferreau</dc:creator>
<category>General Help</category><pubDate>Fri, 26 Nov 2010 23:22:09 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,181,181#msg-181</guid>
<title>Function x^4</title><link>http://forum.acadotoolkit.org/read.php?5,181,181#msg-181</link><description><![CDATA[ hello,<br /><br />Is there a function available to get a power of x , like x^4 or x^5 ... .<br /><br />thanks]]></description>
<dc:creator>Jonas</dc:creator>
<category>General Help</category><pubDate>Fri, 26 Nov 2010 18:07:43 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,173,180#msg-180</guid>
<title>Re: Is it possible to store all the differential states at each step of the integrator?</title><link>http://forum.acadotoolkit.org/read.php?5,173,180#msg-180</link><description><![CDATA[ I guess it's not possible to do this the same way, but maybe Joachim or Boris knows if there is another solution to get intermediate states in a grid?]]></description>
<dc:creator>David</dc:creator>
<category>General Help</category><pubDate>Fri, 26 Nov 2010 12:31:36 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?6,7,179#msg-179</guid>
<title>Re: [pending] minimizeLagrangeTerm for cFunctions</title><link>http://forum.acadotoolkit.org/read.php?6,7,179#msg-179</link><description><![CDATA[ Hi!<br /><br />Is there an update of the ACADO toolkit planned with the possibility to combine &quot;minimizeLagrangeTerm&quot; with cFunctions? I am needing this because of complex differential equations and constraints in academic research.<br /><br />Regards,<br />Klemens Springer<br />JKU]]></description>
<dc:creator>Springer</dc:creator>
<category>Bug Reports</category><pubDate>Thu, 25 Nov 2010 16:54:55 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,173,178#msg-178</guid>
<title>Re: Is it possible to store all the differential states at each step of the integrator?</title><link>http://forum.acadotoolkit.org/read.php?5,173,178#msg-178</link><description><![CDATA[ Thank you David!<br /><br />Do you know if it is possible to store an Intermediate state in the same style?<br />Cause I looked into the integrator.integrate() constructor and seems that it is only possible( as it is in your reply) to store differential states, parameters, disturbances and controls.<br /><br />Many Thanks again.<br /><br />Cheers,<br />Mattia]]></description>
<dc:creator>Mattia</dc:creator>
<category>General Help</category><pubDate>Wed, 24 Nov 2010 09:06:26 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,166,177#msg-177</guid>
<title>Re: Problem with two ACADO problems in one file</title><link>http://forum.acadotoolkit.org/read.php?5,166,177#msg-177</link><description><![CDATA[ Dear Tobias,<br /><br />when designing the symbolic classes we had to decide between two different way of implementing it. We have chosen for introducing this static counters as they allowed increased user-convenience. However, you run into troubles when using more than one dynamic system the way you did. But seemingly you did a great job in tracing the problem and using the clearStaticCounters() function is indeed the solution I would suggest for the moment.<br /><br />Best regards,<br />Joachim]]></description>
<dc:creator>ferreau</dc:creator>
<category>General Help</category><pubDate>Wed, 24 Nov 2010 08:59:32 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,173,174#msg-174</guid>
<title>Re: Is it possible to store all the differential states at each step of the integrator?</title><link>http://forum.acadotoolkit.org/read.php?5,173,174#msg-174</link><description><![CDATA[ You will need to define a &quot;grid&quot; with a start time, end time and a resolution. Use this grid as an argument for the integrator:<br /><br /><pre class="bbcode">
  Grid timeInterval( *tStart, *tEnd, (int) *storageResolution );
  returnValue returnvalue = integrator-&gt;integrate( timeInterval, xStart,xaStart,p,u,w );

            VariablesGrid out_x;
            integrator-&gt;getX(out_x);
</pre>]]></description>
<dc:creator>David</dc:creator>
<category>General Help</category><pubDate>Tue, 23 Nov 2010 12:36:45 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,173,173#msg-173</guid>
<title>Is it possible to store all the differential states at each step of the integrator?</title><link>http://forum.acadotoolkit.org/read.php?5,173,173#msg-173</link><description><![CDATA[ I want to store all the values of the differential states of my ODE's system at each step of the integrator, so that I can afterwards print them in gnuplot.<br /><br />My integration is not discretized, and I am using the RK45.<br /><br />Actually I am using:<br /><br />VariablesGrid differentialStates;<br />integrator.getX( differentialStates );<br /><br />and:<br /><br />VariablesGrid difstates;<br />integrator.getAll(LOG_DIFFERENTIAL_STATES, difstates);<br /><br />The first gives me back only the differential states at the end, and the second gives me an error.<br /><br />any suggestion?]]></description>
<dc:creator>Mattia</dc:creator>
<category>General Help</category><pubDate>Tue, 23 Nov 2010 11:32:10 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?9,161,172#msg-172</guid>
<title>Re: Error compiling matlab interface for ACADOtoolkit-1.0.2367beta</title><link>http://forum.acadotoolkit.org/read.php?9,161,172#msg-172</link><description><![CDATA[ Hi,<br /><br />as it seems, in the new version, the clearAllStaticCounters() function was added again by Joachim, so that everything works again from within Matlab. Thanks for that!<br /><br />Now, by pure coincidence, I have been running into a need for that function within my direct C++ usage of ACADO.<br />As it is not directly related to this thread, I added that as a separate question in a <a href="http://forum.acadotoolkit.org/read.php?5,166" rel="nofollow" >new topic</a>. (Just posting this as a reference here.)<br /><br />So my question: What is the purpose of the function within the Matlab-MEX-File scope? Is it to reset the global variables to allow for several independent calls of the MEX file from within Matlab?<br /><br />Best wishes,<br />Tobias]]></description>
<dc:creator>Tobias</dc:creator>
<category>Bug Reports</category><pubDate>Mon, 22 Nov 2010 12:31:36 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?5,166,171#msg-171</guid>
<title>Re: Problem with two ACADO problems in one file</title><link>http://forum.acadotoolkit.org/read.php?5,166,171#msg-171</link><description><![CDATA[ Hi,<br /><br />I tracked this down some more to the static counters for the symbolic expressions, which are global variables and which are increased whenever a new variable for a symbolic expression is constructed (according to the documentation manual.pdf, page 32).<br />Inspired by the talk about the problems with the &quot;clearAllStaticCounters();&quot; in <a href="http://forum.acadotoolkit.org/read.php?9,161" rel="nofollow" >this topic</a>, I used such a function in the code above between the &quot;controller();&quot; and &quot;simulate_system();&quot; calls in the &quot;main()&quot; function of the above code, and suddenly the problem is gone and everything works as expected.<br /><br />Now, the documentation for the &quot;clearStaticCounters();&quot; methods in the .hpp files for the symbolic expressions says, that &quot;this function [...] should never be used in C-code&quot;.<br /><br />So, now I'm wondering why that is, or better, what side effects this could have on my code and what would be the proper method to fix the issue (if clearing the counters is not recommended).<br /><br />Thanks a lot!<br />Tobias]]></description>
<dc:creator>Tobias</dc:creator>
<category>General Help</category><pubDate>Mon, 22 Nov 2010 12:27:38 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?9,161,170#msg-170</guid>
<title>Re: Error compiling matlab interface for ACADOtoolkit-1.0.2367beta</title><link>http://forum.acadotoolkit.org/read.php?9,161,170#msg-170</link><description><![CDATA[ I guess this fix should be applied on all files, meaning that if there is some kind of reference to &quot;clearAllStaticCounters()&quot; left in Matlab, it should be removed.]]></description>
<dc:creator>David</dc:creator>
<category>Bug Reports</category><pubDate>Mon, 22 Nov 2010 09:50:50 +0000</pubDate></item>
<item>
<guid>http://forum.acadotoolkit.org/read.php?9,161,169#msg-169</guid>
<title>Re: Error compiling matlab interface for ACADOtoolkit-1.0.2367beta</title><link>http://forum.acadotoolkit.org/read.php?9,161,169#msg-169</link><description><![CDATA[ I am sorry for the inconvenience, it works again.<br /><br />Joachim]]></description>
<dc:creator>ferreau</dc:creator>
<category>Bug Reports</category><pubDate>Mon, 22 Nov 2010 09:13:37 +0000</pubDate></item>
</channel>
</rss>
