Neural Network Algorithm with Reinforcement Learning for Microgrid Techno-Economic Optimization