Abstract-This paper presents a flexible, multi-energy district/community optimization model which can consider multiple energy service demands (hot water, base electricity, space heating/cooling), thermal and electrical energy storage, and solar photo-voltaic generation. The formulation can model various levels of virtual and physical aggregation and accommodate various different pricing structures (on energy and capacity). The model is used to demonstrate how thermal and electrical storage can alleviate network constraints, and how various commercial arrangements for relieving these constraints are effective under different aggregation options. Peak demand, annual cash flow (by component) and measures of energy independence are presented as assessment metrics.