You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(29) |
May
(23) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(18) |
Oct
(2) |
Nov
(32) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(2) |
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
2004 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
(1) |
May
|
Jun
(4) |
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Geraint P. B. <ge...@us...> - 2005-02-17 19:25:14
|
Geraint Paul Bevan wrote: > You can use the --no-reduce option to run without Reduce being > installed. Sorry, that should be -no-reduce (only one leading hyphen) -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan |
From: Geraint P. B. <ge...@us...> - 2005-02-17 19:19:47
|
Donald Ballance wrote: > Geraint, > > Your recollection of the discussion on sh vs. bash is the same as mine, > however I can't now think of a version of UNIX that does not have bash ... > it is available under the two Operating Systems that I think we > currently try to support (Linux and SunOS) and is available under Cygwin. I know of plenty of legacy systems on which bash is unlikely to be installed, mentioning no companies in particular ... > The problem with [[ is that it is, I think, a shorthand for test, however > the implementation of test is also shell dependent. I think the only major difference between test/[[ ]] and [ ] is that multiple conditional expressions cannot be combined within the single braces. > I have converted all the /bin/sh to /bin/bash in my two installations, > Cygwin and Mandrake 9.2. Both now start up ok and I can do mtt --versions > on them and they run correctly. > > As far as mtt on Cygwin is concerned: > * All of the components appart from reduce are available > * At the moment MTT uses mkoctfile to initialise Octave, however this > files does not exist under the Cygwin version of Octave mkoctfile is only used to initialise the flags that are used to build dynamic .oct files. If mkoctfile isn't available, they wouldn't be needed anyway. This only means that the -oct version will not work. Everything else should be fine. mttrc should set those flags to '' if mkoctfile isn't found - are you getting an error message? You can use the --no-reduce option to run without Reduce being installed. This will work for systems that only use CRs which have been ported to Perl (mtt/lib/cr/perl): Density.pm Poly.pm apply_cr.pl* lcos.pm lin.pm lsin.pm > I am just trying to get X11 to work on the PC and then hopefully I will be > able to check whether the rest of MTT works. > > Just got your latest message. I am currently running the Snapshot from > Sourceforge, rather than trying to use CVS under Cygwin. One I get X > going I'll come back to getting CVS going under Cygwin. (Unless you feel > like creating a new Snapshot ;-) I'll make a new snapshot. -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan |
From: Donald B. <do...@me...> - 2005-02-17 19:05:46
|
Geraint, Your recollection of the discussion on sh vs. bash is the same as mine, however I can't now think of a version of UNIX that does not have bash ... it is available under the two Operating Systems that I think we currently try to support (Linux and SunOS) and is available under Cygwin. The problem with [[ is that it is, I think, a shorthand for test, however the implementation of test is also shell dependent. I have converted all the /bin/sh to /bin/bash in my two installations, Cygwin and Mandrake 9.2. Both now start up ok and I can do mtt --versions on them and they run correctly. As far as mtt on Cygwin is concerned: * All of the components appart from reduce are available * At the moment MTT uses mkoctfile to initialise Octave, however this files does not exist under the Cygwin version of Octave I am just trying to get X11 to work on the PC and then hopefully I will be able to check whether the rest of MTT works. Just got your latest message. I am currently running the Snapshot from Sourceforge, rather than trying to use CVS under Cygwin. One I get X going I'll come back to getting CVS going under Cygwin. (Unless you feel like creating a new Snapshot ;-) ----------output of mtt --versions------------- Donald@Dell2 ~> mtt --versions mkoctfile: Command not found. Versions of mtt and its components on Thu Feb 17 18:38:22 GMTST 2005 Trying mtt ... mkoctfile: Command not found. is OK and has version MTT version 5.0. Doing the GNU components Trying gawk ... is OK and has version GNU Awk 3.1.4. Trying basename ... is OK and has version basename (GNU coreutils) 5.2.1. Trying cat ... is OK and has version cat (coreutils) 5.2.1. Trying cp ... is OK and has version cp (coreutils) 5.2.1. Trying dirname ... is OK and has version dirname (GNU coreutils) 5.2.1. Trying gcc ... is OK and has version gcc (GCC) 3.3.3 (cygwin special). Trying grep ... is OK and has version grep (GNU grep) 2.5.1. Trying head ... is OK and has version head (coreutils) 5.2.1. Trying make ... is OK and has version GNU Make 3.80. Trying octave ... is OK and has version GNU Octave, version 2.1.42 (i686-pc-cygwin).. Trying sed ... is OK and has version GNU sed version 4.1.3. Trying tail ... is OK and has version tail (coreutils) 5.2.1. Trying tr ... is OK and has version tr (coreutils) 5.2.1. Doing the non-GNU components Trying xfig ... is OK and has version Xfig 3.2 patchlevel 4 (Protocol 3.2). Trying fig2dev ... is OK and has version fig2dev Version 3.2 Patchlevel 4. Trying reduce ... reduce does not exist. Donald@Dell2 ~> ----------end of output of mtt --versions ------------- On Thu, 17 Feb 2005, Geraint Paul Bevan wrote: > Donald Ballance wrote: > > Geraint, Peter, > > > > Following conversations at ICBGM I have been looking into getting MTT > > running under Cygwin so that users of Windows can access MTT. > > > > A major problem with Cygwin, as far as MTT is concerned, is that the > > implementation of /bin/sh is restricted in its capabilities. > > > > I seem to remember a while back we considered the possibility of > > converting all /bin/sh scripts to /bin/bash. Can either of you remember > > what the outcome of the discussion was, and whether there was a > > significant reason for sticking with /bin/sh > > > > Donald > > > I thought it was decided to keep Bourne shell compatibility because not > all UNIX systems have bash. > > > The '[[ conditionals ]]' are almost certainly my fault; I had not > realised that this was a bash-ism. > > This should be fairly easy to fix judging by the output of: > grep -R "\[\[" mttroot/mtt > > Can I just replace [[ ... ]] with [ ... ] or is there some subtle > difference? > > > Tilde path expansion is only used in ppp_1.m according to > grep -R "\~/" mttroot/mtt > but as that occurs within Octave, it is probably not a problem. > > > I am not aware of any use of job control or getopts by MTT. > > > Let is not used in many places: > $ grep -R "let" mttroot/mtt | grep "=" | grep -v '\.[mr]' > mttroot/mtt/bin/trans/dae2cse_r:MTTEdX := MTTdX; %Ie MTTEdX is MTTdX > with the dz terms deleted ie EdX. > mttroot/mtt/bin/trans/mtt_header: let Nx=Nx+2*Nz+Nyz # Matrices not > usual size > mttroot/mtt/bin/trans/mtt_update: let i=$i+1; > mttroot/mtt/bin/trans/sub_sh2tex: let level=0; > mttroot/mtt/bin/trans/sub_sh2tex: let level=$4; > mttroot/mtt/bin/trans/sub_sh2tex: let level1="$level+1" > > I think that the non-Reduce ones can probably be replaced with $(( )) > > > A lot of variables are exported, particularly by mttrc, but I don't > think that any functions are. > > > The word 'source ' appears in numerous places, but not with mttrc or > debian/ so we are probably ok with that. > > > It doesn't look too hard to fix, overall - I'll have a go. > > -- > Geraint Bevan > http://homepage.ntlworld.com/geraint.bevan > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Mtt-developers mailing list > Mtt...@li... > https://lists.sourceforge.net/lists/listinfo/mtt-developers > Dr. Donald Ballance, Centre for Systems and Control, and Department of Mechanical Engineering, University of Glasgow, Glasgow. G12 8QQ. Scotland. Email: D.B...@me... Tel: +44 141 339 8855 Ext. 5187 Direct: +44 141 330 5187 Fax: +44 141 330 4343 Mobile: +44 7734 236761 URL: http://www.mech.gla.ac.uk/~donald/ |
From: Geraint P. B. <ge...@us...> - 2005-02-17 18:59:35
|
Donald Ballance wrote: > Geraint, Peter, > > Following conversations at ICBGM I have been looking into getting MTT > running under Cygwin so that users of Windows can access MTT. > > A major problem with Cygwin, as far as MTT is concerned, is that the > implementation of /bin/sh is restricted in its capabilities. > > I seem to remember a while back we considered the possibility of > converting all /bin/sh scripts to /bin/bash. Can either of you remember > what the outcome of the discussion was, and whether there was a > significant reason for sticking with /bin/sh > > Donald OK, I have removed all of the listed bash-isms that I could find with grep. This doesn't seem to have broken anything -- the BouncingRod still bounces! Can you try running MTT on Cygwin again to see if it produces any error messages? -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan |
From: Geraint P. B. <ge...@us...> - 2005-02-17 18:12:53
|
Donald Ballance wrote: > Geraint, Peter, > > Following conversations at ICBGM I have been looking into getting MTT > running under Cygwin so that users of Windows can access MTT. > > A major problem with Cygwin, as far as MTT is concerned, is that the > implementation of /bin/sh is restricted in its capabilities. > > I seem to remember a while back we considered the possibility of > converting all /bin/sh scripts to /bin/bash. Can either of you remember > what the outcome of the discussion was, and whether there was a > significant reason for sticking with /bin/sh > > Donald I thought it was decided to keep Bourne shell compatibility because not all UNIX systems have bash. The '[[ conditionals ]]' are almost certainly my fault; I had not realised that this was a bash-ism. This should be fairly easy to fix judging by the output of: grep -R "\[\[" mttroot/mtt Can I just replace [[ ... ]] with [ ... ] or is there some subtle difference? Tilde path expansion is only used in ppp_1.m according to grep -R "\~/" mttroot/mtt but as that occurs within Octave, it is probably not a problem. I am not aware of any use of job control or getopts by MTT. Let is not used in many places: $ grep -R "let" mttroot/mtt | grep "=" | grep -v '\.[mr]' mttroot/mtt/bin/trans/dae2cse_r:MTTEdX := MTTdX; %Ie MTTEdX is MTTdX with the dz terms deleted ie EdX. mttroot/mtt/bin/trans/mtt_header: let Nx=Nx+2*Nz+Nyz # Matrices not usual size mttroot/mtt/bin/trans/mtt_update: let i=$i+1; mttroot/mtt/bin/trans/sub_sh2tex: let level=0; mttroot/mtt/bin/trans/sub_sh2tex: let level=$4; mttroot/mtt/bin/trans/sub_sh2tex: let level1="$level+1" I think that the non-Reduce ones can probably be replaced with $(( )) A lot of variables are exported, particularly by mttrc, but I don't think that any functions are. The word 'source ' appears in numerous places, but not with mttrc or debian/ so we are probably ok with that. It doesn't look too hard to fix, overall - I'll have a go. -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan |
From: Donald B. <do...@me...> - 2005-02-17 14:37:23
|
Geraint, Peter, Following conversations at ICBGM I have been looking into getting MTT running under Cygwin so that users of Windows can access MTT. A major problem with Cygwin, as far as MTT is concerned, is that the implementation of /bin/sh is restricted in its capabilities. I seem to remember a while back we considered the possibility of converting all /bin/sh scripts to /bin/bash. Can either of you remember what the outcome of the discussion was, and whether there was a significant reason for sticking with /bin/sh Donald ------From the Cygwin FAQ---------- Why doesn't my shell script work? --------------------------------- There are two basic problems you might run into. One is the fact that /bin/sh is really ash, and is missing some features you might expect in /bin/sh, particularly if you are used to /bin/sh actually being bash (Linux) or ksh (Tru64). For example: * No `~' expansion (use $HOME instead) * No job control * No getopts * No let * No functions exported * Must use `.' instead of `source' (true of sh and ksh too, not just ash) Or, it could be a permission problem, and Cygwin doesn't understand that your script is executable. Because `chmod' may not work (see FAQ entry above), Cygwin must read the contents of files to determine if they are executable. If your script does not start with #! /bin/sh (or any path to a script interpreter, it does not have to be /bin/sh) then Cygwin will not know it is an executable script. The Bourne shell idiom : # This is the 2nd line, assume processing by /bin/sh also works. Note that you can use `mount -x' to force Cygwin to treat all files under the mount point as executable. This can be used for individual files as well as directories. Then Cygwin will not bother to read files to determine whether they are executable. ------------end of FAQ excerpt------------- ash also seems to be missing the ability to specify tests about files using the notatoin [[ -r FILENAME]] Dr. Donald Ballance, Centre for Systems and Control, and Department of Mechanical Engineering, University of Glasgow, Glasgow. G12 8QQ. Scotland. Email: D.B...@me... Tel: +44 141 339 8855 Ext. 5187 Direct: +44 141 330 5187 Fax: +44 141 330 4343 Mobile: +44 7734 236761 URL: http://www.mech.gla.ac.uk/~donald/ |
From: Peter G. <mt...@ga...> - 2004-09-23 01:37:58
|
Hi Geraint, yes, I agree with that, P. From: Geraint Paul Bevan <ger...@nt...> Subject: Re: [Mtt-developers] Octave and fopen Date: Sun, 12 Sep 2004 23:39:37 +0100 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Peter, hope you are enjoying it down there. > > > Peter Gawthrop wrote: > > | > | INFORMATION: An MTT transformation has generated the following messages > | warning: fopen: default open mode is now binary > > Well, the error message is accurate - fopen now opens the file in binary > mode by default. According to the Octave documentation, 'b' or 't' can > be appended to the fopen mode argument to open in binary or text mode. > > I've appended 't' to all the mode strings in the trans/ directory tree > which seems to fix things. > > We could opt for binary mode instead of text. It might be slightly > quicker, but I don't think it would make a huge difference and plain > ascii is a lot easier when debugging problems. > > - -- > Geraint Bevan > http://homepage.ntlworld.com/geraint.bevan > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iEYEARECAAYFAkFE0CkACgkQcXV3N50QmNNVmQCeMU4tqmMVyTmXZUEtJYoQL7rv > 1xUAn1OojcAe5rq3+N1i3Qq6RUcfi21+ > =u2RX > -----END PGP SIGNATURE----- |
From: Geraint P. B. <ger...@nt...> - 2004-09-12 22:32:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Peter, hope you are enjoying it down there. Peter Gawthrop wrote: | | INFORMATION: An MTT transformation has generated the following messages | warning: fopen: default open mode is now binary Well, the error message is accurate - fopen now opens the file in binary mode by default. According to the Octave documentation, 'b' or 't' can be appended to the fopen mode argument to open in binary or text mode. I've appended 't' to all the mode strings in the trans/ directory tree which seems to fix things. We could opt for binary mode instead of text. It might be slightly quicker, but I don't think it would make a huge difference and plain ascii is a lot easier when debugging problems. - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkFE0CkACgkQcXV3N50QmNNVmQCeMU4tqmMVyTmXZUEtJYoQL7rv 1xUAn1OojcAe5rq3+N1i3Qq6RUcfi21+ =u2RX -----END PGP SIGNATURE----- |
From: Peter G. <mt...@ga...> - 2004-09-12 21:42:00
|
Hi Geraint, greetings from down under. Using the latest Octave (2.1.58), I get the following errors flagged by mtt: INFORMATION: An MTT transformation has generated the following messages warning: fopen: default open mode is now binary This makes mtt stop, but does not seem to affect mtt otherwise. What do you think that we should do about it? Best wishes Peter. Peter Gawthrop mt...@ga... http://mtt.sf.net |
From: Geraint P. B. <ge...@us...> - 2004-08-26 17:22:53
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Dave, Dia bond graphs are working nicely for me now. I've made some updates to MTT in the last couple of weeks. It is now possible to * build hierarchical models using Dia and/or Xfig * use vector bonds, port aliasing, etc. * create <sys>_cbg.dia causal bond graphs of Dia models There are a couple of (as yet undocumented) Dia bond graph models included in the lib/examples directory: * "doubleOscillator" demonstrates the ability to mix Dia and Xfig subsystems in one model. * "StackOfSupportedBars" demonstrates working vector bonds and port aliasing. I have just made some changes which allow reports to be generated of models which contain Dia systems, but the production of postscripts produced by Dia 0.94 seems to have a couple of problems for me - this version of Dia doesn't seem to recognise command line options (on my machine at least) so it is necessary to export files to eps manually. I still need to update the manual to describe the use of Dia, but in the meantime has there been any progress with getting your changes into the main Dia distribution? If there is a problem getting the changes accepted, I think it might be time to consider providing the patches with MTT. There is now a patches directory under mttroot so we could place them in mttroot/dia/dia-0.94. - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iEYEARECAAYFAkEuG20ACgkQcXV3N50QmNPCIQCfVcnsE+yZtLprcsGExcNjtaWX NS0An0DL48TSxMTHx8RxDuSYFkJgK7xv =B5rr -----END PGP SIGNATURE----- |
From: Geraint P. B. <ge...@us...> - 2004-08-01 20:28:07
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter, there are some files in MTT which are no longer used, such as cmp2cmp_m which is not referenced by any other files. Given that deleted files can always be retrieved from CVS if the code within them ever becomes useful again, should I just go ahead and delete any of these files that I come across or would you prefer to leave them alone? - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkENU0AACgkQcXV3N50QmNPa1QCfdrFpD65TzW6l/JPC5nrKaUCn zxsAnj35ZKdF5033TLHZLTK/p7EHSK1q =T51B -----END PGP SIGNATURE----- |
From: Geraint P. B. <ge...@us...> - 2004-06-21 10:29:50
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter, it looks like yesterday's changes to mtt_header have broken -oct again. I've just updated from sourceforge and now I get the following error: Creating rc_input.oct rc_input.cc: In function `ColumnVector rc_input(const ColumnVector&, const ~ ColumnVector&, const double&, const ColumnVector&)': rc_input.cc:54: error: no match for 'operator=' in 'mttu = zeros(int, int)(1)' /usr/include/octave-2.1.57/octave/dColVector.h:50: error: candidates are: ~ ColumnVector& ColumnVector::operator=(const ColumnVector&) make: *** [rc_input.oct] Error 1 The problem seems to be that the initialisation of the vectors in the .txt files also gets written into the .cc files: rc_input.cc: ... // Declarations of dummies ~ mttu = zeros(1); <-- .oct initialisation // States ~ rc__c = mttx(0); // User defined code from rc_input.txt ~ mttu = zeros(1,1); <-- .txt initialisation ~ rc__e1 = 1.0; ... This results in the assignment of a Matrix to a ColumnVector, which fails. Is there a particular problem that you were trying to fix with these changes? - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkDWuCEACgkQcXV3N50QmNMn+QCaAxIpiftSN8ijrapde96iXyKd Lw4AoImka7jyfHv3IVHtUL+IYecoMHsC =odhM -----END PGP SIGNATURE----- |
From: Geraint P. B. <ge...@us...> - 2004-06-20 21:23:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter, I think the bug is fixed now in CVS. The operator[] method was removed from Octave_map last December. I've changed the access method in mtt_simpar.hh and -oct seems to work again. - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkDWAQUACgkQcXV3N50QmNOHKACZAQzFYTVv9vcdZ2TAwl+Pxkki PoEAnRsIhX5aQhtijfS2t8F7LoXCvPnC =4rgC -----END PGP SIGNATURE----- |
From: Geraint P. B. <ge...@us...> - 2004-06-19 13:53:03
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter, I see the same problem on my machine. Octave's Octave_map has probably changed at some point recently. I'll look into it. - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkDURgAACgkQcXV3N50QmNNCRwCdEJ2xRwFGDgxaWU8TRLorg+8/ 2x0AoInAcsY9BUPw9daRzw3wyVJsJqfX =crem -----END PGP SIGNATURE----- |
From: Peter G. <mt...@ga...> - 2004-06-19 12:57:18
|
Hi Geraint, there is a problem with .oct files: peterg@tiree:rc$ mtt -oct rc odeso view MTT (Model Transformation Tools) version 5.0 ($Date: 2003/09/23 20:53:49 $) This is free software with ABSOLUTELY NO WARRANTY. Type `mtt warranty' for details. ...... ....... Creating rc_input.oct Creating rc_logic.oct Creating rc_numpar.oct Creating rc_simpar.oct In file included from rc_simpar.cc:76: /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh: In function ` ColumnVector mtt_simpar(Octave_map)': /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:10: error: no match for 'operator[]' in 'simpar["first"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:11: error: no match for 'operator[]' in 'simpar["last"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:12: error: no match for 'operator[]' in 'simpar["dt"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:13: error: no match for 'operator[]' in 'simpar["stepfactor"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:14: error: no match for 'operator[]' in 'simpar["wmin"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:15: error: no match for 'operator[]' in 'simpar["wmax"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:16: error: no match for 'operator[]' in 'simpar["wsteps"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:17: error: no match for 'operator[]' in 'simpar["input"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh: In function ` Octave_map mtt_simpar(ColumnVector)': /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:27: error: no match for 'operator[]' in 'retval["first"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:28: error: no match for 'operator[]' in 'retval["last"]' /home/peterg/Development/mttroot/mtt/lib/cc/mtt_simpar.hh:29: error: no match for 'operator[]' in 'retval["dt"]' etc.. Any ideas? P. Peter Gawthrop mt...@ga... http://mtt.sf.net |
From: Peter G. <mt...@ga...> - 2004-04-07 11:12:40
|
Hi Geraint, I'm now using Octave 2.1.57 and so have run up against the issue discussed in the email from jwe at the end of this email. The problem is that in some of the auto generated code we do exactly as discussed below and used to relay on the result being a column. Now it is a row then things like mtt sys gnuplot view are broken. Over the next few weeks I will fix this; anyway, as jwe says below, we should really be sizing vectors before adding elements one-by-one. Best wishes, P. Subject: row vectors changed to column vectors? From: "John W. Eaton" <jwe at bevo dot che dot wisc dot edu> Date: Tue, 10 Feb 2004 09:17:13 -0600 To: "Christian T. Steigies" <cts at debian dot org> CC: octave-help <help-octave at bevo dot che dot wisc dot edu> On 10-Feb-2004, Christian T. Steigies <cts at debian dot org> wrote: | I wrote a little function to generate maximum length pseudo random | sequences, the function returns a vector. I am doing some matrix | multiplication with this vector and notice that in octave 2.1.50 the vector | is treated as row vector, whereas in 2.1.53 it is treated as a column | vector. Simple example: | | octave:1> a(1)=1 | a = 1 | octave:2> a(2)=2 | a = | | 1 | 2 | | octave:3> version | ans = 2.1.50 | octave:4> [nr,nc]=size(a) | nr = 2 | nc = 1 | | | octave:1> a(1)=1 | a = 1 | octave:2> a(2)=2 | a = | | 1 2 | | octave:3> version | ans = 2.1.53 | octave:4> [nr,nc]=size(a) | nr = 1 | nc = 2 | | Is this expected behaviour and if so is it going to stay that way? A quick | search didn't show anything in the changelog, but maybe I was looking for | the wrong thing. Yes, this change is permanent, for compatibility with Matlab. In the past, you could use the built-in variable prefer_column_vectors to choose what Octave would do for things like clear a; a(1)=1; a(2)=2 but now Octave will only do the Matlab-compatible thing and create row vectors. Other than the potential compatibility problems, the existence of a variable like prefer_column_vectors made it harder to write code that would work no matter which preference other users might have. So it was best to eliminate the variable. BTW, if you are creating vectors by doing things like clear a; for i = 1:N a(i) = something(); end then you should probably rethink your method, because this type of loop the vector A to be resized N times, which will be slow. jwe |
From: SourceForge.net <no...@so...> - 2004-02-19 01:06:32
|
Feature Requests item #898897, was opened at 2004-02-17 17:26 Message generated for change (Comment added) made by geraint You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 Category: Installation Group: None >Status: Closed Priority: 5 Submitted By: Geraint Paul Bevan (geraint) Assigned to: Geraint Paul Bevan (geraint) Summary: Separate examples from main .deb Initial Comment: Create a separate .deb package for the examples. ---------------------------------------------------------------------- >Comment By: Geraint Paul Bevan (geraint) Date: 2004-02-19 01:00 Message: Logged In: YES user_id=71249 Implemented. New package mtt-examples exists. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 |
From: SourceForge.net <no...@so...> - 2004-02-17 22:11:55
|
Feature Requests item #898902, was opened at 2004-02-17 17:28 Message generated for change (Comment added) made by geraint You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898902&group_id=11438 Category: DIY representation Group: None >Status: Closed Priority: 5 Submitted By: Geraint Paul Bevan (geraint) Assigned to: Geraint Paul Bevan (geraint) Summary: Default sfun_interface Initial Comment: Map all MTT inputs, outputs and states to simulink inputs and outputs when an sfun is created. ---------------------------------------------------------------------- >Comment By: Geraint Paul Bevan (geraint) Date: 2004-02-17 22:06 Message: Logged In: YES user_id=71249 Implemented. mtt sys sfun {mexglx|zip} should now work without any editing of code. By default, all inputs and outputs are exposed to Simulink via the sfun _interface block (MTT states are available from within the Simulink model, one layer down). In this form, the sfun_interface and sfun_input blocks are redundant, it would be just as easy to connect the Simulink inputs and outputs to the MTT plant model block (one layer down, again). However, I think it is best to leave the sfun_interface in place as it allows the modeller the option of restricting which inputs and outputs are exposed. This is particularly useful when there are hundreds (e.g. BigHeatedRod). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898902&group_id=11438 |
From: SourceForge.net <no...@so...> - 2004-02-17 17:36:10
|
Feature Requests item #898904, was opened at 2004-02-17 17:30 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898904&group_id=11438 Category: DIY representation Group: None Status: Open Priority: 5 Submitted By: Geraint Paul Bevan (geraint) Assigned to: Geraint Paul Bevan (geraint) Summary: Remove mex dependency for RTW Initial Comment: Prevent the ae code from being compiled if there are no algebraic equations so that no editing is necessary for the Simulink Real Time target which does not have access to the matlab engine. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898904&group_id=11438 |
From: SourceForge.net <no...@so...> - 2004-02-17 17:33:56
|
Feature Requests item #898902, was opened at 2004-02-17 17:28 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898902&group_id=11438 Category: DIY representation Group: None Status: Open Priority: 5 Submitted By: Geraint Paul Bevan (geraint) Assigned to: Geraint Paul Bevan (geraint) Summary: Default sfun_interface Initial Comment: Map all MTT inputs, outputs and states to simulink inputs and outputs when an sfun is created. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898902&group_id=11438 |
From: SourceForge.net <no...@so...> - 2004-02-17 17:32:41
|
Feature Requests item #898897, was opened at 2004-02-17 17:26 Message generated for change (Settings changed) made by geraint You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 Category: Installation Group: None Status: Open Priority: 5 Submitted By: Geraint Paul Bevan (geraint) >Assigned to: Geraint Paul Bevan (geraint) Summary: Separate examples from main .deb Initial Comment: Create a separate .deb package for the examples. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 |
From: SourceForge.net <no...@so...> - 2004-02-17 17:32:13
|
Feature Requests item #898897, was opened at 2004-02-17 17:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 Category: Installation Group: None Status: Open Priority: 5 Submitted By: Geraint Paul Bevan (geraint) Assigned to: Donald Ballance (donald64) Summary: Separate examples from main .deb Initial Comment: Create a separate .deb package for the examples. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=361438&aid=898897&group_id=11438 |
From: Peter G. <P.G...@en...> - 2004-02-10 11:33:02
|
Hi Geraint, we had problems with the following when using the mtt sfun Numerical_sfun.zip in the real-time workshop: Numerical_sfun.c ================ update_inputs_from_solver: lots of unresoved symbols -- commented out body. I assume that this was just for algebraic loops - could it be skipped none? useful-functions.hh =================== M_PI undefined - replaced by 3.142 Numerical_sfun_interface.c ========================== As you said in your email, this has to be edited. Why not default to passing inputs to, and outputs from, MTT model directely, eg: const int NumberOfControllerInputs = MTTNy; /* inputs TO controller */ const int NumberOfControllerOutputs = MTTNu; /* outputs FROM controller */ for (i = 0; i < MYYNy; i++) controller_inputs[i] = mtty[i]; for (i = 0; i < MTTNu; i++) mttu[i] = controller_outputs[i]; ================================================================= However, these are relatively minor points. We are VERY grateful for the sfuns to get an experiment up and running in a very short time scale. P. -------------------------------------------------------------------- | Prof. Peter J Gawthrop | Tel: +44 141 330 4960/2528 | | Centre for Systems and Control & | Fax: +44 141 330 4343 | | Dept. of Mechanical Engineering | Room: James Watt 653 | | University of Glasgow | Email: P.G...@en... | | GLASGOW G12 8QQ, Scotland, UK | URL: www.mech.gla.ac.uk/~peterg | -------------------------------------------------------------------- |
From: Geraint P. B. <ger...@nt...> - 2004-01-30 23:11:37
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter Gawthrop wrote: | Hi Geraint, | | I want to use MTT to generate controllers for real-time linux. | | I guess that | | mtt control ode cc | | will give me the code. Can I then just compile and link to the | real-time module which calls it? | | Any suggestions appreciated. | | BTW, I plan also to generate the corresponding menu direct from the | numpar file. | | Best wishes, | | P. | Peter, the .cc code uses Octave ColumnVectors, so it will be necessary to link against liboctave and possibly some of the other libraries that Octave depends on. If this is not a problem wrt. speed and size, then I think it would be better to use a modified control_ode2odes.cc as the interface, unless I misunderstand what you are trying to do. control_ode.cc contains the rate equations, but you will also need control_state.cc to initialize the model and control_odeo.cc for the outputs if you are not using the states directly. If you have switches in the controller, you will also need control_logic.cc. There is also the matter of updating the states. It is simple enough to modify the way control_ode2odes.cc is generated to create a new CODEGENTARGET to go along with STANDALONE, OCTAVEDLD and MATLABMEX that we have at the moment. I think something along the lines of the (untested) code below would work. If you want me to add something like this to make_ode2odes, let me know. Alternatively, if you think linking against liboctave could be problematic, we can probably find another way. We could, for instance, rewrite the code to use standard arrays of doubles, although this would obviously take a bit longer to do and test. Geraint. // control_ode2odes.cc #if (CODEGENTARGET == CONTROLLER) double * control_ode2odes (const double mttu[], // array of inputs const double T) { ~ // initialization (first time only) ~ static ColumnVector par = control_numpar (); ~ static ColumnVector x = control_state (); ~ static ColumnVector dx (MTTNX, 0.0); ~ static ColumnVector u (MTTNU, 0.0); ~ static ColumnVector y (MTTNY, 0.0); ~ static ColumnVector open_switches (MTTNX, 0.0); ~ // update inputs (could be done without loop if necessary) ~ for (register i = 0; i < MTTNU; i++) { ~ u(i) = mttu[i]; ~ } ~ // code to update numpar from menu here ~ // integration of states ~ dx = mtt_rate (x, u, 0, par); ~ open_switches = mtt_logic (x, u, t, par); ~ x = mtt_euler (x, dx, T, MTTNX, open_switches); ~ // return outputs ~ y = mtt_output (x, u, 0, par); ~ return y.fortran_vec (); } #endif // CONTROLLER - -- Geraint Bevan http://homepage.ntlworld.com/geraint.bevan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iEYEARECAAYFAkAa5mQACgkQcXV3N50QmNP2KQCfd/LlxTugEiPCldfc5/SEB6Ru 9IIAoIelcoewpaRJ0VIYAgJtgfzKkjNr =h8je -----END PGP SIGNATURE----- |
From: Peter G. <P.G...@en...> - 2004-01-28 16:50:53
|
Hi Geraint, I want to use MTT to generate controllers for real-time linux. I guess that mtt control ode cc will give me the code. Can I then just compile and link to the real-time module which calls it? Any suggestions appreciated. BTW, I plan also to generate the corresponding menu direct from the numpar file. Best wishes, P. |