%!PS-Adobe-2.0 % HIMAP printing postscript utilities (Postscript Ver) % *********** Global Constants Definitions *********** /PORTRAIT (portrait) def /LANDSCAPE (landscape) def /PACKAGE (HIMAP) def /PK_TITLE (- HIerarchical Modeling Analysis Package) def /LAB (DCNL) def /SCHOOL (Iowa State University) def /XLO 36 def /YLO 36 def /XHI 576 def /YHI 756 def % *************************************************** % ******************* To draw a point ***************** /Draw_pt { 1 scl 0 360 arc gsave fill grestore } def % *************************************************** % ****************** To draw the logo *************** /Draw_logo { /y exch def /x exch def orient PORTRAIT eq % decide orientation % -------------- Portrait Part --------------- { gsave 1 0.65 scale x 20 add y moveto x 20 add y 20 0 360 arc 0.8 setgray fill grestore gsave x 4 add y 13 sub moveto /Times-Bold findfont 10 scalefont setfont LAB show x 47 add y 13 sub moveto /Times-Bold findfont 10 scalefont setfont SCHOOL show x 240 sub y 13 sub moveto /Times-Bold findfont 12 scalefont setfont PACKAGE show x 200 sub y 13 sub moveto /Times-Bold findfont 10 scalefont setfont PK_TITLE show grestore } % -------------- Landscape Part --------------- { gsave x y translate 0.65 1 scale 0 0 moveto 0 0 20 0 360 arc 0.8 setgray fill grestore gsave x 4 add y 16 sub moveto /Times-Bold findfont 10 scalefont setfont 90 rotate LAB show 270 rotate x 4 add y 27 add moveto /Times-Bold findfont 10 scalefont setfont 90 rotate SCHOOL show 270 rotate x 4 add y 360 sub moveto /Times-Bold findfont 12 scalefont setfont 90 rotate PACKAGE show 270 rotate x 4 add y 320 sub moveto /Times-Bold findfont 10 scalefont setfont 90 rotate PK_TITLE show 270 rotate grestore 0 0 translate } ifelse } def % *************************************************** % ************** Boundary box definition ************* /PSBox { newpath 1 setlinewidth XLO YLO moveto XHI YLO lineto XHI YHI lineto XLO YHI lineto /Helvetica findfont 14 scalefont setfont closepath stroke newpath orient PORTRAIT eq % decide orientation % -------------- Portrait Part --------------- { XLO YLO 30 add moveto XHI YLO 30 add lineto XLO 10 add YLO 10 add moveto FILE_NAME show XLO 250 add YLO 30 add moveto 0 30 neg rlineto XLO 260 add YLO 10 add moveto DATE show 430 30 Draw_logo } % ------------- Landscape Part --------------- { XHI 30 sub YLO moveto XHI 30 sub YHI lineto XHI 10 sub YLO 10 add moveto 90 rotate FILE_NAME show 270 rotate XHI 30 sub YLO 250 add moveto XHI YLO 250 add lineto XHI 10 sub YLO 260 add moveto 90 rotate DATE show 270 rotate 592 600 Draw_logo } ifelse closepath stroke } def % *************************************************** % **************** FBOX definition ****************** /FBOX { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2.5 scl} def % length of the leg of the gate /hw {15 scl} def % half width of the gate /fh {22.5 scl} def % full height of the gate 1 scl setlinewidth % set the line width newpath % start a new path orient PORTRAIT eq % decide orientation % ------------- Portrait Part ---------------- { x y fh sub l sub Draw_pt x y moveto hw 0 rlineto 0 fh neg rlineto hw 2 mul neg 0 rlineto 0 fh rlineto hw 0 rlineto % x y fh sub moveto x y moveto 0 l neg rlineto } % ------------- Landscape Part --------------- { x fh add l add y Draw_pt x y moveto 0 hw rlineto fh 0 rlineto 0 hw 2 mul neg rlineto fh neg 0 rlineto 0 hw rlineto x fh add y moveto l 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************** AND gate definition **************** /AND_gate { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /r {10 scl} def % radius of the arc of the gate /l {2 scl} def % length of the leg of the gate /fw {20 scl} def % full width of the gate /fh {26 scl} def % full height of the gate /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % ------------- Portrait Part ---------------- { x y bh add Draw_pt x y 2 l mul sub fh sub moveto x y 2 l mul sub fh sub Draw_pt x y 2 l mul sub fh sub moveto 0 l rlineto % x y moveto % 0 l neg rlineto /y1 {y l sub} def x r add y1 r sub moveto x y1 r sub r 0 180 arc 0 fh r sub neg rlineto fw 0 rlineto 0 fh r sub rlineto x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % ------------- Landscape Part --------------- { x bh sub y Draw_pt x 2 l mul add fh add y moveto x 2 l mul add fh add y Draw_pt x 2 l mul add fh add y moveto l neg 0 rlineto % x y moveto % l 0 rlineto /x1 {x l add} def x1 r add y r add moveto x1 r add y r 90 270 arc fh r sub 0 rlineto 0 fw rlineto fh r sub neg 0 rlineto x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************** R_N gate definition **************** /R_N_gate { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /r {10 scl} def % radius of the arc of the gate /l {2 scl} def % length of the leg of the gate /fw {20 scl} def % full width of the gate /hw {10 scl} def % half width of the gate /fh {26 scl} def % full height of the gate /hh {13 scl} def % half height of the gate /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % ------------- Portrait Part ---------------- { x y bh add Draw_pt x y 2 l mul sub fh sub moveto x y 2 l mul sub fh sub Draw_pt x y 2 l mul sub fh sub moveto 0 l rlineto % x y moveto % 0 l neg rlineto /y1 {y l sub} def x r add y1 r sub moveto x y1 r sub r 0 180 arc 0 fh r sub neg rlineto fw 0 rlineto 0 fh r sub rlineto x r add y1 fh sub moveto hw neg hh rlineto hw neg hh neg rlineto x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % ------------- Landscape Part --------------- { x bh sub y Draw_pt x 2 l mul add fh add y moveto x 2 l mul add fh add y Draw_pt x 2 l mul add fh add y moveto l neg 0 rlineto % x y moveto % l 0 rlineto /x1 {x l add} def x1 r add y r add moveto x1 r add y r 90 270 arc fh r sub 0 rlineto 0 fw rlineto fh r sub neg 0 rlineto x1 fh add y r add moveto hh neg hw neg rlineto hh hw neg rlineto x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************** OR gate definition **************** /OR_gate { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /fw {20 scl} def % full width of the gate /hw {10 scl} def % half width of the gate /fh {26 scl} def % full height of the gate /hh {13 scl} def % half height of the gate /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y bh add Draw_pt x y moveto 0 l 11.5 mul neg rmoveto 0 l 3.5 mul neg rlineto x y 2 l mul sub fh sub moveto x y 2 l mul sub fh sub Draw_pt % x y moveto % 0 l neg rlineto /y1 {y l sub} def x y1 moveto hw 0.5 mul 0 hw hh neg hw fh neg rcurveto hw 0.5 mul neg hh 0.5 mul hw 1.5 mul neg hh 0.5 mul fw neg 0 rcurveto 0 hh hw 0.5 mul fh hw fh rcurveto x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % -------------- Landscape Part ----------------- { x bh sub y Draw_pt x y moveto l 11.5 mul 0 rmoveto l 3.5 mul 0 rlineto x 2 l mul add fh add y moveto x 2 l mul add fh add y Draw_pt % x y moveto % l 0 rlineto /x1 {x l add} def x1 y moveto 0 hw 0.5 mul hh hw fh hw rcurveto hh 0.5 mul neg hw 0.5 mul neg hh 0.5 mul neg hw 1.5 mul neg 0 fw neg rcurveto hh neg 0 fh neg hw 0.5 mul fh neg hw rcurveto x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % ************** IN gate definition **************** /IN_gate { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /fw {20 scl} def % full width of the gate /hw {10 scl} def % half width of the gate /fh {28 scl} def % full height of the gate /hh {14 scl} def % half height of the gate /base {8 scl} def % base of the in gate /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y bh add Draw_pt % x y moveto % 0 l neg rlineto /y1 {y l sub} def x y1 moveto hw fh base sub l sub neg rlineto 0 base neg rlineto fw neg 0 rlineto 0 base rlineto hw fh base sub l sub rlineto hw fh base sub l sub neg rmoveto fw neg 0 rlineto x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % -------------- Landscape Part ----------------- { x bh sub y Draw_pt % x y moveto % l 0 rlineto /x1 {x l add} def x1 y moveto fh base sub l sub hw rlineto base 0 rlineto 0 fw neg rlineto base neg 0 rlineto fh base sub l sub neg hw rlineto fh base sub l sub hw rmoveto 0 fw neg rlineto x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************** OUT gate definition **************** /OUT_gate { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /fw {20 scl} def % full width of the gate /hw {10 scl} def % half width of the gate /fh {28 scl} def % full height of the gate /hh {14 scl} def % half height of the gate /base {8 scl} def % base of the in gate 1 scl setlinewidth % set the line width newpath % start a new path orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y fh sub l sub Draw_pt x hw sub y moveto fw 0 rlineto 0 base neg rlineto hw neg fh base sub neg rlineto hw neg fh base sub rlineto 0 base rlineto 0 base neg rmoveto fw 0 rlineto x y fh sub moveto 0 l rlineto } % -------------- Landscape Part ----------------- { x fh add l add y Draw_pt x y hw sub moveto 0 fw rlineto base 0 rlineto fh base sub hw neg rlineto fh base sub neg hw neg rlineto base neg 0 rlineto base 0 rmoveto 0 fw rlineto x fh add y moveto l 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************ Basic Event definition ************** /BASIC_EVENT { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /r {11.5 scl} def % radius of the basic event /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y bh add Draw_pt % x y moveto 0 l neg rlineto x y l sub moveto x y r sub l sub r 90 450 arc x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % -------------- Landscape Part ----------------- { x bh sub y Draw_pt % x y moveto l 0 rlineto x l add y moveto x r add l add y r 180 540 arc x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % ************ Common Event definition ************** /COMMON_EVENT { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /r {11.5 scl} def % radius of the basic event /rc {5 scl} def % radius of the small filled circle which differentiates it from basic event /bh {23 scl} def % full height of the box /bw {35 scl} def % half width of the box /bha {13 scl} def % middle of the basic event circle 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y bh add Draw_pt % x y moveto 0 l neg rlineto x y l sub moveto x y r sub l sub r 90 450 arc /y1 {y bha sub} def x y1 rc 90 450 arc x y moveto bw 0 rlineto 0 bh rlineto bw 2 mul neg 0 rlineto 0 bh neg rlineto bw 0 rlineto } % -------------- Landscape Part ----------------- { x bh sub y Draw_pt % x y moveto l 0 rlineto x l add y moveto x r add l add y r 180 540 arc x y moveto 0 bw rlineto bh neg 0 rlineto 0 2 bw mul neg rlineto bh 0 rlineto } ifelse closepath stroke } def % *************************************************** % ************ state definition ************** /STATE { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /l {2 scl} def % length of the leg of the gate /r {11.5 scl} def % radius of the basic event 1 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x y r 90 450 arc } % -------------- Landscape Part ----------------- { } ifelse closepath stroke } def % ************ state definition ************** /LINE_X { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /y1 exch def % y coordinate of the gate /x1 exch def % y coordinate of the gate /r {11.5 scl} def % radius of the basic event /ex {6 scl} def /arr {4 scl} def 2 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x r sub ex sub y moveto x1 r add y1 lineto x r sub ex sub y moveto x r sub y lineto x r sub ex sub y arr add moveto x r sub y lineto x r sub ex sub y arr sub moveto x r sub y lineto } % -------------- Landscape Part ----------------- { } ifelse closepath stroke } def % ************ state definition ************** /LINE_Y { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /y1 exch def % y coordinate of the gate /x1 exch def % y coordinate of the gate /r {11.5 scl} def % radius of the basic event /ex {6 scl} def /arr {4 scl} def 2 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x1 r sub y1 moveto x r add ex add y lineto x r add ex add y moveto x r add y lineto x r add ex add y arr add moveto x r add y lineto x r add ex add y arr sub moveto x r add y lineto } % -------------- Landscape Part ----------------- { } ifelse closepath stroke } def % ************ state definition ************** /ARC { /y exch def % y coordinate of the gate /x exch def % x coordinate of the gate /y1 exch def % y coordinate of the gate /x1 exch def % x coordinate of the gate /y2 exch def % y coordinate of the gate /x2 exch def % x coordinate of the gate /y3 exch def % y coordinate of the gate /x3 exch def % x coordinate of the gate /r {11.5 scl} def % radius of the basic event /ex {6 scl} def /arr {4 scl} def 2 scl setlinewidth % set the line width newpath % start a new path %x y Draw_pt orient PORTRAIT eq % decide orientation % -------------- Portrait Part ------------------ { x r add y moveto x1 y1 x1 y2 x3 r add y3 curveto x3 y3 moveto x r add ex add y moveto x r add y lineto x r add ex add y arr sub moveto x r add y lineto x r add ex add y arr add moveto x r add y lineto } % -------------- Landscape Part ----------------- { } ifelse closepath stroke } def