Modern lifestyle requires high degree of mobility, which instigates increased traffic volumes.Some of the motorway sections with the heaviest traffic volumes are prone to congestions on daily basis, highlighting the importance of the traffic management and control systems. Decreased capacity of the bottleneck can lead to the onset of the shockwave, which travels upstream and causes sudden increase in traffic density and hence a sudden decrease ofspace mean speed. The consequences of shockwaves are negative from both ecological and economic perspective, moreover, sudden oscillations in travel speed represent a potential risk for rear-end collisions.The main aim of this dissertation thesis is to establish more effective traffic control with variable speed limits based on the reduction of shockwaves. First, we have validated the existent continuum macroscopic models oftraffic flowand chosen the most appropriate model depending on its descriptive ability of modelingdynamics. Using a suitable numerical method we then solved the system of partial differential equations of the selected continuum macroscopic traffic flow model, which results in the prediction of the traffic density in time and space and thereby also of the shockwaves. The equilibrium speed-density curve used in the continuum macroscopic flow modelwas based on the empirical data. We solved the corresponding optimal control problem with criteria of reducing the oscillations of the traffic density in time and spaceusing differential evolution algorithm. The result of the method is a set of variable speed limits which lead toshockwaves reduction or elimination. Thus determined variable speed limits were additionally validated with microscopic simulation and traffic-safety analysis.