Popis: |
The article continues studying the problem of the calculus of variations that occurs in line structures routing, in particular, roads. The task is to find a line that satisfies all technical constraints and gives a minimum of a given functional, for example, construction costs. The unknown extremal is a parabolic spline, that is, a plane curve, the elements of which are parabolas of the second order conjugated by line segments. The principal feature of the problem is that the number of spline elements is unknown. The spline parameters must satisfy the constraints on the first derivative and curvature. Besides, also the ordinates of the individual points may be restricted. In addition, the lengths of the spline elements must be at least the given values. The problem is solved in two stages. First, the number of elements is determined, and then their parameters are optimized. Algorithms of nonlinear and dynamic programming are used. The structural features of the constraint system are taken into account, and an algorithm for constructing a basis in the null space of the matrix of active constraints is given. As an alternative, an algorithm is implemented that uses penalty functions for violation of constraints on ordinates of given points. The successful implementation of algorithms is reported. |