Allocation of transmission losses in a deregulated electricity market