Integration of non-dispatchable renewable energy sources such as wind and solar into the grid is challenging due to the stochastic nature of energy sources. Hence, electrical hubs (EH) and virtual power plants that combine non-dispatchable energy sources, energy storage and dispatchable energy sources such as internal combustion generators and micro gas turbines are getting popular. However, designing such energy systems considering the electricity demand of a neighborhood, curtailments for grid interactions and real time pricing (RTP) of the main utility grid (MUG) is a difficult exercise. Seasonal and hourly variation of electricity demand, potential for each nondispatchable energy source and RTP of MUG needs to be considered when designing the energy system. Representation of dispatch strategy plays a major role in this process where simultaneous optimization of system design and dispatch strategy is required. This study presents a bi-level dispatch strategy based on reinforced learning for simultaneous optimization of system design and operation strategy of an EH. Artificial Neural Network (ANN) was combined with a finite state controller to obtain the operating state of the system. Pareto optimization is conducted considering, lifecycle cost and system autonomy to obtain optimum system design using evolutionary algorithm.