Implementation of the ym switching model