Had a similar problem with a Honda Moove, riding along then it died, when it stopped it would start again, then repeat further down the road. It was the throttle position sensor, so replaced it and everything was good, until it happened again. This time it was the idle stop switch, just switched it on/off a few times and it's good again. Now I switch it on and off a few times every day and no problems so far. You need to take it to Yamaha or a competent mechanic with a computer code scanner.