A fully-monitored smart grid prototype by Wattpic Energia Intel·ligent S.L. in Llagostera (Girona, Spain) is addressed as a case study for developing tools for modelling and optimizing the management of energy supply and demand. A preliminary project phase seeks to develop short term scheduling of energy production tasks including the integrated timing of energy loads. Thus, the demand profile is flexible and can be managed, but the economic objective function penalizes the loads that are not meet at due time. The Mixed-Integer Linear Programming model for the optimization of detailed 24-hour deterministic scenarios is presented. The promising results produced encourage further research regarding the development of decision-making tools for the enhanced design and operation of micro-grids.