  Consider a higher-rank graph of rank k. Both the Cuntz-Krieger algebra and
the Toeplitz-Cuntz-Krieger algebra of the graph carry natural gauge actions of
the torus T^k, and restricting these gauge actions to one-parameter subgroups
of T^k gives dynamical systems involving actions of the real line. We study the
KMS states of these dynamical systems. We find that for large inverse
temperatures \beta, the simplex of KMS_\beta states on the
Toeplitz-Cuntz-Krieger algebra has dimension d one less than the number of
vertices in the graph. We also show that there is a preferred dynamics for
which there is a critical inverse temperature \beta_c: for \beta larger than
\beta_c, there is a d-dimensional simplex of KMS states; when \beta=\beta_c and
the one-parameter subgroup is dense, there is a unique KMS state, and this
state factors through the Cuntz-Krieger algebra. As in previous studies for
k=1, our main tool is the Perron-Frobenius theory for irreducible nonnegative
matrices, though here we need a version of the theory for commuting families of
matrices.
