In vehicular networks, efficient communication between vehicles and infrastructure relies on the ergodic capacities of V2I links. Meanwhile, the crucial transmission of urgent information, collision avoidance, and improved safety hinges on the ergodic capacities of V2V links. Within this context, the present research endeavors to optimize fundamental parameters within a communication system. The ultimate goal is to achieve peak performance by employing the GSA-BPSO (Gravitational Search Algorithm and Binary Particle Swarm Optimization) optimized neural network approach. The primary objective entails maximizing a weighted sum encompassing three critical components. These components encompass the ergodic capacities of Vehicle-to-Infrastructure (V2I) links, Vehicleto-Vehicle (V2V) links, and the latency requirements tied to V2V links. The study introduces a time delay threshold for V2V data transmission and leverages the GSA-BPSO optimized neural network to optimize key parameters. This enhances system capacity without compromising link communication. Result analysis, specifically for varying time intervals (0.2 ms to 1.2 ms), reveals insights. The Kuhn-Munkres model exhibits the lowest throughput consistently, implying limitations in handling power variations efficiently. The NN model surpasses Kuhn-Munkres but lags behind the GSA-BPSO optimized NN model. Longer time intervals lead to decreased throughput for all models, indicating interference and channel variations. The optimized NN model maintains consistent performance across time intervals, achieving superior throughput under fixed power. The GSA-BPSO optimized NN model outperforms both NN and Kuhn-Munkres models, highlighting its potential for enhancing system throughput with fixed power settings. This research underscores the efficacy of the optimization technique in wireless communication scenarios.