Semi-analytical tool for optimal management of alluvial aquifers hydraulically connected to streams