Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -15,10 +15,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.359 2002/08/07 14:27:14 geraint +## Changes to make "-i dassl" work again. +## ## Revision 1.358 2002/08/07 11:04:40 geraint ## Now updates timestamp on lbl.txt after processing in make. This eliminates the delay where MTT spends a long period of time uselessly recursing through the model on subsequent passes if the label file is older than the bondgraph. ## ## Revision 1.357 2002/06/28 10:13:40 geraint ## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y. @@ -1670,11 +1673,11 @@ rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* *_alias.* rm -f *_sub.* *_type.sh rm -f *_dae*.* *_cse.* *_ode.* rm -f *_obs.* *_rfe.* *_ss.* rm -f *_dm.* *_csm.* *_tf.* *_sr*.* *_ir*.* *_*fr.* - rm -f *_numpar.m *_numpar.c *_input.m *_input.c *_switch.c *_switch.txt + rm -f *_numpar.c *_input.m *_input.c *_switch.c *_switch.txt rm -f *_sm.* *_can.* rm -f *_struc.* *_sympar.txt *_sympar.c *_sympar.h *_sympar.m rm -f *_odes.c *_odes.dat *_odes.gdat *_odes.m *_odes.ps *_odes.sg rm -f *_odeso.dat *_odeso.gdat *_odeso.sdat *_odeso.m *_odeso.ps rm -f *_*.doc *_*.idx *_*.ind *_*.ilg *_*.dvi *_*.aux *_*.lof *_*.toc Index: mttroot/mtt/bin/trans/m/cbg2ese.m ================================================================== --- mttroot/mtt/bin/trans/m/cbg2ese.m +++ mttroot/mtt/bin/trans/m/cbg2ese.m @@ -21,10 +21,13 @@ ## ############################################################### ## ## Version control history ## ############################################################### ## ## $Id$ ## ## $Log$ + ## ## Revision 1.45 2002/05/22 09:15:03 gawthrop + ## ## Non-repetitive components no longer use _1 in names + ## ## ## ## Revision 1.44 2001/11/11 18:12:30 geraint ## ## Moved fflush(structure_file) out of loop. ## ## ## ## Revision 1.43 2001/11/11 08:32:00 geraint ## ## fflush (structure_file). @@ -399,66 +402,67 @@ printf("\n\t%s Equations linking up subsystem %s (%s)\n\n",\ pc, comp_name, subsystem.type); u_index = 0; y_index = 0; ## Count the inputs and outputs for port_number=1:length(bond_list) - port_bond_number = bond_list(port_number); - this_bond_effort_unit = \ - deblank(bond_effort_unit(port_bond_number,:)); - this_bond_flow_unit = \ - deblank(bond_flow_unit(port_bond_number,:)); - - ## Extract the unit/domain stuff - this_port_name = subABG.portlist(port_number,:); - - eval(sprintf("this_port = subABG.ports.%s;", \ - this_port_name)); - if struct_contains(this_port,"units") - eval(["effort_unit = \ - subABG.ports.",this_port_name,".units.effort;"]); - eval(["flow_unit = \ - subABG.ports.",this_port_name,".units.flow;"]); - else - effort_unit = "none"; - flow_unit = "none"; - endif - - ## and check consistency - ## Efforts - if strcmp(this_bond_effort_unit,"null") # set - bond_effort_unit = \ - [bond_effort_unit(1:port_bond_number-1,:) - effort_unit - bond_effort_unit(port_bond_number+1:n_bonds,:) - ] - elseif (!strcmp(this_bond_effort_unit,"none") && !strcmp(effort_unit,"none")) # check - mtt_info(sprintf(unit_info,full_name, effort_unit, \ - this_bond_effort_unit), infofilenum); - if !strcmp(this_bond_effort_unit,effort_unit) - error_string = sprintf(unit_error, full_name,\ - effort_unit, \ - this_bond_effort_unit); - mtt_error(error_string); - endif - endif - ## Flows - if strcmp(this_bond_flow_unit,"null") # set - bond_flow_unit = \ - [bond_flow_unit(1:port_bond_number-1,:) - flow_unit - bond_flow_unit(port_bond_number+1:n_bonds,:) - ] - elseif (!strcmp(this_bond_flow_unit,"none") && !strcmp(flow_unit,"none")) # check - mtt_info(sprintf(unit_info,full_name, flow_unit, \ - this_bond_flow_unit), infofilenum); - if !strcmp(this_bond_flow_unit,flow_unit) - error_string = sprintf(unit_error, full_name,\ - flow_unit, \ - this_bond_flow_unit); - mtt_error(error_string); - endif - endif + repetition,port_number + port_bond_number = bond_list(port_number) +# this_bond_effort_unit = \ +# deblank(bond_effort_unit(port_bond_number,:)) +# this_bond_flow_unit = \ +# deblank(bond_flow_unit(port_bond_number,:)); + +# ## Extract the unit/domain stuff +# this_port_name = subABG.portlist(port_number,:); + +# eval(sprintf("this_port = subABG.ports.%s;", \ +# this_port_name)); +# if struct_contains(this_port,"units") +# eval(["effort_unit = \ +# subABG.ports.",this_port_name,".units.effort;"]); +# eval(["flow_unit = \ +# subABG.ports.",this_port_name,".units.flow;"]); +# else +# effort_unit = "none"; +# flow_unit = "none"; +# endif + +# ## and check consistency +# ## Efforts +# if strcmp(this_bond_effort_unit,"null") # set +# bond_effort_unit = \ +# [bond_effort_unit(1:port_bond_number-1,:) +# effort_unit +# bond_effort_unit(port_bond_number+1:n_bonds,:) +# ] +# elseif (!strcmp(this_bond_effort_unit,"none") && !strcmp(effort_unit,"none")) # check +# mtt_info(sprintf(unit_info,full_name, effort_unit, \ +# this_bond_effort_unit), infofilenum); +# if !strcmp(this_bond_effort_unit,effort_unit) +# error_string = sprintf(unit_error, full_name,\ +# effort_unit, \ +# this_bond_effort_unit); +# mtt_error(error_string); +# endif +# endif +# ## Flows +# if strcmp(this_bond_flow_unit,"null") # set +# bond_flow_unit = \ +# [bond_flow_unit(1:port_bond_number-1,:) +# flow_unit +# bond_flow_unit(port_bond_number+1:n_bonds,:) +# ] +# elseif (!strcmp(this_bond_flow_unit,"none") && !strcmp(flow_unit,"none")) # check +# mtt_info(sprintf(unit_info,full_name, flow_unit, \ +# this_bond_flow_unit), infofilenum); +# if !strcmp(this_bond_flow_unit,flow_unit) +# error_string = sprintf(unit_error, full_name,\ +# flow_unit, \ +# this_bond_flow_unit); +# mtt_error(error_string); +# endif +# endif ## Effort if comp_bonds(port_number,1)==1 # Source u_index = u_index + 1; Index: mttroot/mtt/bin/trans/m/figfig.m ================================================================== --- mttroot/mtt/bin/trans/m/figfig.m +++ mttroot/mtt/bin/trans/m/figfig.m @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ + ## Revision 1.6 2001/05/24 07:44:36 gawthrop + ## Minor updates .. + ## ## Revision 1.5 2001/05/10 19:08:35 gawthrop ## Cosmetic improvements ## ## Revision 1.4 2001/05/08 15:18:12 gawthrop ## Added trig and hyperbolic functions to argument exclusion list @@ -44,13 +47,13 @@ figfilename = sprintf("%s.fig",filename); eval(sprintf("gset output \"%s\" ",figfilename)); if (monochrome==1) - gset term fig monochrome portrait fontsize 16 size 20 10 metric + gset term fig monochrome portrait fontsize 16 size 20 10 metric thickness 3 else - gset term fig color portrait fontsize 16 size 20 10 metric + gset term fig color portrait fontsize 16 size 20 10 metric thickness 3 endif replot; gset term x11 gset output @@ -63,12 +66,12 @@ fprintf(fid,"\t9675 5310 9675 270 225 270 225 5310 9675 5310\n"); fclose(fid); endif - if nargin>1 # Do a ps file + if nargin>1 # Do a file in another langueage psfilename = sprintf("%s.%s",filename,language); convert = sprintf("fig2dev -L%s %s > %s", language, figfilename, psfilename); system(convert); endif endfunction Index: mttroot/mtt/doc/mtt.texi ================================================================== --- mttroot/mtt/doc/mtt.texi +++ mttroot/mtt/doc/mtt.texi @@ -14,10 +14,13 @@ @comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @comment Version control history @comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @comment $Id$ @comment $Log$ +@comment Revision 1.10 2002/07/22 10:45:22 geraint +@comment Fixed gnuplot rep so that it correctly re-runs the simulation if input files have changed. +@comment @comment Revision 1.9 2002/07/05 13:29:34 geraint @comment Added notes about generating dynamically linked functions for Octave and Matlab. @comment @comment Revision 1.8 2002/07/04 21:34:12 geraint @comment Updated gnuplot view description to describe Tcl/Tk interface instead of obsolete txt method. @@ -1087,10 +1090,17 @@ @section Algebraic loops @cindex Algebraic loops Following Chapter 3 of the book, algebraic loops appear as under-causal components in the bond graph. It is up to the modeler to indicate how these loops are to be resolved by adding appropriate SS elements. + +In particular if zero junction is undercausal an SS:loop component (with +effort output indicated by a causal stroke) with the following label +file entry: +@example + loop SS unknown,zero +@end example For more information, refer to: ``Metamodelling: Bond Graphs and Dynamic Systems'' by Peter Gawthrop and Lorcan Smith published by Prentice Hall in 1996 (ISBN 0-13-489824-9). @@ -4569,10 +4579,13 @@ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% Version control history # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% $Id$ # %% $Log$ +# %% Revision 1.10 2002/07/22 10:45:22 geraint +# %% Fixed gnuplot rep so that it correctly re-runs the simulation if input files have changed. +# %% # %% Revision 1.9 2002/07/05 13:29:34 geraint # %% Added notes about generating dynamically linked functions for Octave and Matlab. # %% # %% Revision 1.8 2002/07/04 21:34:12 geraint # %% Updated gnuplot view description to describe Tcl/Tk interface instead of obsolete txt method.