JOINT INVESTMENT AND OPERATION OF MICROGRID