From: <par...@us...> - 2011-11-04 22:36:41
|
Revision: 8988 http://octave.svn.sourceforge.net/octave/?rev=8988&view=rev Author: paramaniac Date: 2011-11-04 22:36:35 +0000 (Fri, 04 Nov 2011) Log Message: ----------- control: improve error messages for ncfsyn Modified Paths: -------------- trunk/octave-forge/main/control/src/slsb10id.cc trunk/octave-forge/main/control/src/slsb10kd.cc trunk/octave-forge/main/control/src/slsb10zd.cc Modified: trunk/octave-forge/main/control/src/slsb10id.cc =================================================================== --- trunk/octave-forge/main/control/src/slsb10id.cc 2011-11-04 20:18:44 UTC (rev 8987) +++ trunk/octave-forge/main/control/src/slsb10id.cc 2011-11-04 22:36:35 UTC (rev 8988) @@ -23,7 +23,7 @@ Author: Lukas Reichlin <luk...@gm...> Created: July 2011 -Version: 0.1 +Version: 0.2 */ @@ -128,10 +128,34 @@ info)); if (f77_exception_encountered) - error ("hinfsyn: slsb10id: exception in SLICOT subroutine SB10ID"); + error ("ncfsyn: slsb10id: exception in SLICOT subroutine SB10ID"); if (info != 0) - error ("hinfsyn: slsb10id: SB10ID returned info = %d", info); + { + if (info < 0) + error ("ncfsyn: slsb10id: the %d-th argument had an invalid value", info); + else + { + switch (info) + { + case 1: + error ("ncfsyn: 1: the X-Riccati equation is not solved successfully"); + case 2: + error ("ncfsyn: 2: the Z-Riccati equation is not solved successfully"); + case 3: + error ("ncfsyn: 3: the iteration to compute eigenvalues or singular " + "values failed to converge"); + case 4: + error ("ncfsyn: 4: the matrix Ip - D*Dk is singular"); + case 5: + error ("ncfsyn: 5: the matrix Im - Dk*D is singular"); + case 6: + error ("ncfsyn: 6: the closed-loop system is unstable"); + default: + error ("ncfsyn: unknown error, info = %d", info); + } + } + } // resizing ak.resize (nk, nk); Modified: trunk/octave-forge/main/control/src/slsb10kd.cc =================================================================== --- trunk/octave-forge/main/control/src/slsb10kd.cc 2011-11-04 20:18:44 UTC (rev 8987) +++ trunk/octave-forge/main/control/src/slsb10kd.cc 2011-11-04 22:36:35 UTC (rev 8988) @@ -23,7 +23,7 @@ Author: Lukas Reichlin <luk...@gm...> Created: July 2011 -Version: 0.1 +Version: 0.2 */ @@ -124,11 +124,36 @@ info)); if (f77_exception_encountered) - error ("hinfsyn: slsb10kd: exception in SLICOT subroutine SB10KD"); + error ("ncfsyn: slsb10kd: exception in SLICOT subroutine SB10KD"); if (info != 0) - error ("hinfsyn: slsb10kd: SB10KD returned info = %d", info); + { + if (info < 0) + error ("ncfsyn: slsb10kd: the %d-th argument had an invalid value", info); + else + { + switch (info) + { + case 1: + error ("ncfsyn: 1: the P-Riccati equation is not solved successfully"); + case 2: + error ("ncfsyn: 2: the Q-Riccati equation is not solved successfully"); + case 3: + error ("ncfsyn: 3: the X-Riccati equation is not solved successfully"); + case 4: + error ("ncfsyn: 4: the iteration to compute eigenvalues failed to " + "converge"); + case 5: + error ("ncfsyn: 5: the matrix Rx + Bx'*X*Bx is singular"); + case 6: + error ("ncfsyn: 6: the closed-loop system is unstable"); + default: + error ("ncfsyn: unknown error, info = %d", info); + } + } + } + // resizing ak.resize (n, n); bk.resize (n, np); Modified: trunk/octave-forge/main/control/src/slsb10zd.cc =================================================================== --- trunk/octave-forge/main/control/src/slsb10zd.cc 2011-11-04 20:18:44 UTC (rev 8987) +++ trunk/octave-forge/main/control/src/slsb10zd.cc 2011-11-04 22:36:35 UTC (rev 8988) @@ -23,7 +23,7 @@ Author: Lukas Reichlin <luk...@gm...> Created: August 2011 -Version: 0.1 +Version: 0.2 */ @@ -134,8 +134,41 @@ error ("hinfsyn: slsb10zd: exception in SLICOT subroutine SB10ZD"); if (info != 0) - error ("hinfsyn: slsb10zd: SB10ZD returned info = %d", info); + { + if (info < 0) + error ("ncfsyn: slsb10zd: the %d-th argument had an invalid value", info); + else + { + switch (info) + { + case 1: + error ("ncfsyn: 1: the P-Riccati equation is not solved successfully"); + case 2: + error ("ncfsyn: 2: the Q-Riccati equation is not solved successfully"); + case 3: + error ("ncfsyn: 3: the iteration to compute eigenvalues or singular " + "values failed to converge"); + case 4: + error ("ncfsyn: 4: the matrix (gamma^2-1)*In - P*Q is singular"); + case 5: + error ("ncfsyn: 5: the matrix Rx + Bx'*X*Bx is singular"); + case 6: + error ("ncfsyn: 6: the matrix Ip + D*Dk is singular"); + case 7: + error ("ncfsyn: 7: the matrix Im + Dk*D is singular"); + case 8: + error ("ncfsyn: 8: the matrix Ip - D*Dk is singular"); + case 9: + error ("ncfsyn: 9: the matrix Im - Dk*D is singular"); + case 10: + error ("ncfsyn: 10: the closed-loop system is unstable"); + default: + error ("ncfsyn: unknown error, info = %d", info); + } + } + } + // resizing ak.resize (n, n); bk.resize (n, np); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |