跳转到内容

User:Ab3080888/数学沙盒

维基百科,自由的百科全书
A pictorial representation of a simple linear program with two variables and six inequalities. The set of feasible solutions is depicted in yellow and forms a polygon, a 2-dimensional polytope. The optimum of the linear cost function is where the red line intersects the polygon. The red line is a level set of the cost function, and the arrow indicates the direction in which we are optimizing.
A closed feasible region of a problem with three variables is a convex polyhedron. The surfaces giving a fixed value of the objective function are planes (not shown). The linear programming problem is to find a point on the polyhedron that is on the plane with the highest possible value.

线性规划(英語:Linear Programming,简称LP)是一种数学方法,通过线性方程或不等式描述问题的约束条件和目标,以实现最佳结果(例如利润最大化或成本最小化)。作为最优化的一种特例,线性规划在许多领域都有重要应用。

更严谨地说,线性规划旨在优化一个线性目标函数,该函数需满足一定的线性等式和不等式约束。其解的可行域是一个凸多面体,这一区域由若干线性不等式描述的有限半空间的交集定义。目标函数本质上是定义在这一凸多面体上的实值仿射函数。通过线性规划算法,可以在多面体内找到目标函数的最大值或最小值(若解存在)。

线性规划问题通常用标准形式表达为:

其中,是待求解的变量向量,是已知向量,是已知矩阵。需要最大化的被称为目标函数,而约束条件定义了目标函数优化范围内的凸多面体

线性规划的应用覆盖多个领域。它在数学研究中尤为常见,同时也在商业、经济学以及某些工程问题中具有重要价值。线性规划与特征方程、冯·诺依曼的总体均衡模型及结构均衡模型紧密相关(详见對偶線性規劃)。[1] [2] [3] 目前,运输、能源、电信和制造业等行业广泛使用线性规划模型。通过这种方法,可以高效解决规划、路由、日程安排、任务分配和设计等各类复杂问题,为实际应用提供精确的数学支持。

History

[编辑]
Leonid Kantorovich
John von Neumann

The problem of solving a system of linear inequalities dates back at least as far as Fourier, who in 1827 published a method for solving them,[4] and after whom the method of Fourier–Motzkin elimination is named.

In the late 1930s, Soviet mathematician Leonid Kantorovich and American economist Wassily Leontief independently delved into the practical applications of linear programming. Kantorovich focused on manufacturing schedules, while Leontief explored economic applications. Their groundbreaking work was largely overlooked for decades.

The turning point came during World War II when linear programming emerged as a vital tool. It found extensive use in addressing complex wartime challenges, including transportation logistics, scheduling, and resource allocation. Linear programming proved invaluable in optimizing these processes while considering critical constraints such as costs and resource availability.

Despite its initial obscurity, the wartime successes propelled linear programming into the spotlight. Post-WWII, the method gained widespread recognition and became a cornerstone in various fields, from operations research to economics. The overlooked contributions of Kantorovich and Leontief in the late 1930s eventually became foundational to the broader acceptance and utilization of linear programming in optimizing decision-making processes.[5]

Kantorovich's work was initially neglected in the USSR.[6] About the same time as Kantorovich, the Dutch-American economist T. C. Koopmans formulated classical economic problems as linear programs. Kantorovich and Koopmans later shared the 1975 Nobel Memorial Prize in Economic Sciences.[4] In 1941, Frank Lauren Hitchcock also formulated transportation problems as linear programs and gave a solution very similar to the later simplex method.[7] Hitchcock had died in 1957, and the Nobel Memorial Prize is not awarded posthumously.

From 1946 to 1947 George B. Dantzig independently developed general linear programming formulation to use for planning problems in the US Air Force.[8] In 1947, Dantzig also invented the simplex method that, for the first time efficiently, tackled the linear programming problem in most cases.[8] When Dantzig arranged a meeting with John von Neumann to discuss his simplex method, von Neumann immediately conjectured the theory of duality by realizing that the problem he had been working in game theory was equivalent.[8] Dantzig provided formal proof in an unpublished report "A Theorem on Linear Inequalities" on January 5, 1948.[6] Dantzig's work was made available to public in 1951. In the post-war years, many industries applied it in their daily planning.

Dantzig's original example was to find the best assignment of 70 people to 70 jobs. The computing power required to test all the permutations to select the best assignment is vast; the number of possible configurations exceeds the number of particles in the observable universe. However, it takes only a moment to find the optimum solution by posing the problem as a linear program and applying the simplex algorithm. The theory behind linear programming drastically reduces the number of possible solutions that must be checked.

The linear programming problem was first shown to be solvable in polynomial time by Leonid Khachiyan in 1979,[9] but a larger theoretical and practical breakthrough in the field came in 1984 when Narendra Karmarkar introduced a new interior-point method for solving linear-programming problems.[10]

Uses

[编辑]

Linear programming is a widely used field of optimization for several reasons. Many practical problems in operations research can be expressed as linear programming problems.[6] Certain special cases of linear programming, such as network flow problems and multicommodity flow problems, are considered important enough to have much research on specialized algorithms. A number of algorithms for other types of optimization problems work by solving linear programming problems as sub-problems. Historically, ideas from linear programming have inspired many of the central concepts of optimization theory, such as duality, decomposition, and the importance of convexity and its generalizations. Likewise, linear programming was heavily used in the early formation of microeconomics, and it is currently utilized in company management, such as planning, production, transportation, and technology. Although the modern management issues are ever-changing, most companies would like to maximize profits and minimize costs with limited resources. Google also uses linear programming to stabilize YouTube videos.[11]

Standard form

[编辑]

Standard form is the usual and most intuitive form of describing a linear programming problem. It consists of the following three parts:

  • A linear (or affine) function to be maximized
e.g.
  • Problem constraints of the following form
e.g.
  • Non-negative variables
e.g.

The problem is usually expressed in matrix form, and then becomes:

Other forms, such as minimization problems, problems with constraints on alternative forms, and problems involving negative variables can always be rewritten into an equivalent problem in standard form.

Example

[编辑]
Graphical solution to the farmer example – after shading regions violating the conditions, the vertex of the unshaded region with the dashed line farthest from the origin gives the optimal combination (its lying on the land and pesticide lines implies that revenue is limited by land and pesticide, not fertilizer)

Suppose that a farmer has a piece of farm land, say L hectares, to be planted with either wheat or barley or some combination of the two. The farmer has F kilograms of fertilizer and P kilograms of pesticide. Every hectare of wheat requires F1 kilograms of fertilizer and P1 kilograms of pesticide, while every hectare of barley requires F2 kilograms of fertilizer and P2 kilograms of pesticide. Let S1 be the selling price of wheat and S2 be the selling price of barley, per hectare. If we denote the area of land planted with wheat and barley by x1 and x2 respectively, then profit can be maximized by choosing optimal values for x1 and x2. This problem can be expressed with the following linear programming problem in the standard form:

Maximize: (maximize the revenue (the total wheat sales plus the total barley sales) – revenue is the "objective function")
Subject to: (limit on total area)
(limit on fertilizer)
(limit on pesticide)
(cannot plant a negative area).

In matrix form this becomes:

maximize
subject to

Augmented form (slack form)

[编辑]

Linear programming problems can be converted into an augmented form in order to apply the common form of the simplex algorithm. This form introduces non-negative slack variables to replace inequalities with equalities in the constraints. The problems can then be written in the following block matrix form:

Maximize :

where are the newly introduced slack variables, are the decision variables, and is the variable to be maximized.

Example

[编辑]

The example above is converted into the following augmented form:

Maximize: (objective function)
subject to: (augmented constraint)
(augmented constraint)
(augmented constraint)

where are (non-negative) slack variables, representing in this example the unused area, the amount of unused fertilizer, and the amount of unused pesticide.

In matrix form this becomes:

Maximize :

Duality

[编辑]

Every linear programming problem, referred to as a primal problem, can be converted into a dual problem, which provides an upper bound to the optimal value of the primal problem. In matrix form, we can express the primal problem as:

Maximize cTx subject to Axb, x ≥ 0;
with the corresponding symmetric dual problem,
Minimize bTy subject to ATyc, y ≥ 0.

An alternative primal formulation is:

Maximize cTx subject to Axb;
with the corresponding asymmetric dual problem,
Minimize bTy subject to ATy = c, y ≥ 0.

There are two ideas fundamental to duality theory. One is the fact that (for the symmetric dual) the dual of a dual linear program is the original primal linear program. Additionally, every feasible solution for a linear program gives a bound on the optimal value of the objective function of its dual. The weak duality theorem states that the objective function value of the dual at any feasible solution is always greater than or equal to the objective function value of the primal at any feasible solution. The strong duality theorem states that if the primal has an optimal solution, x*, then the dual also has an optimal solution, y*, and cTx*=bTy*.

A linear program can also be unbounded or infeasible. Duality theory tells us that if the primal is unbounded then the dual is infeasible by the weak duality theorem. Likewise, if the dual is unbounded, then the primal must be infeasible. However, it is possible for both the dual and the primal to be infeasible. See dual linear program for details and several more examples.

Variations

[编辑]

Covering/packing dualities

[编辑]

Template:Covering/packing-problem pairs

A covering LP is a linear program of the form:

Minimize: bTy,
subject to: ATyc, y ≥ 0,

such that the matrix A and the vectors b and c are non-negative.

The dual of a covering LP is a packing LP, a linear program of the form:

Maximize: cTx,
subject to: Axb, x ≥ 0,

such that the matrix A and the vectors b and c are non-negative.

Examples

[编辑]

Covering and packing LPs commonly arise as a linear programming relaxation of a combinatorial problem and are important in the study of approximation algorithms.[12] For example, the LP relaxations of the set packing problem, the independent set problem, and the matching problem are packing LPs. The LP relaxations of the set cover problem, the vertex cover problem, and the dominating set problem are also covering LPs.

Finding a fractional coloring of a graph is another example of a covering LP. In this case, there is one constraint for each vertex of the graph and one variable for each independent set of the graph.

Complementary slackness

[编辑]

It is possible to obtain an optimal solution to the dual when only an optimal solution to the primal is known using the complementary slackness theorem. The theorem states:

Suppose that x = (x1x2, ... , xn) is primal feasible and that y = (y1y2, ... , ym) is dual feasible. Let (w1w2, ..., wm) denote the corresponding primal slack variables, and let (z1z2, ... , zn) denote the corresponding dual slack variables. Then x and y are optimal for their respective problems if and only if

  • xj zj = 0, for j = 1, 2, ... , n, and
  • wi yi = 0, for i = 1, 2, ... , m.

So if the i-th slack variable of the primal is not zero, then the i-th variable of the dual is equal to zero. Likewise, if the j-th slack variable of the dual is not zero, then the j-th variable of the primal is equal to zero.

This necessary condition for optimality conveys a fairly simple economic principle. In standard form (when maximizing), if there is slack in a constrained primal resource (i.e., there are "leftovers"), then additional quantities of that resource must have no value. Likewise, if there is slack in the dual (shadow) price non-negativity constraint requirement, i.e., the price is not zero, then there must be scarce supplies (no "leftovers").

Theory

[编辑]

Existence of optimal solutions

[编辑]

Geometrically, the linear constraints define the feasible region, which is a convex polytope. A linear function is a convex function, which implies that every local minimum is a global minimum; similarly, a linear function is a concave function, which implies that every local maximum is a global maximum.

An optimal solution need not exist, for two reasons. First, if the constraints are inconsistent, then no feasible solution exists: For instance, the constraints x ≥ 2 and x ≤ 1 cannot be satisfied jointly; in this case, we say that the LP is infeasible. Second, when the polytope is unbounded in the direction of the gradient of the objective function (where the gradient of the objective function is the vector of the coefficients of the objective function), then no optimal value is attained because it is always possible to do better than any finite value of the objective function.

Optimal vertices (and rays) of polyhedra

[编辑]

Otherwise, if a feasible solution exists and if the constraint set is bounded, then the optimum value is always attained on the boundary of the constraint set, by the maximum principle for convex functions (alternatively, by the minimum principle for concave functions) since linear functions are both convex and concave. However, some problems have distinct optimal solutions; for example, the problem of finding a feasible solution to a system of linear inequalities is a linear programming problem in which the objective function is the zero function (i.e., the constant function taking the value zero everywhere). For this feasibility problem with the zero-function for its objective-function, if there are two distinct solutions, then every convex combination of the solutions is a solution.

The vertices of the polytope are also called basic feasible solutions. The reason for this choice of name is as follows. Let d denote the number of variables. Then the fundamental theorem of linear inequalities implies (for feasible problems) that for every vertex x* of the LP feasible region, there exists a set of d (or fewer) inequality constraints from the LP such that, when we treat those d constraints as equalities, the unique solution is x*. Thereby we can study these vertices by means of looking at certain subsets of the set of all constraints (a discrete set), rather than the continuum of LP solutions. This principle underlies the simplex algorithm for solving linear programs.

Algorithms

[编辑]
In a linear programming problem, a series of linear constraints produces a convex feasible region of possible values for those variables. In the two-variable case this region is in the shape of a convex simple polygon.

Basis exchange algorithms

[编辑]

Simplex algorithm of Dantzig

[编辑]

The simplex algorithm, developed by George Dantzig in 1947, solves LP problems by constructing a feasible solution at a vertex of the polytope and then walking along a path on the edges of the polytope to vertices with non-decreasing values of the objective function until an optimum is reached for sure. In many practical problems, "stalling" occurs: many pivots are made with no increase in the objective function.[13][14] In rare practical problems, the usual versions of the simplex algorithm may actually "cycle".[14] To avoid cycles, researchers developed new pivoting rules.[15]

In practice, the simplex algorithm is quite efficient and can be guaranteed to find the global optimum if certain precautions against cycling are taken. The simplex algorithm has been proved to solve "random" problems efficiently, i.e. in a cubic number of steps,[16] which is similar to its behavior on practical problems.[13][17]

However, the simplex algorithm has poor worst-case behavior: Klee and Minty constructed a family of linear programming problems for which the simplex method takes a number of steps exponential in the problem size.[13][18][19] In fact, for some time it was not known whether the linear programming problem was solvable in polynomial time, i.e. of complexity class P.

Criss-cross algorithm

[编辑]

Like the simplex algorithm of Dantzig, the criss-cross algorithm is a basis-exchange algorithm that pivots between bases. However, the criss-cross algorithm need not maintain feasibility, but can pivot rather from a feasible basis to an infeasible basis. The criss-cross algorithm does not have polynomial time-complexity for linear programming. Both algorithms visit all 2D corners of a (perturbed) cube in dimension D, the Klee–Minty cube, in the worst case.[15][20]

Interior point

[编辑]

In contrast to the simplex algorithm, which finds an optimal solution by traversing the edges between vertices on a polyhedral set, interior-point methods move through the interior of the feasible region.

Ellipsoid algorithm, following Khachiyan

[编辑]

This is the first worst-case polynomial-time algorithm ever found for linear programming. To solve a problem which has n variables and can be encoded in L input bits, this algorithm runs in time.[9] Leonid Khachiyan solved this long-standing complexity issue in 1979 with the introduction of the ellipsoid method. The convergence analysis has (real-number) predecessors, notably the iterative methods developed by Naum Z. Shor and the approximation algorithms by Arkadi Nemirovski and D. Yudin.

Projective algorithm of Karmarkar

[编辑]

Khachiyan's algorithm was of landmark importance for establishing the polynomial-time solvability of linear programs. The algorithm was not a computational break-through, as the simplex method is more efficient for all but specially constructed families of linear programs.

However, Khachiyan's algorithm inspired new lines of research in linear programming. In 1984, N. Karmarkar proposed a projective method for linear programming. Karmarkar's algorithm[10] improved on Khachiyan's[9] worst-case polynomial bound (giving ). Karmarkar claimed that his algorithm was much faster in practical LP than the simplex method, a claim that created great interest in interior-point methods.[21] Since Karmarkar's discovery, many interior-point methods have been proposed and analyzed.

Vaidya's 87 algorithm

[编辑]

In 1987, Vaidya proposed an algorithm that runs in time.[22]

Vaidya's 89 algorithm

[编辑]

In 1989, Vaidya developed an algorithm that runs in time.[23] Formally speaking, the algorithm takes arithmetic operations in the worst case, where is the number of constraints, is the number of variables, and is the number of bits.

Input sparsity time algorithms

[编辑]

In 2015, Lee and Sidford showed that linear programming can be solved in time,[24] where denotes the soft O notation, and represents the number of non-zero elements, and it remains taking in the worst case.

Current matrix multiplication time algorithm

[编辑]

In 2019, Cohen, Lee and Song improved the running time to time, is the exponent of matrix multiplication and is the dual exponent of matrix multiplication.[25] is (roughly) defined to be the largest number such that one can multiply an matrix by a matrix in time. In a followup work by Lee, Song and Zhang, they reproduce the same result via a different method.[26] These two algorithms remain when and . The result due to Jiang, Song, Weinstein and Zhang improved to .[27]

Comparison of interior-point methods and simplex algorithms

[编辑]

The current opinion is that the efficiencies of good implementations of simplex-based methods and interior point methods are similar for routine applications of linear programming. However, for specific types of LP problems, it may be that one type of solver is better than another (sometimes much better), and that the structure of the solutions generated by interior point methods versus simplex-based methods are significantly different with the support set of active variables being typically smaller for the latter one.[28]

Open problems and recent work

[编辑]

There are several open problems in the theory of linear programming, the solution of which would represent fundamental breakthroughs in mathematics and potentially major advances in our ability to solve large-scale linear programs.

  • Does LP admit a strongly polynomial-time algorithm?
  • Does LP admit a strongly polynomial-time algorithm to find a strictly complementary solution?
  • Does LP admit a polynomial-time algorithm in the real number (unit cost) model of computation?

This closely related set of problems has been cited by Stephen Smale as among the 18 greatest unsolved problems of the 21st century. In Smale's words, the third version of the problem "is the main unsolved problem of linear programming theory." While algorithms exist to solve linear programming in weakly polynomial time, such as the ellipsoid methods and interior-point techniques, no algorithms have yet been found that allow strongly polynomial-time performance in the number of constraints and the number of variables. The development of such algorithms would be of great theoretical interest, and perhaps allow practical gains in solving large LPs as well.

Although the Hirsch conjecture was recently disproved for higher dimensions, it still leaves the following questions open.

  • Are there pivot rules which lead to polynomial-time simplex variants?
  • Do all polytopal graphs have polynomially bounded diameter?

These questions relate to the performance analysis and development of simplex-like methods. The immense efficiency of the simplex algorithm in practice despite its exponential-time theoretical performance hints that there may be variations of simplex that run in polynomial or even strongly polynomial time. It would be of great practical and theoretical significance to know whether any such variants exist, particularly as an approach to deciding if LP can be solved in strongly polynomial time.

The simplex algorithm and its variants fall in the family of edge-following algorithms, so named because they solve linear programming problems by moving from vertex to vertex along edges of a polytope. This means that their theoretical performance is limited by the maximum number of edges between any two vertices on the LP polytope. As a result, we are interested in knowing the maximum graph-theoretical diameter of polytopal graphs. It has been proved that all polytopes have subexponential diameter. The recent disproof of the Hirsch conjecture is the first step to prove whether any polytope has superpolynomial diameter. If any such polytopes exist, then no edge-following variant can run in polynomial time. Questions about polytope diameter are of independent mathematical interest.

Simplex pivot methods preserve primal (or dual) feasibility. On the other hand, criss-cross pivot methods do not preserve (primal or dual) feasibility – they may visit primal feasible, dual feasible or primal-and-dual infeasible bases in any order. Pivot methods of this type have been studied since the 1970s.[29] Essentially, these methods attempt to find the shortest pivot path on the arrangement polytope under the linear programming problem. In contrast to polytopal graphs, graphs of arrangement polytopes are known to have small diameter, allowing the possibility of strongly polynomial-time criss-cross pivot algorithm without resolving questions about the diameter of general polytopes.[15]

Integer unknowns

[编辑]

If all of the unknown variables are required to be integers, then the problem is called an integer programming (IP) or integer linear programming (ILP) problem. In contrast to linear programming, which can be solved efficiently in the worst case, integer programming problems are in many practical situations (those with bounded variables) NP-hard. 0–1 integer programming or binary integer programming (BIP) is the special case of integer programming where variables are required to be 0 or 1 (rather than arbitrary integers). This problem is also classified as NP-hard, and in fact the decision version was one of Karp's 21 NP-complete problems.

If only some of the unknown variables are required to be integers, then the problem is called a mixed integer (linear) programming (MIP or MILP) problem. These are generally also NP-hard because they are even more general than ILP programs.

There are however some important subclasses of IP and MIP problems that are efficiently solvable, most notably problems where the constraint matrix is totally unimodular and the right-hand sides of the constraints are integers or – more general – where the system has the total dual integrality (TDI) property.

Advanced algorithms for solving integer linear programs include:

Such integer-programming algorithms are discussed by Padberg and in Beasley.

Integral linear programs

[编辑]

A linear program in real variables is said to be integral if it has at least one optimal solution which is integral, i.e., made of only integer values. Likewise, a polyhedron is said to be integral if for all bounded feasible objective functions c, the linear program has an optimum with integer coordinates. As observed by Edmonds and Giles in 1977, one can equivalently say that the polyhedron is integral if for every bounded feasible integral objective function c, the optimal value of the linear program is an integer.

Integral linear programs are of central importance in the polyhedral aspect of combinatorial optimization since they provide an alternate characterization of a problem. Specifically, for any problem, the convex hull of the solutions is an integral polyhedron; if this polyhedron has a nice/compact description, then we can efficiently find the optimal feasible solution under any linear objective. Conversely, if we can prove that a linear programming relaxation is integral, then it is the desired description of the convex hull of feasible (integral) solutions.

Terminology is not consistent throughout the literature, so one should be careful to distinguish the following two concepts,

  • in an integer linear program, described in the previous section, variables are forcibly constrained to be integers, and this problem is NP-hard in general,
  • in an integral linear program, described in this section, variables are not constrained to be integers but rather one has proven somehow that the continuous problem always has an integral optimal value (assuming c is integral), and this optimal value may be found efficiently since all polynomial-size linear programs can be solved in polynomial time.

One common way of proving that a polyhedron is integral is to show that it is totally unimodular. There are other general methods including the integer decomposition property and total dual integrality. Other specific well-known integral LPs include the matching polytope, lattice polyhedra, submodular flow polyhedra, and the intersection of two generalized polymatroids/g-polymatroids – e.g. see Schrijver 2003.

