Agreeing in networks: Unmatched disturbances, algebraic constraints and optimality. (January 2017)