$b_1'\otimes b_2'=
\sigma(b_2 \otimes b_1)$ $$\label{eq:local energy}
  H(e_i(b_2\otimes b_1))=
  H(b_2\otimes b_1)+
  \begin{cases}
    -1 & \text{if $i=0$, $\epsilon_0(b_2)>\varphi_0(b_1)$,
    $\epsilon_0(b_1')>\varphi_0(b_2')$} \\
    1 & \text{if $i=0$, $\epsilon_0(b_2)\le\varphi_0(b_1)$,
    $\epsilon_0(b_1')\le \varphi_0(b_2')$} \\
    0 & \text{otherwise.}
  \end{cases}$$ The pair $(\sigma,H)$ is called the combinatorial $R$-matrix. It is convenient to normalize the local energy function $H$ by requiring that $$\label{eq:extremal H}
  H(u(B_2)\otimes u(B_1)) = 0.$$ With this convention it follows by definition that $$\label{eq:HR=H}
H_{B_1,B_2} \circ \sigma_{B_2,B_1} = H_{B_2,B_1}$$ as operators on $B_2\otimes B_1$.

Let $(B_j,D_j)$ be graded simple $U'_q({\hat{{\mathfrak{g}}}})$-crystals for $1\le
j\le L$ and set $B=B_L\otimes\dotsm\otimes B_1$. Following [@NY] define the energy function $E_B:B\rightarrow{\mathbb{Z}}$ by $$\label{eq:NY}
E_B = \sum_{1\le i<j\le L} H_i\sigma_{i+1}\sigma_{i+2}\dotsm\sigma_{j-1}$$ where $H_i$ (resp. $\sigma_i$) is the local energy function (resp. isomorphism) acting on the $i$-th and $(i+1)$-st tensor factor. By the normalization assumption it follows that $$\label{eq:extremal NY}
E_B(u(B))=0.$$ As shown in [@OSS], the intrinsic energy $D_B$ for the $L$-fold tensor product $B=B_L\otimes\dotsm\otimes B_1$ is given by $$\label{eq:energy}
  D_B = E_B + \sum_{j=1}^L D_j \sigma_1\sigma_2\dotsm\sigma_{j-1}$$ where $D_j$ acts on the rightmost tensor factor which is $B_j$.

The coenergy and intrinsic coenergy are defined as $${\overline{E}}_B=-E_B \qquad\text{and}\qquad {\overline{D}}_B=-D_B.$$

One-dimensional configuration sums
----------------------------------

There are three different sets of paths that we consider. Let $B=B_L\otimes\cdots\otimes B_1$ 