This work presents an intelligent energy management approach for a connected hybrid system composed of photovoltaic (PV) and tidal energy, optimized to supply electricity for the TIMAB Gabes industry. The suggested configuration enables various sources to supply power to the load either independently or concurrently, contingent upon meteorological conditions. The strategy is based on an optimistic management algorithm considering production, prioritized load consumption, and variable electricity tariffs. To do this, we first present the modeling of the different sources equipped with the controllers, allowing their production to be maximized. In the second part, the energy management algorithm is developed to guarantee a consistent allocation of energy transfers between sources, load, and the grid. The manager is finally implemented in the MATLAB/Simulink simulator. The assessment of the complete hybrid system's functionality has been conducted. The obtained results demonstrate the effectiveness of the system in ensuring reliable operation and improving the utilization of renewable energy resources, making it a suitable solution for industrial applications.