generate_units function

Generate units with specified failure rate