Solvers and scripting (programming) languages

[编辑]

Permissive licenses:

Name License Brief info
Gekko MIT License Open-source library for solving large-scale LP, QP, QCQP, NLP, and MIP optimization
GLOP Apache v2 Google's open-source linear programming solver
JuMP MPL License Open-source modeling language with solvers for large-scale LP, QP, QCQP, SDP, SOCP, NLP, and MIP optimization
Pyomo BSD An open-source modeling language for large-scale linear, mixed integer and nonlinear optimization
SCIP Apache v2 A general-purpose constraint integer programming solver with an emphasis on MIP. Compatible with Zimpl modelling language.
SuanShu Apache v2 An open-source suite of optimization algorithms to solve LP, QP, SOCP, SDP, SQP in Java

Copyleft (reciprocal) licenses:

Name License Brief info
ALGLIB GPL 2+ An LP solver from ALGLIB project (C++, C#, Python)
Cassowary constraint solver LGPL An incremental constraint solving toolkit that efficiently solves systems of linear equalities and inequalities
CLP CPL An LP solver from COIN-OR
glpk GPL GNU Linear Programming Kit, an LP/MILP solver with a native C API and numerous (15) third-party wrappers for other languages. Specialist support for flow networks. Bundles the AMPL-like GNU MathProg modelling language and translator.
lp solve LGPL v2.1 An LP and MIP solver featuring support for the MPS format and its own "lp" format, as well as custom formats through its "eXternal Language Interface" (XLI).[30][31] Translating between model formats is also possible.[32]
Qoca GPL A library for incrementally solving systems of linear equations with various goal functions
R-Project GPL A programming language and software environment for statistical computing and graphics

MINTO (Mixed Integer Optimizer, an integer programming solver which uses branch and bound algorithm) has publicly available source code[33] but is not open source.

Proprietary licenses:

Name Brief info
AIMMS A modeling language that allows to model linear, mixed integer, and nonlinear optimization models. It also offers a tool for constraint programming. Algorithm, in the forms of heuristics or exact methods, such as Branch-and-Cut or Column Generation, can also be implemented. The tool calls an appropriate solver such as CPLEX or similar, to solve the optimization problem at hand. Academic licenses are free of charge.
ALGLIB A commercial edition of the copyleft licensed library. C++, C#, Python.
AMPL A popular modeling language for large-scale linear, mixed integer and nonlinear optimisation with a free student limited version available (500 variables and 500 constraints).
Analytica A general modeling language and interactive development environment. Its influence diagrams enable users to formulate problems as graphs with nodes for decision variables, objectives, and constraints. Analytica Optimizer Edition includes linear, mixed integer, and nonlinear solvers and selects the solver to match the problem. It also accepts other engines as plug-ins, including XPRESS, Gurobi, Artelys Knitro, and MOSEK.
APMonitor API to MATLAB and Python. Solve example Linear Programming (LP) problems through MATLAB, Python, or a web-interface.
CPLEX Popular solver with an API for several programming languages, and also has a modelling language and works with AIMMS, AMPL, GAMS, MPL, OpenOpt, OPL Development Studio, and TOMLAB. Free for academic use.
Excel Solver Function A nonlinear solver adjusted to spreadsheets in which function evaluations are based on the recalculating cells. Basic version available as a standard add-on for Excel.
FortMP
GAMS
Gurobi Optimizer
IMSL Numerical Libraries Collections of math and statistical algorithms available in C/C++, Fortran, Java and C#/.NET. Optimization routines in the IMSL Libraries include unconstrained, linearly and nonlinearly constrained minimizations, and linear programming algorithms.
LINDO Solver with an API for large scale optimization of linear, integer, quadratic, conic and general nonlinear programs with stochastic programming extensions. It offers a global optimization procedure for finding guaranteed globally optimal solution to general nonlinear programs with continuous and discrete variables. It also has a statistical sampling API to integrate Monte-Carlo simulations into an optimization framework. It has an algebraic modeling language (LINGO) and allows modeling within a spreadsheet (What'sBest).
Maple A general-purpose programming-language for symbolic and numerical computing.
MATLAB A general-purpose and matrix-oriented programming-language for numerical computing. Linear programming in MATLAB requires the Optimization Toolbox in addition to the base MATLAB product; available routines include INTLINPROG and LINPROG
Mathcad A WYSIWYG math editor. It has functions for solving both linear and nonlinear optimization problems.
Mathematica A general-purpose programming-language for mathematics, including symbolic and numerical capabilities.
MOSEK A solver for large scale optimization with API for several languages (C++, java, .net, Matlab and python).
NAG Numerical Library A collection of mathematical and statistical routines developed by the Numerical Algorithms Group for multiple programming languages (C, C++, Fortran, Visual Basic, Java and C#) and packages (MATLAB, Excel, R, LabVIEW). The Optimization chapter of the NAG Library includes routines for linear programming problems with both sparse and non-sparse linear constraint matrices, together with routines for the optimization of quadratic, nonlinear, sums of squares of linear or nonlinear functions with nonlinear, bounded or no constraints. The NAG Library has routines for both local and global optimization, and for continuous or integer problems.
OptimJ A Java-based modeling language for optimization with a free version available.[34][35]
SAS/OR A suite of solvers for Linear, Integer, Nonlinear, Derivative-Free, Network, Combinatorial and Constraint Optimization; the Algebraic modeling language OPTMODEL; and a variety of vertical solutions aimed at specific problems/markets, all of which are fully integrated with the SAS System.
XPRESS Solver for large-scale linear programs, quadratic programs, general nonlinear and mixed-integer programs. Has API for several programming languages, also has a modelling language Mosel and works with AMPL, GAMS. Free for academic use.
VisSim A visual block diagram language for simulation of dynamical systems.

See also

[编辑]

Notes

[编辑]
  1. ^ von Neumann, J. A Model of General Economic Equilibrium. The Review of Economic Studies. 1945, 13: 1–9. 
  2. ^ Kemeny, J. G.; Morgenstern, O.; Thompson, G. L. A Generalization of the von Neumann Model of an Expanding Economy. Econometrica. 1956, 24: 115–135. 
  3. ^ Li, Wu. General Equilibrium and Structural Dynamics: Perspectives of New Structural Economics. Beijing: Economic Science Press. 2019: 122 – 125. ISBN 978-7-5218-0422-5 (中文). 
  4. ^ 4.0 4.1 Gerard Sierksma; Yori Zwols. Linear and Integer Optimization: Theory and Practice 3rd. CRC Press. 2015: 1. ISBN 978-1498710169. 
  5. ^ Linear programming | Definition & Facts | Britannica. www.britannica.com. [2023-11-20] (英语). 
  6. ^ 6.0 6.1 6.2 George B. Dantzig. Reminiscences about the origins of linear programming (PDF). Operations Research Letters. April 1982, 1 (2): 43–48. doi:10.1016/0167-6377(82)90043-8. (原始内容存档 (PDF)于May 20, 2015). 
  7. ^ Alexander Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons. 1998: 221–222. ISBN 978-0-471-98232-6. 
  8. ^ 8.0 8.1 8.2 Dantzig, George B.; Thapa, Mukund Narain. Linear programming. New York: Springer. 1997: xxvii. ISBN 0387948333. OCLC 35318475. 
  9. ^ 9.0 9.1 9.2 Leonid Khachiyan. A Polynomial Algorithm for Linear Programming. Doklady Akademii Nauk SSSR. 1979, 224 (5): 1093–1096. 
  10. ^ 10.0 10.1 Narendra Karmarkar. A New Polynomial-Time Algorithm for Linear Programming. Combinatorica. 1984, 4 (4): 373–395. S2CID 7257867. doi:10.1007/BF02579150. 
  11. ^ M. Grundmann; V. Kwatra; I. Essa. Auto-directed video stabilization with robust L1 optimal camera paths. CVPR 2011 (PDF). 2011: 225–232. ISBN 978-1-4577-0394-2. S2CID 17707171. doi:10.1109/CVPR.2011.5995525 (English). 
  12. ^ Vazirani (2001,第112頁)
  13. ^ 13.0 13.1 13.2 Dantzig & Thapa (2003)
  14. ^ 14.0 14.1 Padberg (1999)
  15. ^ 15.0 15.1 15.2 Fukuda, Komei; Terlaky, Tamás. Thomas M. Liebling; Dominique de Werra , 编. Criss-cross methods: A fresh view on pivot algorithms. Mathematical Programming, Series B. 1997, 79 (1–3): 369–395. CiteSeerX 10.1.1.36.9373可免费查阅. MR 1464775. S2CID 2794181. doi:10.1007/BF02614325. 
  16. ^ Borgwardt (1987)
  17. ^ Todd (2002)
  18. ^ Murty (1983)
  19. ^ Papadimitriou & Steiglitz
  20. ^ Roos, C. An exponential example for Terlaky's pivoting rule for the criss-cross simplex method. Mathematical Programming. Series A. 1990, 46 (1): 79–84. MR 1045573. S2CID 33463483. doi:10.1007/BF01585729. 
  21. ^ Strang, Gilbert. Karmarkar's algorithm and its place in applied mathematics. The Mathematical Intelligencer. 1 June 1987, 9 (2): 4–10. ISSN 0343-6993. MR 0883185. S2CID 123541868. doi:10.1007/BF03025891. 
  22. ^ Vaidya, Pravin M. An algorithm for linear programming which requires arithmetic operations. 28th Annual IEEE Symposium on Foundations of Computer Science. FOCS. 1987. 
  23. ^ Vaidya, Pravin M. 30th Annual Symposium on Foundations of Computer Science. 30th Annual Symposium on Foundations of Computer Science. FOCS: 332–337. 1989. ISBN 0-8186-1982-1. doi:10.1109/SFCS.1989.63499.  |chapter=被忽略 (帮助)
  24. ^ Lee, Yin-Tat; Sidford, Aaron. Efficient inverse maintenance and faster algorithms for linear programming. FOCS '15 Foundations of Computer Science. 2015. arXiv:1503.01752可免费查阅. 
  25. ^ Cohen, Michael B.; Lee, Yin-Tat; Song, Zhao. Solving Linear Programs in the Current Matrix Multiplication Time. 51st Annual ACM Symposium on the Theory of Computing. STOC'19. 2018. arXiv:1810.07896可免费查阅. 
  26. ^ Lee, Yin-Tat; Song, Zhao; Zhang, Qiuyi. Solving Empirical Risk Minimization in the Current Matrix Multiplication Time. Conference on Learning Theory. COLT'19. 2019. arXiv:1905.04447可免费查阅. 
  27. ^ Jiang, Shunhua; Song, Zhao; Weinstein, Omri; Zhang, Hengjie. Faster Dynamic Matrix Inverse for Faster LPs. 2020. arXiv:2004.07470可免费查阅. 
  28. ^ Illés, Tibor; Terlaky, Tamás. Pivot versus interior point methods: Pros and cons. European Journal of Operational Research. 2002, 140 (2): 170. CiteSeerX 10.1.1.646.3539可免费查阅. doi:10.1016/S0377-2217(02)00061-9. 
  29. ^ Anstreicher, Kurt M.; Terlaky, Tamás. A Monotonic Build-Up Simplex Algorithm for Linear Programming. Operations Research. 1994, 42 (3): 556–561. ISSN 0030-364X. JSTOR 171894. doi:10.1287/opre.42.3.556可免费查阅. 
  30. ^ lp_solve reference guide (5.5.2.5). mit.edu. [2023-08-10]. 
  31. ^ External Language Interfaces. [3 December 2021]. 
  32. ^ lp_solve command. [3 December 2021]. 
  33. ^ COR@L – Computational Optimization Research At Lehigh. lehigh.edu. 
  34. ^ http://www.in-ter-trans.eu/resources/Zesch_Hellingrath_2010_Integrated+Production-Distribution+Planning.pdf OptimJ used in an optimization model for mixed-model assembly lines, University of Münster
  35. ^ http://www.aaai.org/ocs/index.php/AAAI/AAAI10/paper/viewFile/1769/2076 互联网档案馆存檔,存档日期2011-06-29. OptimJ used in an Approximate Subgame-Perfect Equilibrium Computation Technique for Repeated Games

References

[编辑]

Further reading

[编辑]
  • Dmitris Alevras and Manfred W. Padberg, Linear Optimization and Extensions: Problems and Solutions, Universitext, Springer-Verlag, 2001. (Problems from Padberg with solutions.)
  • de Berg, Mark; van Kreveld, Marc; Overmars, Mark; Schwarzkopf, Otfried. Computational Geometry需要免费注册 2nd revised. Springer-Verlag. 2000. ISBN 978-3-540-65620-3.  Chapter 4: Linear Programming: pp. 63–94. Describes a randomized half-plane intersection algorithm for linear programming.
  • Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman. 1979. ISBN 978-0-7167-1045-5.  A6: MP1: INTEGER PROGRAMMING, pg.245. (computer science, complexity theory)
  • Template:Cite Gartner Matousek 2006 (elementary introduction for mathematicians and computer scientists)
  • Cornelis Roos, Tamás Terlaky, Jean-Philippe Vial, Interior Point Methods for Linear Optimization, Second Edition, Springer-Verlag, 2006. (Graduate level)
  • Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency. Springer. 2003. 
  • Alexander Schrijver, Theory of Linear and Integer Programming. John Wiley & sons, 1998, ISBN 0-471-98232-6 (mathematical)
  • Gerard Sierksma; Yori Zwols. Linear and Integer Optimization: Theory and Practice. CRC Press. 2015. ISBN 978-1-498-71016-9. 
  • Gerard Sierksma; Diptesh Ghosh. Networks in Action; Text and Computer Exercises in Network Optimization. Springer. 2010. ISBN 978-1-4419-5512-8.  (linear optimization modeling)
  • H. P. Williams, Model Building in Mathematical Programming, Fifth Edition, 2013. (Modeling)
  • Stephen J. Wright, 1997, Primal-Dual Interior-Point Methods, SIAM. (Graduate level)
  • Yinyu Ye, 1997, Interior Point Algorithms: Theory and Analysis, Wiley. (Advanced graduate-level)
  • Ziegler, Günter M., Chapters 1–3 and 6–7 in Lectures on Polytopes, Springer-Verlag, New York, 1994. (Geometry)
[编辑]

Template:Optimization algorithms Template:Mathematical programming

A geodesic on an oblate ellipsoid

The study of geodesics on an ellipsoid arose in connection with geodesy specifically with the solution of triangulation networks. The figure of the Earth is well approximated by an oblate ellipsoid, a slightly flattened sphere. A geodesic is the shortest path between two points on a curved surface, i.e., the analogue of a straight line on a plane surface. The solution of a triangulation network on an ellipsoid is therefore a set of exercises in spheroidal trigonometry (Euler 1755).

Isaac Newton
Leonhard Euler

If the Earth is treated as a sphere, the geodesics are great circles (all of which are closed) and the problems reduce to ones in spherical trigonometry. However, Newton (1687) showed that the effect of the rotation of the Earth results in its resembling a slightly oblate ellipsoid and, in this case, the equator and the meridians are the only closed geodesics. Furthermore, the shortest path between two points on the equator does not necessarily run along the equator. Finally, if the ellipsoid is further perturbed to become a triaxial ellipsoid (with three distinct semi-axes), then only three geodesics are closed and one of these is unstable.

The problems in geodesy are usually reduced to two main cases: the direct problem, given a starting point and an initial heading, find the position after traveling a certain distance along the geodesic; and the inverse problem, given two points on the ellipsoid find the connecting geodesic and hence the shortest distance between them. Because the flattening of the Earth is small, the geodesic distance between two points on the Earth is well approximated by the great-circle distance using the mean Earth radius—the relative error is less than 1%. However, the course of the geodesic can differ dramatically from that of the great circle. As an extreme example, consider two points on the equator with a longitude difference of 179°59′; while the connecting great circle follows the equator, the shortest geodesics pass within 180 km of either pole (the flattening makes two symmetric paths passing close to the poles shorter than the route along the equator).

Aside from their use in geodesy and related fields such as navigation, terrestrial geodesics arise in the study of the propagation of signals which are confined (approximately) to the surface of the Earth, for example, sound waves in the ocean (Munk & Forbes 1989) and the radio signals from lightning (Casper & Bent 1991). Geodesics are used to define some maritime boundaries, which in turn determine the allocation of valuable resources as such oil and mineral rights. Ellipsoidal geodesics also arise in other applications; for example, the propagation of radio waves along the fuselage of an aircraft, which can be roughly modeled as a prolate (elongated) ellipsoid (Kim & Burnside 1986).

Geodesics are an important intrinsic characteristic of curved surfaces. The sequence of progressively more complex surfaces, the sphere, an ellipsoid of revolution, and a triaxial ellipsoid, provide a useful family of surfaces for investigating the general theory of surfaces. Indeed, Gauss's work on the survey of Hanover, which involved geodesics on an oblate ellipsoid, was a key motivation for his study of surfaces (Gauss 1828). Similarly, the existence of three closed geodesics on a triaxial ellipsoid turns out to be a general property of closed, simply connected surfaces; this was conjectured by Poincaré (1905) and proved by Lyusternik & Schnirelmann (1929) (Klingenberg 1982,§3.7).

Geodesics on an ellipsoid of revolution

[编辑]

There are several ways of defining geodesics (Hilbert & Cohn-Vossen 1952,第220–221頁). A simple definition is as the shortest path between two points on a surface. However, it is frequently more useful to define them as paths with zero geodesic curvature—i.e., the analogue of straight lines on a curved surface. This definition encompasses geodesics traveling so far across the ellipsoid's surface (somewhat less than half the circumference) that other distinct routes require less distance. Locally, these geodesics are still identical to the shortest distance between two points.

By the end of the 18th century, an ellipsoid of revolution (the term spheroid is also used) was a well-accepted approximation to the figure of the Earth. The adjustment of triangulation networks entailed reducing all the measurements to a reference ellipsoid and solving the resulting two-dimensional problem as an exercise in spheroidal trigonometry (Bomford 1952,Chap. 3).

Fig. 1. A geodesic AB on an ellipsoid of revolution. N is the north pole and EFH lie on the equator.

It is possible to reduce the various geodesic problems into one of two types. Consider two points: A at latitude φ1 and longitude λ1 and B at latitude φ2 and longitude λ2 (see Fig. 1). The connecting geodesic (from A to B) is AB, of length s12, which has azimuths α1 and α2 at the two endpoints.[1] The two geodesic problems usually considered are:

  1. the direct geodesic problem or first geodesic problem, given A, α1, and s12, determine B and α2;
  2. the inverse geodesic problem or second geodesic problem, given A and B, determine s12, α1, and α2.

As can be seen from Fig. 1, these problems involve solving the triangle NAB given one angle, α1 for the direct problem and λ12 = λ2 − λ1 for the inverse problem, and its two adjacent sides. In the course of the 18th century these problems were elevated (especially in literature in the German language) to the principal geodesic problems (Hansen 1865,第69頁).

For a sphere the solutions to these problems are simple exercises in spherical trigonometry, whose solution is given by formulas for solving a spherical triangle. (See the article on great-circle navigation.)

Alexis Clairaut
Barnaba Oriani

For an ellipsoid of revolution, the characteristic constant defining the geodesic was found by Clairaut (1735). A systematic solution for the paths of geodesics was given by Legendre (1806) and Oriani (1806) (and subsequent papers in 1808 and 1810). The full solution for the direct problem (complete with computational tables and a worked out example) is given by Bessel (1825).[2]

Much of the early work on these problems was carried out by mathematicians—for example, Legendre, Bessel, and Gauss—who were also heavily involved in the practical aspects of surveying. Beginning in about 1830, the disciplines diverged: those with an interest in geodesy concentrated on the practical aspects such as approximations suitable for field work, while mathematicians pursued the solution of geodesics on a triaxial ellipsoid, the analysis of the stability of closed geodesics, etc.

During the 18th century geodesics were typically referred to as "shortest lines".[3] The term "geodesic line" was coined by Laplace (1799b):

Nous désignerons cette ligne sous le nom de ligne géodésique [We will call this line the geodesic line].

This terminology was introduced into English either as "geodesic line" or as "geodetic line", for example (Hutton 1811),

A line traced in the manner we have now been describing, or deduced from trigonometrical measures, by the means we have indicated, is called a geodetic or geodesic line: it has the property of being the shortest which can be drawn between its two extremities on the surface of the Earth; and it is therefore the proper itinerary measure of the distance between those two points.

In its adoption by other fields "geodesic line", frequently shortened, to "geodesic", was preferred.[4]

This section treats the problem on an ellipsoid of revolution (both oblate and prolate). The problem on a triaxial ellipsoid is covered in the next section.

When determining distances on the earth, various approximate methods are frequently used; some of these are described in the article on geographical distance.

Equations for a geodesic

[编辑]
Friedrich Bessel
Fig. 2. Differential element of a meridian ellipse.
Fig. 3. Differential element of a geodesic on an ellipsoid.

Here the equations for a geodesic are developed; these allow the geodesics of any length to be computed accurately. The following derivation closely follows that of Bessel (1825). Bagratuni (1962,§15), Krakiwsky & Thomson (1974,§4), Rapp (1993,§1.2), and Borre & Strang (2012) also provide derivations of these equations.

Consider an ellipsoid of revolution with equatorial radius a and polar semi-axis b. Define the flattening f = (a − b)/a, the eccentricity e2 = f(2 − f), and the second eccentricity e′ = e/(1 − f). (In most applications in geodesy, the ellipsoid is taken to be oblate, a > b; however, the theory applies without change to prolate ellipsoids, a < b, in which case f, e2, and e2 are negative.)

Let an elementary segment of a path on the ellipsoid have length ds. From Figs. 2 and 3, we see that if its azimuth is α, then ds is related to dφ and dλ by

(1)

where ρ is the meridional radius of curvature, R = ν cosφ is the radius of the circle of latitude φ, and ν is the normal radius of curvature. The elementary segment is therefore given by

or

where φ′ = dφ/dλ and L depends on φ through ρ(φ) and R(φ). The length of an arbitrary path between (φ1, λ1) and (φ2, λ2) is given by

where φ is a function of λ satisfying φ(λ1) = φ1 and φ(λ2) = φ2. The shortest path or geodesic entails finding that function φ(λ) which minimizes s12. This is an exercise in the calculus of variations and the minimizing condition is given by the Beltrami identity,

Fig. 4. The geometric construction for parametric latitude, β. A point P at latitude φ on the meridian (red) is mapped to a point P′ on a sphere of radius a (shown as a blue circle) by keeping the radius R constant.

Substituting for L and using Eqs. (1) gives

Clairaut (1735) first found this relation, using a geometrical construction; a similar derivation is presented by Lyusternik (1964,§10).[5] Differentiating this relation and manipulating the result gives (Jekeli 2012,Eq. (2.95))

This, together with Eqs. (1), leads to a system of ordinary differential equations for a geodesic (Borre & Strang 2012,Eqs. (11.71) and (11.76))

(2)

We can express R in terms of the parametric latitude, β,[6] using

(see Fig. 4 for the geometrical construction), and Clairaut's relation then becomes

Fig. 5. Geodesic problem mapped to the auxiliary sphere.
Fig. 6. The elementary geodesic problem on the auxiliary sphere.

This is the sine rule of spherical trigonometry relating two sides of the triangle NAB (see Fig. 5), NA = ½π − β1, and NB = ½π − β2 and their opposite angles B = π − α2 and A = α1.

In order to find the relation for the third side AB = σ12, the spherical arc length, and included angle N = ω12, the spherical longitude, it is useful to consider the triangle NEP representing a geodesic starting at the equator; see Fig. 6. In this figure, the variables referred to the auxiliary sphere are shown with the corresponding quantities for the ellipsoid shown in parentheses. Quantities without subscripts refer to the arbitrary point P; E, the point at which the geodesic crosses the equator in the northward direction, is used as the origin for σ, s and ω.

Fig. 7. Differential element of a geodesic on a sphere.

If the side EP is extended by moving P infinitesimally (see Fig. 7), we obtain

(3)

Combining Eqs. (1) and (3) gives differential equations for s and λ

Up to this point, we have not made use of the specific equations for an ellipsoid, and indeed the derivation applies to an arbitrary surface of revolution.[7] Bessel now specializes to an ellipsoid in which R and Z are related by

where Z is the height above the equator (see Fig. 4). Differentiating this and setting dR/dZ = −sinφ/cosφ gives

eliminating Z from these equations, we obtain

This relation between β and φ can be written as

which is the normal definition of the parametric latitude on an ellipsoid. Furthermore, we have

so that the differential equations for the geodesic become

The last step is to use σ as the independent parameter[8] in both of these differential equations and thereby to express s and λ as integrals. Applying the sine rule to the vertices E and G in the spherical triangle EGP in Fig. 6 gives

where α0 is the azimuth at E. Substituting this into the equation for ds/dσ and integrating the result gives

(4)

where

and the limits on the integral are chosen so that s(σ = 0) = 0. Legendre (1811,第180頁) pointed out that the equation for s is the same as the equation for the arc on an ellipse with semi-axes b(1 + e2 cos2α0)1/2 and b. In order to express the equation for λ in terms of σ, we write

which follows from Eq. (3) and Clairaut's relation. This yields

(5)

and the limits on the integrals are chosen so that λ = λ0 at the equator crossing, σ = 0.

In using these integral relations, we allow σ to increase continuously (not restricting it to a range [−π, π], for example) as the great circle, resp. geodesic, encircles the auxiliary sphere, resp. ellipsoid. The quantities ω, λ, and s are likewise allowed to increase without limit. Once the problem is solved, λ can be reduced to the conventional range.

This completes the solution of the path of a geodesic using the auxiliary sphere. By this device a great circle can be mapped exactly to a geodesic on an ellipsoid of revolution. However, because the equations for s and λ in terms of the spherical quantities depend on α0, the mapping is not a consistent mapping of the surface of the sphere to the ellipsoid or vice versa; instead, it should be viewed merely as a convenient tool for solving for a particular geodesic.

There are also several ways of approximating geodesics on an ellipsoid which usually apply for sufficiently short lines (Rapp 1991,§6); however, these are typically comparable in complexity to the method for the exact solution given above (Jekeli 2012,§2.1.4).

Behavior of geodesics

[编辑]
Fig. 8. Meridians and the equator are the only closed geodesics. (For the very flattened ellipsoids, there are other closed geodesics; see Figs. 13 and 14).
Geodesic on an oblate ellipsoid (f = 1/50) with α0 = 45°.
Fig. 9. Latitude as a function of longitude for a single cycle of the geodesic from one northward equatorial crossing to the next.
Fig. 10. Following the geodesic on the ellipsoid for about 5 circuits.
Fig. 11. The same geodesic after about 70 circuits.
Fig. 12. Geodesic on a prolate ellipsoid (f = −1/50) with α0 = 45°. Compare with Fig. 10.

Before solving for the geodesics, it is worth reviewing their behavior. Fig. 8 shows the simple closed geodesics which consist of the meridians (green) and the equator (red). (Here the qualification "simple" means that the geodesic closes on itself without an intervening self-intersection.) This follows from the equations for the geodesics given in the previous section.

For meridians, we have α0 = 0 and Eq. (5) becomes λ = ω + λ0, i.e., the longitude will vary the same way as for a sphere, jumping by π each time the geodesic crosses the pole. The distance, Eq. (4), reduces to the length of an arc of an ellipse with semi-axes a and b (as expected), expressed in terms of parametric latitude, β.

The equator (β = 0 on the auxiliary sphere, φ = 0 on the ellipsoid) corresponds to α0 = ½π. The distance reduces to the arc of a circle of radius b (and not a), s = bσ, while the longitude simplifies to λ = (1 − f)σ + λ0. A geodesic that is nearly equatorial will intersect the equator at intervals of πb. As a consequence, the maximum length of a equatorial geodesic which is also a shortest path is πb on an oblate ellipsoid (on a prolate ellipsoid, the maximum length is πa).

All other geodesics are typified by Figs. 9 to 11. Figure 9 shows latitude as a function of longitude for a geodesic starting on the equator with α0 = 45°. A full cycle of the geodesic, from one northward crossing of the equator to the next, is shown. The equatorial crossings are called nodes and the points of maximum or minimum latitude are called vertices; the vertex latitudes are given by |β| = ±(½π − |α0|). The latitude is an odd, resp. even, function of the longitude about the nodes, resp. vertices. The geodesic completes one full oscillation in latitude before the longitude has increased by 360°. Thus, on each successive northward crossing of the equator (see Fig. 10), λ falls short of a full circuit of the equator by approximately 2π f sinα0 (for a prolate ellipsoid, this quantity is negative and λ completes more that a full circuit; see Fig. 12). For nearly all values of α0, the geodesic will fill that portion of the ellipsoid between the two vertex latitudes (see Fig. 11).

Two additional closed geodesics for the oblate ellipsoid, b/a = 2/7.
Fig. 13. Side view.
Fig. 14. Top view.

If the ellipsoid is sufficiently oblate, i.e., b/a < ½, another class of simple closed geodesics is possible (Klingenberg 1982,§3.5.19). Two such geodesics are illustrated in Figs. 13 and 14. Here b/a = 2/7 and the equatorial azimuth, α0, for the green (resp. blue) geodesic is chosen to be 53.175° (resp. 75.192°), so that the geodesic completes 2 (resp. 3) complete oscillations about the equator on one circuit of the ellipsoid.

Evaluation of the integrals

[编辑]

Solving the geodesic problems entails evaluating the integrals for the distance, s, and the longitude, λ, Eqs. (4) and (5). In geodetic applications, where f is small, the integrals are typically evaluated as a series; for this purpose, the second form of the longitude integral is preferred (since it avoids the near singular behavior of the first form when geodesics pass close to a pole). In both integrals, the integrand is an even periodic function of period π. Furthermore, the term dependent on σ is multiplied by a small quantity k2 = O(f). As a consequence, the integrals can both be written in the form

where B0 = 1 + O(f) and Bj = O(f j). Series expansions for Bj can readily be found and the result truncated so that only terms which are O(f J) and larger are retained.[9] (Because the longitude integral is multiplied by f, it is typically only necessary to retain terms up to O(f J−1) in that integral.) This prescription is followed by many authors (Legendre 1806) (Oriani 1806) (Bessel 1825) (Helmert 1880) (Rainsford 1955) (Rapp 1993). Vincenty (1975a) uses J = 3 which provides an accuracy of about 0.1 mm for the WGS84 ellipsoid. Karney (2013) gives expansions carried out for J = 6 which suffices to provide full double precision accuracy for |f| ≤ 1/50. Trigonometric series of this type can be conveniently summed using Clenshaw summation.

In order to solve the direct geodesic problem, it is necessary to find σ given s. Since the integrand in the distance integral is positive, this problem has a unique root, which may be found using Newton's method, noting that the required derivative is just the integrand of the distance integral. Oriani (1833) instead uses series reversion so that σ can be found without iteration; Helmert (1880) gives a similar series.[10] The reverted series converges somewhat slower that the direct series and, if |f| > 1/100, Karney (2013,addenda) supplements the reverted series with one step of Newton's method to maintain accuracy. Vincenty (1975a) instead relies on a simpler (but slower) function iteration to solve for σ.

It is also possible to evaluate the integrals (4) and (5) by numerical quadrature (Saito 1970) (Saito 1979) (Sjöberg & Shirazian 2012) or to apply numerical techniques for the solution of the ordinary differential equations, Eqs. (2) (Kivioja 1971) (Thomas & Featherstone 2005) (Panou et al. 2013). Such techniques can be used for arbitrary flattening f. However, if f is small, e.g., |f| ≤ 1/50, they do not offer the speed and accuracy of the series expansions described above. Furthermore, for arbitrary f, the evaluation of the integrals in terms of elliptic integrals (see below) also provides a fast and accurate solution. On the other hand, Mathar (2007) has tackled the more complex problem of geodesics on the surface at a constant altitude, h, above the ellipsoid by solving the corresponding ordinary differential equations, Eqs. (2) with [ρ, ν] replaced by [ρ + h, ν + h].

A. M. Legendre
Arthur Cayley

Geodesics on an ellipsoid was an early application of elliptic integrals. In particular, Legendre (1811) writes the integrals, Eqs. (4) and (5), as

(6)
(7)

where

and

and F(φ, k), E(φ, k), and Π(φ, α2k), are incomplete elliptic integrals in the notation of DLMF (2010§19.2(ii)).[11][12] The first formula for the longitude in Eq. (7) follows directly from the first form of Eq. (5). The second formula in Eq. (7), due to Cayley (1870), is more convenient for calculation since the elliptic integral appears in a small term. The equivalence of the two forms follows from DLMF (2010Eq. (19.7.8)). Fast algorithms for computing elliptic integrals are given by Carlson (1995) in terms of symmetric elliptic integrals. Equation (6) is conveniently inverted using Newton's method. The use of elliptic integrals provides a good method of solving the geodesic problem for |f| > 1/50.[13]

Solution of the direct problem

[编辑]

The basic strategy for solving the geodesic problems on the ellipsoid is to map the problem onto the auxiliary sphere by converting φ, λ, and s, to β, ω and σ, to solve the corresponding great-circle problem on the sphere, and to transfer the results back to the ellipsoid.

In implementing this program, we will frequently need to solve the "elementary" spherical triangle for NEP in Fig. 6 with P replaced by either A (subscript 1) or B (subscript 2). For this purpose, we can apply Napier's rules for quadrantal triangles to the triangle NEP on the auxiliary sphere which give

We can also stipulate that cosβ ≥ 0 and cosα0 ≥ 0.[14] Implementing this plan for the direct problem is straightforward. We are given φ1, α1, and s12. From φ1 we obtain β1 (using the formula for the parametric latitude). We now solve the triangle problem with P = A and β1 and α1 given to find α0, σ1, and ω1.[15] Use the distance and longitude equations, Eqs. (4) and (5), together with the known value of λ1, to find s1 and λ0. Determine s2 = s1 + s12 and invert the distance equation to find σ2. Solve the triangle problem with P = B and α0 and σ2 given to find β2, ω2, and α2. Convert β2 to φ2 and substitute σ2 and ω2 into the longitude equation to give λ2.[16]

The overall method follows the procedure for solving the direct problem on a sphere. It is essentially the program laid out by Bessel (1825),[17] Helmert (1880,§5.9), and most subsequent authors.

Intermediate points, way-points, on a geodesic can be found by holding φ1 and α1 fixed and solving the direct problem for several values of s12. Once the first waypoint is found, only the last portion of the solution (starting with the determination of s2) needs to be repeated for each new value of s12.

Solution of the inverse problem

[编辑]

The ease with which the direct problem can be solved results from the fact that given φ1 and α1, we can immediately find α0, the parameter in the distance and longitude integrals, Eqs. (4) and (5). In the case of the inverse problem, we are given λ12, but we cannot easily relate this to the equivalent spherical angle ω12 because α0 is unknown. Thus, the solution of the problem requires that α0 be found iteratively. Before tackling this, it is worth understanding better the behavior of geodesics, this time, keeping the starting point fixed and varying the azimuth.

Geodesics from a single point (f = 1/10, φ1 = −30°)
Fig. 15. Geodesics, geodesic circles, and the cut locus.
Fig. 16. The geodesics shown on a plate carrée projection.
Fig. 17. λ12 as a function of α1 for φ1 = −30° and φ2 = 20°.

Suppose point A in the inverse problem has φ1 = −30° and λ1 = 0°. Fig. 15 shows geodesics (in blue) emanating A with α1 a multiple of 15° up to the point at which they cease to be shortest paths. (The flattening has been increased to 1/10 in order to accentuate the ellipsoidal effects.) Also shown (in green) are curves of constant s12, which are the geodesic circles centered A. Gauss (1828) showed that, on any surface, geodesics and geodesic circle intersect at right angles. The red line is the cut locus, the locus of points which have multiple (two in this case) shortest geodesics from A. On a sphere, the cut locus is a point. On an oblate ellipsoid (shown here), it is a segment of the circle of latitude centered on the point antipodal to A, φ = −φ1. The longitudinal extent of cut locus is approximately λ12 ∈ [π − f π cosφ1, π + f π cosφ1]. If A lies on the equator, φ1 = 0, this relation is exact and as a consequence the equator is only a shortest geodesic if |λ12| ≤ (1 − f)π. For a prolate ellipsoid, the cut locus is a segment of the anti-meridian centered on the point antipodal to A, λ12 = π, and this means that meridional geodesics stop being shortest paths before the antipodal point is reached.

The solution of the inverse problem involves determining, for a given point B with latitude φ2 and longitude λ2 which blue and green curves it lies on; this determines α1 and s12 respectively. In Fig. 16, the ellipsoid has been "rolled out" onto a plate carrée projection. Suppose φ2 = 20°, the green line in the figure. Then as α1 is varied between 0° and 180°, the longitude at which the geodesic intersects φ = φ2 varies between 0° and 180° (see Fig. 17). This behavior holds provided that |φ2| ≤ |φ1| (otherwise the geodesic does not reach φ2 for some values of α1). Thus, the inverse problem may be solved by determining the value α1 which results in the given value of λ12 when the geodesic intersects the circle φ = φ2.

This suggests the following strategy for solving the inverse problem (Karney 2013). Assume that the points A and B satisfy

(8)

(There is no loss of generality in this assumption, since the symmetries of the problem can be used to generate any configuration of points from such configurations.)

  1. First treat the "easy" cases, geodesics which lie on a meridian or the equator. Otherwise...
  2. Guess a value of α1.
  3. Solve the so-called hybrid geodesic problem, given φ1, φ2, and α1 find λ12, s12, and α2, corresponding to the first intersection of the geodesic with the circle φ = φ2.
  4. Compare the resulting λ12 with the desired value and adjust α1 until the two values agree. This completes the solution.

Each of these steps requires some discussion.

1. For an oblate ellipsoid, the shortest geodesic lies on a meridian if either point lies on a pole or if λ12 = 0 or ±π. The shortest geodesic follows the equator if φ1 = φ2 = 0 and |λ12| ≤ (1 − f)π. For a prolate ellipsoid, the meridian is no longer the shortest geodesic if λ12 = ±π and the points are close to antipodal (this will be discussed in the next section). There is no longitudinal restriction on equatorial geodesics.

2. In most cases a suitable starting value of α1 is found by solving the spherical inverse problem[14]

with ω12 = λ12. This may be a bad approximation if A and B are nearly antipodal (both the numerator and denominator in the formula above become small); however, this may not matter (depending on how step 4 is handled).

3. The solution of the hybrid geodesic problem is as follows. It starts the same way as the solution of the direct problem, solving the triangle NEP with P = A to find α0, σ1, ω1, and λ0.[18] Now find α2 from sinα2 = sinα0/cosβ2, taking cosα2 ≥ 0 (corresponding to the first, northward, crossing of the circle φ = φ2). Next, σ2 is given by tanσ2 = tanβ2/cosα2 and ω2 by tanω2 = tanσ2/sinα0.[14] Finally, use the distance and longitude equations, Eqs. (4) and (5), to find s12 and λ12.[19]

4. In order to discuss how α1 is updated, let us define the root-finding problem in more detail. The curve in Fig. 17 shows λ121; φ1, φ2) where we regard φ1 and φ2 as parameters and α1 as the independent variable. We seek the value of α1 which is the root of

where g(0) ≤ 0 and g(π) ≥ 0. In fact, there is a unique root in the interval α1 ∈ [0, π]. Any of a number of root-finding algorithms can be used to solve such an equation. Karney (2013) uses Newton's method, which requires a good starting guess; however it may be supplemented by a fail-safe method, such as the bisection method, to guarantee convergence.

F. R. Helmert

An alternative method for solving the inverse problem is given by Helmert (1880,§5.13). Let us rewrite the Eq. (5) as

Helmert's method entails assuming that ω12 = λ12, solving the resulting problem on auxiliary sphere, and obtaining an updated estimate of ω12 using

This fixed point iteration is repeated until convergence. Rainsford (1955) advocates this method and Vincenty (1975a) adopted it in his solution of the inverse problem. The drawbacks of this method are that convergence is slower than obtained using Newton's method (as described above) and, more seriously, that the process fails to converge at all for nearly antipodal points. In a subsequent report, Vincenty (1975b) attempts to cure this defect; but he is only partially successful—the NGS (2012) implementation still includes Vincenty's fix still fails to converge in some cases. Lee (2011) has compared 17 methods for solving the inverse problem against the method given by Karney (2013).

The shortest distance returned by the solution of the inverse problem is (obviously) uniquely defined. However, if B lies on the cut locus of A there are multiple azimuths which yield the same shortest distance. Here is a catalog of those cases:

  • φ1 = −φ2 (with neither point at a pole). If α1 = α2, the geodesic is unique. Otherwise there are two geodesics and the second one is obtained by interchanging α1 and α2. (This occurs when λ12 ≈ ±π for oblate ellipsoids.)
  • λ12 = ±π (with neither point at a pole). If α1 = 0 or ±π, the geodesic is unique. Otherwise there are two geodesics and the second one is obtained by negating α1 and α2. (This occurs when φ1 + φ2 ≈ 0 for prolate ellipsoids.)
  • A and B are at opposite poles. There are infinitely many geodesics which can be generated by varying the azimuths so as to keep α1 + α2 constant. (For spheres, this prescription applies when A and B are antipodal.)

Differential behavior of geodesics

[编辑]
C. F. Gauss
E. B. Christoffel

Various problems involving geodesics require knowing their behavior when they are perturbed. This is useful in trigonometric adjustments (Ehlert 1993), determining the physical properties of signals which follow geodesics, etc. Consider a reference geodesic, parameterized by s the length from the northward equator crossing, and a second geodesic a small distance t(s) away from it. Gauss (1828) showed that t(s) obeys the Gauss-Jacobi equation

(9)
Fig. 18. Definition of reduced length and geodesic scale.

where K(s) is the Gaussian curvature at s. The solution may be expressed as the sum of two independent solutions

where

We shall abbreviate m(s1s2) = m12, the so-called reduced length, and M(s1s2) = M12, the geodesic scale.[20] Their basic definitions are illustrated in Fig. 18. Christoffel (1869) made an extensive study of their properties. The reduced length obeys a reciprocity relation,

Their derivatives are

Assuming that points 1, 2, and 3, lie on the same geodesic, then the following addition rules apply (Karney 2013),

The reduced length and the geodesic scale are components of the Jacobi field.

The Gaussian curvature for an ellipsoid of revolution is

Helmert (1880,Eq. (6.5.1.)) solved the Gauss-Jacobi equation for this case obtaining

where

As we see from Fig. 18 (top sub-figure), the separation of two geodesics starting at the same point with azimuths differing by dα1 is m12 dα1. On a closed surface such as an ellipsoid, we expect m12 to oscillate about zero. Indeed, if the starting point of a geodesic is a pole, φ1 = ½π, then the reduced length is the radius of the circle of latitude, m12 = a cosβ2 = a sinσ12. Similarly, for a meridional geodesic starting on the equator, φ1 = α1 = 0, we have M12 = cosσ12. In the typical case, these quantities oscillate with a period of about 2π in σ12 and grow linearly with distance at a rate proportional to f. In trigonometric adjustments over small areas, it may be possible to approximate K(s) in Eq. (9) by a constant K. In this limit, the solutions for m12 and M12 are the same as for a sphere of radius 1/√K, namely,

To simplify the discussion of shortest paths in this paragraph we consider only geodesics with s12 > 0. The point at which m12 becomes zero is the point conjugate to the starting point. In order for a geodesic between A and B, of length s12, to be a shortest path it must satisfy the Jacobi condition (Jacobi 1837) (Jacobi 1866,§6) (Forsyth 1927,§§26–27) (Bliss 1916), that there is no point conjugate to A between A and B. If this condition is not satisfied, then there is a nearby path (not necessarily a geodesic) which is shorter. Thus, the Jacobi condition is a local property of the geodesic and is only a necessary condition for the geodesic being a global shortest path. Necessary and sufficient conditions for a geodesic being the shortest path are:

  • for an oblate ellipsoid, |σ12| ≤ π;
  • for a prolate ellipsoid, |λ12| ≤ π, if α0 ≠ 0; if α0 = 0, the supplemental condition m12 ≥ 0 is required if |λ12| = π.

The latter condition above can be used to determine whether the shortest path is a meridian in the case of a prolate ellipsoid with |λ12| = π. The derivative required to solve the inverse method using Newton's method, ∂λ121; φ1, φ2) / ∂α1, is given in terms of the reduced length (Karney 2013,Eq. (46)).

Geodesic map projections

[编辑]

Two map projections are defined in terms of geodesics. They are based on polar and rectangular geodesic coordinates on the surface (Gauss 1828). The polar coordinate system (r, θ) is centered on some point A. The coordinates of another point B are given by r = s12 and θ = ½π − α1 and these coordinates are used to find the projected coordinates on a plane map, x = r cosθ and y = r sinθ. The result is the familiar azimuthal equidistant projection; in the field of the differential geometry of surfaces, it is called the exponential map. Due to the basic properties of geodesics (Gauss 1828), lines of constant r and lines of constant θ intersect at right angles on the surface. The scale of the projection in the radial direction is unity, while the scale in the azimuthal direction is s12/m12.

The rectangular coordinate system (xy) uses a reference geodesic defined by A and α1 as the x axis. The point (xy) is found by traveling a distance s13 = x from A along the reference geodesic to an intermediate point C and then turning ½π counter-clockwise and traveling along a geodesic a distance s32 = y. If A is on the equator and α1 = ½π, this gives the equidistant cylindrical projection. If α1 = 0, this gives the Cassini-Soldner projection. Cassini's map of France placed A at the Paris Observatory. Due to the basic properties of geodesics (Gauss 1828), lines of constant x and lines of constant y intersect at right angles on the surface. The scale of the projection in the y direction is unity, while the scale in the x direction is 1/M32.

The gnomonic projection is a projection of the sphere where all geodesics (i.e., great circles) map to straight lines (making it a convenient aid to navigation). Such a projection is only possible for surfaces of constant Gaussian curvature (Beltrami 1865). Thus a projection in which geodesics map to straight lines is not possible for an ellipsoid. However, it is possible to construct an ellipsoidal gnomonic projection in which this property approximately holds (Karney 2013,§8). On the sphere, the gnomonic projection is the limit of a doubly azimuthal projection, a projection preserving the azimuths from two points A and B, as B approaches A. Carrying out this limit in the case of a general surface yields an azimuthal projection in which the distance from the center of projection is given by ρ = m12/M12. Even though geodesics are only approximately straight in this projection, all geodesics through the center of projection are straight. The projection can then be used to give an iterative but rapidly converging method of solving some problems involving geodesics, in particular, finding the intersection of two geodesics and finding the shortest path from a point to a geodesic.

The Hammer retroazimuthal projection is a variation of the azimuthal equidistant projection (Hammer 1910). A geodesic is constructed from a central point A to some other point B. The polar coordinates of the projection of B are r = s12 and θ = ½π − α2 (which depends on the azimuth at B, instead of at A). This can be used to determine the direction from an arbitrary point to some fixed center. Hinks (1929) suggested another application: if the central point A is a beacon, such as the Rugby Clock, then at an unknown location B the range and the bearing to A can be measured and the projection can be used to estimate the location of B.

Envelope of geodesics

[编辑]
Geodesics from a single point (f = 1/10, φ1 = −30°)
Fig. 19. The envelope of geodesics from a point A at φ1 = −30°.
Fig. 20. The four geodesics connecting A and a point B, φ2 = 26°, λ12 = 175°.

The geodesics from a particular point A if continued past the cut locus form an envelope illustrated in Fig. 19. Here the geodesics for which α1 is a multiple of 3° are shown in light blue. (The geodesics are only shown for their first passage close to the antipodal point, not for subsequent ones.) Some geodesic circles are shown in green; these form cusps on the envelope. The cut locus is shown in red. The envelope is the locus of points which are conjugate to A; points on the envelope may be computed by finding the point at which m12 = 0 on a geodesic (and Newton's method can be used to find this point). Jacobi (1891) calls this star-like figure produced by the envelope an astroid.

Outside the astroid two geodesics intersect at each point; thus there are two geodesics (with a length approximately half the circumference of the ellipsoid) between A and these points. This corresponds to the situation on the sphere where there are "short" and "long" routes on a great circle between two points. Inside the astroid four geodesics intersect at each point. Four such geodesics are shown in Fig. 20 where the geodesics are numbered in order of increasing length. (This figure uses the same position for A as Fig. 15 and is drawn in the same projection.) The two shorter geodesics are stable, i.e., m12 > 0, so that there is no nearby path connecting the two points which is shorter; the other two are unstable. Only the shortest line (the first one) has σ12 ≤ π. All the geodesics are tangent to the envelope which is shown in green in the figure. A similar set of geodesics for the WGS84 ellipsoid is given in this table (Karney 2011,Table 1):

Geodesics for φ1 = −30°, φ2 = 29.9°, λ12 = 179.8° (WGS84)
No. α1 (°) α2 (°) s12 (m) σ12 (°) m12 (m)
1 161.890524736 18.090737246 19989832.8276 179.894971388 57277.3769
2 30.945226882 149.089121757 20010185.1895 180.116378785 24240.7062
3 68.152072881 111.990398904 20011886.5543 180.267429871 −22649.2935
4 −81.075605986 −99.282176388 20049364.2525 180.630976969 −68796.1679

The approximate shape of the astroid is given by

or, in parametric form,

The astroid is also the envelope of the family of lines

where γ is a parameter. (These are generated by the rod of the trammel of Archimedes.) This aids in finding a good starting guess for α1 for Newton's method for in inverse problem in the case of nearly antipodal points (Karney 2013,§5).

The astroid is the (exterior) evolute of the geodesic circles centered at A. Likewise, the geodesic circles are involutes of the astroid.

Area of a geodesic polygon

[编辑]

A geodesic polygon is a polygon whose sides are geodesics. The area of such a polygon may be found by first computing the area between a geodesic segment and the equator, i.e., the area of the quadrilateral AFHB in Fig. 1 (Danielsen 1989). Once this area is known, the area of a polygon may be computed by summing the contributions from all the edges of the polygon.

Here we develop the formula for the area S12 of AFHB following Sjöberg (2006). The area of any closed region of the ellipsoid is

where dT is an element of surface area and K is the Gaussian curvature. Now the Gauss–Bonnet theorem applied to a geodesic polygon states

where

is the geodesic excess and θj is the exterior angle at vertex j. Multiplying the equation for Γ by R22, where R2 is the authalic radius, and subtracting this from the equation for T gives[21]

where the value of K for an ellipsoid has been substituted. Applying this formula to the quadrilateral AFHB, noting that Γ = α2 − α1, and performing the integral over φ gives

where the integral is over the geodesic line (so that φ is implicitly a function of λ). Converting this into an integral over σ, we obtain

where

and the notation E12 = α2 − α1 is used for the geodesic excess. The integral can be expressed as a series valid for small f (Danielsen 1989) (Karney 2013,§6 and addendum).

The area of a geodesic polygon is given by summing S12 over its edges. This result holds provided that the polygon does not include a pole; if it does 2π R22 must be added to the sum. If the edges are specified by their vertices, then a convenient expression for E12 is

This result follows from one of Napier's analogies.

Software implementations

[编辑]

An implementation of Vincenty's algorithm in Fortran is provided by NGS (2012). Version 3.0 includes Vincenty's treatment of nearly antipodal points (Vincenty 1975b). Vincenty's original formulas are used in many geographic information systems. Except for nearly antipodal points (where the inverse method fails to converge), this method is accurate to about 0.1 mm for the WGS84 ellipsoid (Karney 2011,§9).

The algorithms given in Karney (2013) are included in GeographicLib (Karney 2014). These are accurate to about 15 nanometers for the WGS84 ellipsoid. Implementations in several languages (C++, C, Fortran, Java, JavaScript, Python, Matlab, and Maxima) are provided. In addition to solving the basic geodesic problem, this library can return m12, M12, M21, and S12. The library includes a command-line utility, GeodSolve, for geodesic calculations. As of version 4.9.1, the PROJ.4 library for cartographic projections uses the C implementation for geodesic calculations. This is exposed in the command-line utility, geod, and in the library itself.

The solution of the geodesic problems in terms of elliptic integrals is included in GeographicLib (in C++ only), e.g., via the -E option to GeodSolve. This method of solution is about 2–3 times slower than using series expansions; however it provides accurate solutions for ellipsoids of revolution with b/a ∈ [0.01, 100] (Karney 2013,addenda).

Geodesics on a triaxial ellipsoid

[编辑]

Solving the geodesic problem for an ellipsoid of revolution is, from the mathematical point of view, relatively simple: because of symmetry, geodesics have a constant of the motion, given by Clairaut's relation allowing the problem to be reduced to quadrature. By the early 19th century (with the work of Legendre, Oriani, Bessel, et al.), there was a complete understanding of the properties of geodesics on an ellipsoid of revolution.

On the other hand, geodesics on a triaxial ellipsoid (with 3 unequal axes) have no obvious constant of the motion and thus represented a challenging "unsolved" problem in the first half of the 19th century. In a remarkable paper, Jacobi (1839) discovered a constant of the motion allowing this problem to be reduced to quadrature also (Klingenberg 1982,§3.5).[22][23]

Triaxial coordinate systems

[编辑]
Gaspard Monge
Charles Dupin

The key to the solution is expressing the problem in the "right" coordinate system. Consider the ellipsoid defined by

where (X,Y,Z) are Cartesian coordinates centered on the ellipsoid and, without loss of generality, a ≥ b ≥ c > 0.[24] A point on the surface is specified by a latitude and longitude. The geographical latitude and longitude (φ, λ) are defined by

The parametric latitude and longitude (φ′, λ′) are defined by

Jacobi (1866,§§26–27) employed the ellipsoidal latitude and longitude (β, ω) defined by

Fig. 21. Ellipsoidal coordinates.

In the limit b → a, β becomes the parametric latitude for an oblate ellipsoid, so the use of the symbol β is consistent with the previous sections. However, ω is different from the spherical longitude defined above.[25]

Grid lines of constant β (in blue) and ω (in green) are given in Fig. 21. In contrast to (φ, λ) and (φ′, λ′), (β, ω) is an orthogonal coordinate system: the grid lines intersect at right angles. The principal sections of the ellipsoid, defined by X = 0 and Z = 0 are shown in red. The third principal section, Y = 0, is covered by the lines β = ±90° and ω = 0° or ±180°. These lines meet at four umbilical points (two of which are visible in this figure) where the principal radii of curvature are equal. Here and in the other figures in this section the parameters of the ellipsoid are a:b:c = 1.01:1:0.8, and it is viewed in an orthographic projection from a point above φ = 40°, λ = 30°.

The grid lines of the ellipsoidal coordinates may be interpreted in three different ways

  1. They are "lines of curvature" on the ellipsoid, i.e., they are parallel to the directions of principal curvature (Monge 1796).
  2. They are also intersections of the ellipsoid with confocal systems of hyperboloids of one and two sheets (Dupin 1813Part 5).
  3. Finally they are geodesic ellipses and hyperbolas defined using two adjacent umbilical points (Hilbert & Cohn-Vossen 1952,第188頁). For example, the lines of constant β in Fig. 21 can be generated with the familiar string construction for ellipses with the ends of the string pinned to the two umbilical points.

Conversions between these three types of latitudes and longitudes and the Cartesian coordinates are simple algebraic exercises.

The element of length on the ellipsoid in ellipsoidal coordinates is given by

and the differential equations for a geodesic are

Jacobi's solution

[编辑]
C. G. J. Jacobi
Joseph Liouville
J. G. Darboux

Jacobi showed that the geodesic equations, expressed in ellipsoidal coordinates, are separable. Here is how he recounted his discovery to his friend and neighbor Bessel (Jacobi 1839,Letter to Bessel),

The day before yesterday, I reduced to quadrature the problem of geodesic lines on an ellipsoid with three unequal axes. They are the simplest formulas in the world, Abelian integrals, which become the well known elliptic integrals if 2 axes are set equal.

Königsberg, 28th Dec. '38.

The solution given by Jacobi (Jacobi 1839) (Jacobi 1866,§28) is

As Jacobi notes "a function of the angle β equals a function of the angle ω. These two functions are just Abelian integrals..." Two constants δ and γ appear in the solution. Typically δ is zero if the lower limits of the integrals are taken to be the starting point of the geodesic and the direction of the geodesics is determined by γ. However, for geodesics that start at an umbilical points, we have γ = 0 and δ determines the direction at the umbilical point. The constant γ may be expressed as

where α is the angle the geodesic makes with lines of constant ω. In the limit b → a, this reduces to sinα cosβ = const., the familiar Clairaut relation. A nice derivation of Jacobi's result is given by Darboux (1894,§§583–584) where he gives the solution found by Liouville (1846) for general quadratic surfaces. In this formulation, the distance along the geodesic, s, is found using

An alternative expression for the distance is

Survey of triaxial geodesics

[编辑]
Circumpolar geodesics, ω1 = 0°, α1 = 90°.
Fig. 22. β1 = 45.1°.
Fig. 23. β1 = 87.48°.

On a triaxial ellipsoid, there are only 3 simple closed geodesics, the three principal sections of the ellipsoid given by X = 0, Y = 0, and Z = 0.[26] To survey the other geodesics, it is convenient to consider geodesics which intersect the middle principal section, Y = 0, at right angles. Such geodesics are shown in Figs. 22–26, which use the same ellipsoid parameters and the same viewing direction as Fig. 21. In addition, the three principal ellipses are shown in red in each of these figures.

If the starting point is β1 ∈ (−90°, 90°), ω1 = 0, and α1 = 90°, then γ > 0 and the geodesic encircles the ellipsoid in a "circumpolar" sense. The geodesic oscillates north and south of the equator; on each oscillation it completes slightly less that a full circuit around the ellipsoid resulting, in the typical case, in the geodesic filling the area bounded by the two latitude lines β = ±β1. Two examples are given in Figs. 22 and 23. Figure 22 shows practically the same behavior as for an oblate ellipsoid of revolution (because a ≈ b); compare to Fig. 11. However, if the starting point is at a higher latitude (Fig. 22) the distortions resulting from a ≠ b are evident. All tangents to a circumpolar geodesic touch the confocal single-sheeted hyperboloid which intersects the ellipsoid at β = β1 (Chasles 1846) (Hilbert & Cohn-Vossen 1952,第223–224頁).

Transpolar geodesics, β1 = 90°, α1 = 180°.
Fig. 24. ω1 = 39.9°.
Fig. 25. ω1 = 9.966°.

If the starting point is β1 = 90°, ω1 ∈ (0°, 180°), and α1 = 180°, then γ < 0 and the geodesic encircles the ellipsoid in a "transpolar" sense. The geodesic oscillates east and west of the ellipse X = 0; on each oscillation it completes slightly more that a full circuit around the ellipsoid resulting, in the typical case, in the geodesic filling the area bounded by the two longitude lines ω = ω1 and ω = 180° − ω1. If a = b, all meridians are geodesics; the effect of a ≠ b causes such geodesics to oscillate east and west. Two examples are given in Figs. 24 and 25. The constriction of the geodesic near the pole disappears in the limit b → c; in this case, the ellipsoid becomes a prolate ellipsoid and Fig. 24 would resemble Fig. 12 (rotated on its side). All tangents to a transpolar geodesic touch the confocal double-sheeted hyperboloid which intersects the ellipsoid at ω = ω1.

Fig. 26. An umbilical geodesic, β1 = 90°, ω1 = 0°, α1 = 135°.

If the starting point is β1 = 90°, ω1 = 0° (an umbilical point), and α1 = 135° (the geodesic leaves the ellipse Y = 0 at right angles), then γ = 0 and the geodesic repeatedly intersects the opposite umbilical point and returns to its starting point. However, on each circuit the angle at which it intersects Y = 0 becomes closer to 0° or 180° so that asymptotically the geodesic lies on the ellipse Y = 0 (Hart 1849) (Arnold 1989,第265頁). This is shown in Fig. 26. Note that a single geodesic does not fill an area on the ellipsoid. All tangents to umbilical geodesics touch the confocal hyperbola which intersects the ellipsoid at the umbilic points.

Umbilical geodesic enjoy several interesting properties.

  • Through any point on the ellipsoid, there are two umbilical geodesics.
  • The geodesic distance between opposite umbilical points is the same regardless of the initial direction of the geodesic.
  • Whereas the closed geodesics on the ellipses X = 0 and Z = 0 are stable (an geodesic initially close to and nearly parallel to the ellipse remains close to the ellipse), the closed geodesic on the ellipse Y = 0, which goes through all 4 umbilical points, is exponentially unstable. If it is perturbed, it will swing out of the plane Y = 0 and flip around before returning to close to the plane. (This behavior may repeat depending on the nature of the initial perturbation.)

If the starting point A of a geodesic is not an umbilical point, then its envelope is an astroid with two cusps lying on β = −β1 and the other two on ω = ω1 + π (Sinclair 2003). The cut locus for A is the portion of the line β = −β1 between the cusps (Itoh & Kiyohara 2004).

(Panou 2013) gives a method for solving the inverse problem for a triaxial ellipsoid by directly integrating the system of ordinary differential equations for a geodesic. (Thus, it does not utilize Jacobi's solution.)

Applications

[编辑]
Karl Weierstrass
Henri Poincaré

The direct and inverse geodesic problems no longer play the central role in geodesy that they once did. Instead of solving adjustment of geodetic networks as a two-dimensional problem in spheroidal trigonometry, these problem are now solved by three-dimensional methods (Vincenty & Bowring 1978). Nevertheless, terrestrial geodesics still play an important role in several areas:

By the principle of least action, many problems in physics can be formulated as a variational problem similar to that for geodesics. Indeed, the geodesic problem is equivalent to the motion of a particle constrained to move on the surface, but otherwise subject to no forces (Laplace 1799a) (Hilbert & Cohn-Vossen 1952,第222頁). For this reason, geodesics on simple surfaces such as ellipsoids of revolution or triaxial ellipsoids are frequently used as "test cases" for exploring new methods. Examples include:

See also

[编辑]

Notes

[编辑]
  1. ^ Here α2 is the forward azimuth at B. Some authors calculate the back azimuth instead; this is given by α2 ± π.
  2. ^ This prompted a courteous note by Oriani (1826) noting his previous work, of which, presumably, Bessel was unaware, and also a thinly veiled accusation of plagiarism from Ivory (1826) (his phrase was "second-hand from Germany"), which resulted in an angry rebuttal by Bessel (1827).
  3. ^ Clairaut (1735) uses the circumlocution "perpendiculars to the meridian"; this refers to Cassini's proposed map projection for France (Cassini 1735) where one of the coordinates was the distance from the Paris meridian.
  4. ^ Kummell (1883) attempted to introduce the word "brachisthode" for geodesic. This effort failed.
  5. ^ Laplace (1799a) showed that a particle constrained to move on a surface but otherwise subject to no forces moves along a geodesic for that surface. Thus, Clairaut's relation is just a consequence of conservation of angular momentum for a particle on a surface of revolution. A similar proof is given by Bomford (1952,§8.06).
  6. ^ In terms of β, the element of distance on the ellipsoid is given by ds2 = (a2 sin2β2 + b2 cos2β) dβ2 + a2 cos2β dλ2.
  7. ^ It may be useful to impose the restriction that the surface have a positive curvature everywhere so that the latitude be single valued function of Z.
  8. ^ Other choices of independent parameter are possible. In particular many authors use the vertex of a geodesic (the point of maximum latitude) as the origin for σ.
  9. ^ Nowadays, the necessary algebraic manipulations, expanding in a Taylor series, integration, and performing trigonometric simplifications, can be carrying using a computer algebra system. Earlier, Levallois & Dupuy (1952) gave recurrence relations for the series in terms of Wallis' integrals and Pittman (1986) describes a similar method.
  10. ^ Legendre (1806,Art. 13) also gives a series for σ in terms of s; but this is not suitable for large distances.
  11. ^ Despite the presence of i = √−1, the elliptic integrals in Eqs. (6) and (7) are real.
  12. ^ Rollins (2010) obtains different, but equivalent, expressions in terms of elliptic integrals.
  13. ^ It is also possible to express the integrals in terms of Jacobi elliptic functions (Jacobi 1855) (Luther 1855) (Forsyth 1896) (Thomas 1970,Appendix 1). Halphen (1888) gives the solution for the complex quantities R exp(±iλ) = X ± iY in terms of Weierstrass sigma and zeta functions. This form is of interest because the separate periods of latitude and longitude of the geodesic are captured in a single doubly periodic function; see also Forsyth (1927,§75.)
  14. ^ 14.0 14.1 14.2 When solving for σ, α, or ω using a formula for its tangent, the quadrant should be determined from the signs of the numerator of the expression for the tangent, e.g., using the atan2 function.
  15. ^ If β1 = 0 and α1 = ±½π, the equation for σ1 is indeterminate and σ1 = 0 may be used.
  16. ^ Because tanω = sinα0 tanσ, ω changes quadrants in step with σ. It is therefore straightforward to express λ2 so that λ12 indicates how often and in what sense the geodesic has encircled the ellipsoid.
  17. ^ Bessel (1825) treated the longitude integral approximately in order to reduce the number of parameters in the equation from two to one so that it could be tabulated conveniently.
  18. ^ If φ1 = φ2 = 0, take sinσ1 = sinω1 = −0, consistent with the relations (8); this gives σ1 = ω1 = −π.
  19. ^ The ordering in relations (8) automatically results in σ12 > 0.
  20. ^ Bagratuni (1962,§17) uses the term "coefficient of convergence of ordinates" for the geodesic scale.
  21. ^ Sjöberg (2006) multiplies Γ by b2 instead of R22. However, this leads to a singular integrand (Karney 2011,§15).
  22. ^ This section is adapted from the documentation for GeographicLib (Karney 2014geodesics on a triaxial ellipsoid)
  23. ^ Even though Jacobi and Weierstrass (1861) use terrestrial geodesics as the motivation for their work, a triaxial ellipsoid approximates the Earth only slightly better than an ellipsoid of revolution. A better approximation to the shape of the Earth is given by the geoid. However, geodesics on a surface of the complexity of the geoid are partly chaotic (Waters 2011).
  24. ^ This notation for the semi-axes is incompatible with that used in the previous section on ellipsoids of revolution, where a and b stood for the equatorial radius and polar semi-axis. Thus the corresponding inequalities are a = a ≥ b > 0 for an oblate ellipsoid and b ≥ a = a > 0 for a prolate ellipsoid.
  25. ^ The limit b → c gives a prolate ellipsoid with ω playing the role of the parametric latitude.
  26. ^ If c/a < ½, there are other simple closed geodesics similar to those shown in Figs. 13 and 14 (Klingenberg 1982,§3.5.19).

References

[编辑]
[编辑]