Optimization of residential microgrids using black-box modeling methods