1. A method to generate a class of service model, comprising: electronically generating a ruleset based on a class of service configuration associated with a router; electronically generating a flat representation of the ruleset; electronically generating a class of service model by composing the flat representation into a composed ruleset; and storing the class of service model in a computer-readable memory.