Microgrid investment under uncertainty: a real option approach using closed form contingent analysis