  Multiline queues are versatile objects arising from queueing theory in
probability that have come to play a key role in understanding the remarkable
connection between the asymmetric simple exclusion process (ASEP) on a circle
and Macdonald polynomials. We define an insertion procedure we call collapsing
on multiline queues which can be described by raising and lowering crystal
operators. Using this procedure, one naturally recovers several classical
results such as the Lascoux--Sch\"utzenberger charge formulas for $q$-Whittaker
polynomials, Littlewood--Richardson coefficients and the dual Cauchy identity.
We extend the results to generalized multiline queues by defining a statistic
on these objects that allows us to derive a family of formulas, indexed by
compositions, for the $q$-Whittaker polynomials.
