There seem to be three lines with a Anpanman train. So I'm not sure which one you’re talking about. The one that goes over the Seto Bridge runs from Okayama on the mainland to Matsuyama station in Ehime. In either case, you’ll need to make reservations online. http://www.japanvisitor.com/japan-transport/anpanman-train