def get_trader_dispatch_target(model, trader_id, trade_type):
    """
    Extract dispatch target for a given unit. Return 0 trade_type doesn't
    exist for a given trader_id
    """

    if (trader_id, trade_type) in model.V_TRADER_TOTAL_OFFER.keys():
        return model.V_TRADER_TOTAL_OFFER[trader_id, trade_type].value
    else:
        return 0.0