Varying transition rules in bonus–malus systems: From rules specification to determination of optimal relativities