A Probabilistic Graphical Approach to Computing Electricity Price Duration Curves under Price and Quantity Competition