Overview
Comment:Update to work with ident DIY rep
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 916ff2d116264ff122016211557063f7bf6cf2fa87f33a590bc53ecb5c03fd11
User & Date: gawthrop@users.sourceforge.net on 2002-08-20 15:51:17
Other Links: branch diff | manifest | tags
Context
2002-08-20
16:14:35
Include Q in documentation check-in: 6a0d518521 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:51:17
Update to work with ident DIY rep check-in: 916ff2d116 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:43:45
Works with ident DIY rep check-in: 502ba4cbbd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [cb0e07e7c3] to [51a5ec4d55].

13
14
15
16
17
18
19



20
21
22
23
24
25
26
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+
+







# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## 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.
##
## Revision 1.356  2002/06/17 13:14:50  geraint
1668
1669
1670
1671
1672
1673
1674
1675

1676
1677
1678
1679
1680
1681
1682
1671
1672
1673
1674
1675
1676
1677

1678
1679
1680
1681
1682
1683
1684
1685







-
+







  rm -f *_sabg.fig *_sabg.ps *_head.fig *_bnd.fig 
  rm -f *_sympar.r *_sympar.c *_sympar.h *_sympar.txt? *_sympar.tex
  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
  rm -f *_rep.tex
  rm -f  *_unique_raw_list *_raw_list

Modified mttroot/mtt/bin/trans/m/cbg2ese.m from [5555616c89] to [779f20cb00].

19
20
21
22
23
24
25



26
27
28
29
30
31
32
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35







+
+
+







  ## Structure matrix [states,nonstates,inputs,outputs,zero_outputs]
  
  ## ###############################################################
  ## ## 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).
  ## ##
  ## ## Revision 1.42  2001/04/23 16:23:30  gawthrop
397
398
399
400
401
402
403

404
405
406
407
408





409
410
411


412
413
414
415
416
417
418
419
420
421
422
423











424
425
426
427
428
429
430
431







432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448

















449
450
451
452
453
454
455
456
457
458
459











460
461
462
463
464
465
466
400
401
402
403
404
405
406
407





408
409
410
411
412
413


414
415
416











417
418
419
420
421
422
423
424
425
426
427
428







429
430
431
432
433
434
435

















436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452











453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470







+
-
-
-
-
-
+
+
+
+
+

-
-
+
+

-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+

-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+







	    
	    
	    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)
	      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,:));
              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,:);
# 	      ## 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
#               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,:)
# 	      ## 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_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
# 		     ]
# 	      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;
	     	fprintf(ese_file, "%s_MTTu%d := %s;\n", ...
		 	name_comp_name, u_index, varname(name_r, ...

Modified mttroot/mtt/bin/trans/m/figfig.m from [834208ffe6] to [fcbc20e8bd].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26







+
+
+







  ## Monochrome=1 gives a monchrome plot

  ###############################################################
  ## 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
  ##
  ## Revision 1.3  2001/04/10 12:54:50  gawthrop
42
43
44
45
46
47
48
49

50
51

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

69
70
71
72
73
74
45
46
47
48
49
50
51

52
53

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77







-
+

-
+
















-
+






  
  
  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 
  replot;


  if boxed # Add a box - makes a visible bounding box
    fid = fopen(figfilename,"a+");
    fprintf(fid,"2 4 0 2 31 7 50 0 -1 0.000 0 0 7 0 0 5\n");
    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

Modified mttroot/mtt/doc/mtt.texi from [ff9a99e0c4] to [c4eee9f1bd].

12
13
14
15
16
17
18



19
20
21
22
23
24
25
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28







+
+
+









@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.
@comment
@comment  Revision 1.7  2002/04/23 09:51:54  gawthrop
1085
1086
1087
1088
1089
1090
1091







1092
1093
1094
1095
1096
1097
1098
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108







+
+
+
+
+
+
+








@node Algebraic loops, Switched systems, Components, Introduction
@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).

@node Switched systems,  , Algebraic loops, Introduction
@comment  node-name,  next,  previous,  up
4567
4568
4569
4570
4571
4572
4573



4574
4575
4576
4577
4578
4579
4580
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593







+
+
+







# Generated by MTT at Mon Jun 16 15:10:17 BST 1997

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% 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.
# %%
# %% Revision 1.7  2002/04/23 09:51:54  gawthrop


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]