Magnetohydrodynamics: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Benson Muite
fixed link
Line 1: Line 1:
{{external links|date=November 2011}}
20 year old Web Designer Lupe from Bathurst, really loves home, health and fitness and actions. Continues to be enthused how vast the world is after going to La Fortaleza and San Juan National Historic Site in Puerto Rico.<br><br>my web site; [http://weddingesprit.net/xe/Cellection/59692 Best Weight Gainer Cytogainer]
'''Quadratic programming''' (QP) is a special type of [[mathematical optimization]] [[optimization problem|problem]]. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.
 
==Problem formulation==
The quadratic programming problem can be formulated as:<ref>{{Cite book | last1=Nocedal | first1=Jorge | last2=Wright | first2=Stephen J. | title=Numerical Optimization | publisher=[[Springer-Verlag]] | location=Berlin, New York | edition=2nd | isbn=978-0-387-30303-1 | year=2006 | page=449 | postscript=<!--None--> }}.</ref>
 
Assume '''x''' belongs to <math>\mathbb{R}^{n}</math> space. Both '''x''' and '''c''' are [[column vectors]] with ''n'' elements (''n''&times;1 matrices), and ''Q''  is a [[Symmetric matrix|symmetric]] ''n''&times;''n'' [[matrix (math)|matrix]].
 
Minimize (with respect to '''x''')
:<math>f(\mathbf{x}) = \tfrac{1}{2} \mathbf{x}^T Q\mathbf{x} + \mathbf{c}^T \mathbf{x}.</math>
 
Subject to one or more constraints of the form:
:<math> A\mathbf{x} \leq \mathbf b </math> (inequality constraint)
:<math> E\mathbf{x} = \mathbf d </math> (equality constraint)
 
where <math>\mathbf{x}^T</math> indicates the vector [[transpose]] of <math>\mathbf{x}</math>. The notation <math> A \mathbf x \leq \mathbf b </math> means that every entry of the vector <math>A \mathbf x</math> is less than or equal to the corresponding entry of the vector <math>\mathbf b</math>.
 
A related programming problem, [[quadratically constrained quadratic program]]ming, can be posed by adding quadratic constraints on the variables.
 
==Solution methods==
 
For general problems a variety of methods are commonly used, including
 
:*[[interior point method|interior point]],
:*[[active set]],<ref name="ioe.engin.umich">{{cite book|last=Murty|first=Katta G.|title=Linear complementarity, linear and nonlinear programming|series=Sigma Series in Applied Mathematics|volume=3|publisher=Heldermann Verlag|location=Berlin|year=1988|pages=xlviii+629 pp.|isbn=3-88538-403-5|url=http://ioe.engin.umich.edu/people/fac/books/murty/linear_complementarity_webbook/ | mr = 949214 }}</ref>
:*[[Augmented Lagrangian method|augmented Lagrangian]],<ref>{{cite journal | first1 = F. | last1 = Delbos | first2 = J.Ch. | last2 = Gilbert | year = 2005 | title = Global linear convergence of an augmented Lagrangian algorithm for solving convex quadratic optimization problems | journal = Journal of Convex Analysis | volume = 12 | pages = 45–69 }}</ref>
:*[[Conjugate gradient method|conjugate gradient]],
:*[[Gradient projection method|gradient projection]],
:*extensions of the [[simplex algorithm]].<ref name="ioe.engin.umich" />
 
Convex quadratic programming is a special case of the more general field of [[convex optimization]].
 
===Equality constraints===
 
Quadratic programming is particularly simple when there are only equality constraints; specifically, the problem is linear. By using [[Lagrange multipliers]] and seeking the extremum of the Lagrangian, it may be readily shown that the solution to the equality constrained problem is given by the linear system:
 
:<math>
\begin{bmatrix}
  Q & E^T \\
  E & 0
\end{bmatrix}
\begin{bmatrix}
  \mathbf x \\
  \lambda
\end{bmatrix}
=
\begin{bmatrix}
  -\mathbf c \\
  \mathbf d
\end{bmatrix}
</math>
 
where <math>\lambda</math> is a set of Lagrange multipliers which come out of the solution alongside <math>\mathbf x</math>.
 
The easiest means of approaching this system is direct solution (for example, [[LU factorization]]), which for small problems is very practical. For large problems, the system poses some unusual difficulties, most notably that problem is never positive definite (even if <math>Q</math> is), making it potentially very difficult to find a good numeric approach, and there are many approaches to choose from dependent on the problem.<ref>[http://scholar.google.com/scholar?hl=en&q=saddle+point+indefinite+constrained+linear Google search.]</ref>
 
If the constraints don't couple the variables too tightly, a relatively simple attack is to change the variables so that constraints are unconditionally satisfied. For example, suppose <math>\mathbf d = 0</math> (generalizing to nonzero is straightforward). Looking at the constraint equations:
 
:<math>E\mathbf{x} = 0</math>
 
introduce a new variable <math>\mathbf y</math> defined by
 
:<math>Z \mathbf{y} = \mathbf x</math>
 
where <math>\mathbf y</math> has dimension of <math>\mathbf x</math> minus the number of constraints. Then
 
:<math>E Z \mathbf{y} = 0</math>
 
and if <math>Z</math> is chosen so that <math>E Z = 0</math> the constraint equation will be always satisfied. Finding such <math>Z</math> entails finding the [[null space]] of <math>E</math>, which is more or less simple depending on the structure of <math>E</math>. Substituting into the quadratic form gives an unconstrained minimization problem:
 
:<math>
\tfrac{1}{2} \mathbf{x}^T Q\mathbf{x} + \mathbf{c}^T \mathbf{x} \quad \Rightarrow \quad
\tfrac{1}{2} \mathbf{y}^T Z^T Q Z \mathbf{y} + (Z^T \mathbf{c})^T \mathbf{y}
</math>
 
the solution of which is given by:
 
:<math>
Z^T Q Z \mathbf{y} = -Z^T \mathbf{c}
</math>
 
Under certain conditions on <math>Q</math>, the reduced matrix <math>Z^T Q Z</math> will be positive definite. It's possible to write a variation on the [[conjugate gradient method]] which avoids the explicit calculation of <math>Z</math>.<ref>{{Cite journal
| last1 = Gould
| first1 = Nicholas I. M.
| last2 = Hribar
| first2 = Mary E.
| last3 = Nocedal
| first3 = Jorge
|date=April 2001
| title = On the Solution of Equality Constrained Quadratic Programming Problems Arising in Optimization
| publisher = SIAM Journal of Scientific Computing
| publication-place =
| pages = 1376–1395
| volume = 23
| issue = 4
| id = {{citeseerx|10.1.1.129.7555}}
| accessdate =
}}</ref>
 
==Lagrangian duality==
{{See also|Dual problem}}
 
The Lagrangian [[Dual problem|dual]] of a QP is also a QP. To see that let us focus on the case where <math>c=0</math> and Q is positive definite. We write the [[Lagrange multipliers|Lagrangian]] function as
:<math>L(x,\lambda) = \tfrac{1}{2} x^{T}Qx + \lambda^{T}(Ax-b). </math>
Defining the (Lagrangian) dual function <math>g(\lambda)</math>, defined as <math>g(\lambda) = \inf_{x} L(x,\lambda) </math>, we find an [[infimum]] of <math>L</math>, using <math>\nabla_{x} L(x,\lambda)=0</math>
 
<big><math> x^* =  -Q^{-1}A^{T}\lambda.  </math></big>
 
hence the dual function is
:<math>g(\lambda) = -\tfrac{1}{2}\lambda^{T}AQ^{-1}A^{T}\lambda - \lambda^{T}b</math>
hence the Lagrangian dual of the QP is
 
maximize: <math> -\tfrac{1}{2}\lambda^{T}AQ^{-1}A^{T}\lambda - \lambda^{T}b</math>
 
subject to: <math>\lambda \geqslant 0</math>.
 
Besides the Lagrangian duality theory, there are other duality pairings (e.g. Wolfe, etc.).
 
==Complexity==
 
For [[positive-definite matrix|positive definite]] ''Q'', the [[ellipsoid method]] solves the problem in [[polynomial time]].<ref>{{cite journal| last=Kozlov | first=M. K. | coauthors=S. P. Tarasov and [[Leonid Khachiyan|Leonid G. Khachiyan]] | year=1979 | title=[Polynomial solvability of convex quadratic programming] | journal=[[Doklady Akademii Nauk SSSR]] | volume=248 | pages=1049–1051}} Translated in: {{cite journal| journal=Soviet Mathematics - Doklady | volume=20 | pages=1108–1111}}</ref> If, on the other hand, ''Q'' is indefinite, then the problem is [[NP-hard]].<ref>{{cite journal | last = Sahni | first = S. | title = Computationally related problems | journal = SIAM Journal on Computing | volume = 3 | pages = 262–279 | year = 1974 }}</ref>  In fact, even if ''Q'' has only one negative [[eigenvalue]], the problem is [[NP-hard]].<ref>{{cite journal | title = Quadratic programming with one negative eigenvalue is NP-hard | first1 = Panos M. | last1 = Pardalos | first2 = Stephen A. | last2 = Vavasis | journal = Journal of Global Optimization | volume = 1 | issue = 1 | year = 1991 | pages = 15–22 }}</ref>
 
==Solvers and scripting (programming) languages==
 
{| class="wikitable"
|-
!Name
!Brief info
|-
|[[AIMMS]]||
|-
|[[AMPL]]|| A popular modeling language for large-scale mathematical optimization.
|-
|[[APMonitor]]||
|-
|[[CPLEX]]|| Popular solver with an API (C,C++,Java,.Net, Python, Matlab and R).  Free for academics.
|-
|[[Microsoft Excel|Excel]] Solver Function||
|-
|[[General Algebraic Modeling System|GAMS]]||
|-
|[[Gurobi]]|| Solver with parallel algorithms for large-scale linear programs, quadratic programs and mixed-integer programs. Free for academic use.
|-
|[[IMSL Numerical Libraries|IMSL]]|| A set of mathematical and statistical functions that programmers can embed into their software applications.
|-
|JOptimizer || open source library for solving minimization problem with linear equality and convex inequality constraints (is implemented in Java)
|-
|[[Maple (software)|Maple]]|| General-purpose programming language for mathematics.  Solving a quadratic problem in Maple is accomplished via its [http://www.maplesoft.com/support/help/Maple/view.aspx?path=Optimization/QPSolve QPSolve] command.
|-
|[[MATLAB]]|| A general-purpose and matrix-oriented programming-language for numerical computing.  Quadratic programming in MATLAB requires the Optimization Toolbox in addition to the base  MATLAB product
|-
|[[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 quadratic programming problems with both sparse and non-sparse linear constraint matrices, together with routines for the optimization of linear, 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.
|-
|[[OpenOpt]]||[[BSD licenses|BSD]] licensed universal cross-platform numerical optimization framework, see its [http://openopt.org/QP QP] page and [http://openopt.org/Problems other problems] involved. Uses [[NumPy]] arrays and [[SciPy]] sparse matrices.
|-
|[[OptimJ]]|| Free Java-based Modeling Language for Optimization supporting multiple target solvers and available as an Eclipse plugin.<ref>{{cite paper | url = http://www.in-ter-trans.eu/resources/Zesch_Hellingrath_2010_Integrated+Production-Distribution+Planning.pdf | title = OptimJ used in an optimization model for mixed-model assembly lines | publisher = University of Münster}}</ref><ref>{{cite paper | url = http://www.aaai.org/ocs/index.php/AAAI/AAAI10/paper/viewFile/1769/2076 | title = OptimJ used in an Approximate Subgame-Perfect Equilibrium Computation Technique for Repeated Games }}</ref>
|-
|[[R]]||[[GPL licenses|GPL]] licensed universal cross-platform statistical computation framework, see its [http://cran.r-project.org/web/packages/quadprog/index.html quadprog] page
|-
|[[TOMLAB]]||Supports global optimization, integer programming, all types of least squares, linear, quadratic and unconstrained programming for [[MATLAB]]. TOMLAB supports solvers like [[Gurobi]], [[CPLEX]], [[SNOPT]] and [[KNITRO]].
|}
 
==See also==
*[[Support vector machine]]
*[[Sequential quadratic programming]]
*[[Quadratically constrained quadratic program]]ming
*[[Linear programming]]
*[[Nonlinear programming]]
 
==References==
 
===Notes===
{{reflist}}
 
===Bibliography===
* {{cite book|last1=Cottle|first1=Richard W.|last2=Pang|first2=Jong-Shi|last3=Stone|first3=Richard E.|title=The linear complementarity problem | series=Computer Science and Scientific Computing|publisher=Academic Press, Inc.|location=Boston, MA|year=1992|pages=xxiv+762 pp.|isbn=0-12-192350-9 | mr = 1150683 }}
* {{cite book|authorlink1=Michael R. Garey|first1=Michael R.|last1=Garey|authorlink2=David S. Johnson|last2=Johnson|first2=David S.| year = 1979 | title = Computers and Intractability: A Guide to the Theory of NP-Completeness | publisher = W.H. Freeman | isbn = 0-7167-1045-5}} A6: MP2, pg.245.
 
==External links==
*[http://www.numerical.rl.ac.uk/qp/qp.html A page about QP]
*[http://neos-guide.org/content/quadratic-programming-0 NEOS Optimization Guide: Quadratic Programming]
*[http://apmonitor.com/online/view_pass.php?f=qp2.apm Solve an example Quadratic Programming (QP) problem]
 
{{Mathematical programming}}
 
[[Category:Mathematical optimization]]

Revision as of 18:00, 22 February 2014

20 year old Web Designer Lupe from Bathurst, really loves home, health and fitness and actions. Continues to be enthused how vast the world is after going to La Fortaleza and San Juan National Historic Site in Puerto Rico.

my web site; Best Weight Gainer Cytogainer