Model Predictive Simulation Using Structured Graphical Models and Transformers