IMA Tutorial: Control and Pricing in Communication and Power Networks