Initialize trellis