def preference_deploy(proto_commod, pref_fac, diff):
    """ This function deploys the facility with the highest preference only.
    Paramters:
    ----------
    proto_commod: dictionary
        key: prototype name
        value: dictionary
            key: 'cap', 'pref', 'constraint_commod', 'constraint'
            value
    pref_fac: dictionary
        key: prototype name
        value: preference value
    diff: float
        amount of capacity that is needed

    Returns:
    --------
    deploy_dict: dictionary
        key: prototype name
        value: number of prototype to deploy
    """

    # get the facility with highest preference
    deploy_dict = {}
    proto = sorted(pref_fac,
                   key=pref_fac.get, reverse=True)[0]
    if pref_fac[proto] < 0:
        return deploy_dict
    if diff >= proto_commod[proto]['cap']:
        deploy_dict[proto] = 1
        diff -= proto_commod[proto]['cap']
        while diff > proto_commod[proto]['cap']:
            deploy_dict[proto] += 1
            diff -= proto_commod[proto]['cap']
        if diff == 0:
            return deploy_dict
        else:
            deploy_dict[proto] += 1
    elif diff > 0:
        deploy_dict[proto] = 1
    return deploy_dict