trainconsist CLP(FD) based tool for arranging train cars in ways that don't violate rules An example for Playing with Prolog.