Inference of Markovian-regime-switching models with application to South Australian electricity prices