Design for renewable energy systems with application to rural areas in Japan