Disciplined Nonlinear Programming (DNLP)
- DNLP is a syntax for specifying nonlinear programming problems that extends disciplined convex programming by allowing arbitrary smooth atoms alongside structured nonsmooth functions.
- DNLP enforces composition rules that enable any compliant problem to be canonicalized into standard smooth NLP form, preserving optimal values and solutions.
- DNLP is implemented in CVXPY, employing auxiliary variables and epigraph/hypograph relaxations to robustly reformulate and solve complex optimization models.
Searching6 arXiv6^ for the DNLP paper and closely related background on DCP/CVXPY. {"6query6 "6\6 Nonlinear Programming6\6 arXiv6", "6max_results6 6\6} {"6query6 "6\6 Nonlinear Programming6\6 "6max_results6 6\6query6} Disciplined nonlinear programming (DNLP) is a syntax for specifying nonlinear programming problems that is inspired by disciplined convex programming (DCP) and designed for general-purpose nonlinear programs (&&&6query6&&&). It permits arbitrary smooth functions to be used freely while imposing composition rules on nonsmooth convex and concave atoms. Under these rules, any DNLP-compliant problem can be automatically canonicalized into a standard smooth nonlinear programming (NLP) form, with no loss in optimal value or optimal solutions. The resulting formulation is intended to balance the unrestricted “black-box” style associated with systems such as AMPL, Pyomo, and JuMP against the certified structure of DCP, while extending NLP modeling to include useful nondifferentiable convex and concave functions (&&&6query6&&&).
6\6. Position within optimization modeling
DNLP extends the DCP idea of a grammar and atom library to the nonlinear, possibly nonconvex setting (&&&6query6&&&). In DCP, the atom library is organized around affine, convex, and concave atoms, and composition rules certify convexity of the full problem. In DNLP, affine atoms are replaced by the broader class of smooth atoms, defined as functions that are twice continuously differentiable in the interior of their domain, while collections of nonsmooth convex and nonsmooth concave atoms are retained. The central requirement is that these nonsmooth atoms be used only in compositions that admit a lossless epigraph or hypograph relaxation.
This yields a precise distinction between DNLP and both unrestricted nonlinear modeling and classical DCP. In DCP, all nonlinearities must fit a convex or concave certificate. In DNLP, arbitrary nonconvex smooth atoms are admissible, but nonsmooth convex and concave atoms remain disciplined. In both frameworks, nonsmooth convex atoms are handled through epigraph variables and constraints, and nonsmooth concave atoms through hypograph variables and constraints.
A concise characterization is given in the paper: a problem is DNLP-compliant if, after replacing every smooth atom by its first-order Taylor approximation, that linearized problem conforms to DCP (&&&6query6&&&). This statement makes explicit that DNLP preserves the compositional discipline of DCP while enlarging the admissible smooth component to cover general nonlinear structure.
6 arXiv6. Atom classes and expression grammar
DNLP partitions its atom library into three disjoint classes: smooth atoms PRESERVED_PLACEHOLDER_6query6, nonsmooth-convex atoms PRESERVED_PLACEHOLDER_6\6, and nonsmooth-concave atoms PRESERVED_PLACEHOLDER_6 arXiv6^ (&&&6query6&&&). Each atom has known curvature, sign, and monotonicity in each argument. Expressions are formed recursively as
PRESERVED_PLACEHOLDER_6max_results6^
where PRESERVED_PLACEHOLDER_6query6^ is an atom of arity PRESERVED_PLACEHOLDER_6\6^ and the are sub-expressions, variables, or constants.
The grammar then classifies expressions into three categories. An expression is smooth if its root atom is smooth and all of its arguments are smooth. An expression is L-convex if its root atom belongs to and, for each argument, exactly one of the following holds: the argument is smooth; the argument is L-convex and the atom is nondecreasing in that argument; or the argument is L-concave and the atom is nonincreasing in that argument. L-concavity is defined symmetrically: the root atom belongs to , and each argument is either smooth, or L-convex under a nonincreasing dependence, or L-concave under a nondecreasing dependence (&&&6query6&&&).
Two corollaries organize a large share of the resulting syntax. Every smooth expression is both L-convex and L-concave, and sums of L-convex expressions remain L-convex, while sums of L-concave expressions remain L-concave. These closure properties are the basis for building large DNLP models from smaller certified components.
6max_results6. Objectives, constraints, and compliance
A DNLP problem must satisfy specific objective and constraint forms (&&&6query6&&&). The objective must be either a minimization of an L-convex expression or a maximization of an L-concave expression. Equality constraints must have the form with both sides smooth. Inequality constraints must be either
PRESERVED_PLACEHOLDER_6\6query6^
with PRESERVED_PLACEHOLDER_6\6\6^ L-convex and PRESERVED_PLACEHOLDER_6\6 arXiv6^ L-concave, or
PRESERVED_PLACEHOLDER_6\6max_results6^
with PRESERVED_PLACEHOLDER_6\6query6^ L-concave and PRESERVED_PLACEHOLDER_6\6\6^ L-convex. No other forms are permitted.
This rule system parallels the DCP principle that “convex PRESERVED_PLACEHOLDER_6\66^ convex” is invalid while “convex PRESERVED_PLACEHOLDER_6\67 concave” is acceptable. The significance in DNLP is not convexity certification of the overall optimization problem, but certification that the nonsmooth structure can be rewritten losslessly into smooth NLP form. A plausible implication is that DNLP should be understood less as a nonconvexity-reducing formalism than as a syntax for safe reformulation.
Compliance is checked structurally. Expression trees are parsed and labeled in a bottom-up pass as smooth, L-convex, or L-concave according to the grammar. If any node violates the rules, the problem is rejected as non-DNLP (&&&6query6&&&). This is a syntactic acceptance criterion rather than a semantic proof of global tractability.
6query6. Canonicalization into standard smooth NLP
The canonicalization target is the standard smooth NLP form
PRESERVED_PLACEHOLDER_6\68
where PRESERVED_PLACEHOLDER_6\69 and PRESERVED_PLACEHOLDER_6 arXiv6query6^ are smooth (&&&6query6&&&). The rewriting is performed in two passes over the expression trees.
The first pass is bottom-up classification. Each node is assigned its status as smooth, L-convex, or L-concave. The second pass is top-down rewriting. For a smooth atom with restricted domain PRESERVED_PLACEHOLDER_6 arXiv6\6, an auxiliary variable is introduced for its argument together with constraints enforcing membership in PRESERVED_PLACEHOLDER_6 arXiv6 arXiv6^ and equality to the original argument expression. This moves domain restrictions into simple bound constraints at the solver level. For a nonsmooth-convex atom PRESERVED_PLACEHOLDER_6 arXiv6max_results6, the atom is replaced by an auxiliary variable PRESERVED_PLACEHOLDER_6 arXiv6query6^ together with the inequality PRESERVED_PLACEHOLDER_6 arXiv6\6. For a nonsmooth-concave atom, the replacement is PRESERVED_PLACEHOLDER_6 arXiv66^ (&&&6query6&&&).
The key theoretical statement is the lossless epigraph relaxation theorem. If PRESERVED_PLACEHOLDER_6 arXiv67 is a DNLP-compliant problem and PRESERVED_PLACEHOLDER_6 arXiv68 is its relaxation obtained by replacing each nonsmooth-convex atom PRESERVED_PLACEHOLDER_6 arXiv69 by PRESERVED_PLACEHOLDER_6max_results6query6^ and PRESERVED_PLACEHOLDER_6max_results6\6, with the analogous construction for nonsmooth-concave atoms, then PRESERVED_PLACEHOLDER_6max_results6 arXiv6^ and PRESERVED_PLACEHOLDER_6max_results6max_results6^ have the same optimal value and the same projection of the solution set onto the original variables (&&&6query6&&&). The paper explains this by monotonicity: in a minimization problem, every nonsmooth-convex atom appears in a context that is nondecreasing in that atom, and analogously for maximization and hypograph relaxations.
Each epigraph or hypograph constraint is then rewritten into an equivalent smooth set of equalities and inequalities. The paper gives classical examples:
- PRESERVED_PLACEHOLDER_6max_results6query6.
- PRESERVED_PLACEHOLDER_6max_results6\6.
- PRESERVED_PLACEHOLDER_6max_results66, written as PRESERVED_PLACEHOLDER_6max_results67.
- PRESERVED_PLACEHOLDER_6max_results68.
- PRESERVED_PLACEHOLDER_6max_results69 (&&&6query6&&&).
After these rewritings, all remaining nonlinear structure is smooth, and only equality constraints and bound constraints remain. The paper states that from this point it is trivial to pass the model to off-the-shelf NLP solvers such as Ipopt, Knitro, Uno, and Copt.
6\6. Illustrative formulations and implementation in CVXPY
Two examples in the paper show the relation between DNLP syntax and canonical NLP form (&&&6query6&&&). The first is the analytic center of a polyhedron:
PRESERVED_PLACEHOLDER_6query6query6^
Here PRESERVED_PLACEHOLDER_6query6\6^ is a smooth, concave atom with domain PRESERVED_PLACEHOLDER_6query6 arXiv6, and PRESERVED_PLACEHOLDER_6query6max_results6^ is smooth, so the objective is L-convex. The canonical form introduces PRESERVED_PLACEHOLDER_6query6query6^ and becomes
PRESERVED_PLACEHOLDER_6query6\6^
subject to
PRESERVED_PLACEHOLDER_6query66^
The second example is PRESERVED_PLACEHOLDER_6query67 regression:
PRESERVED_PLACEHOLDER_6query68
Since PRESERVED_PLACEHOLDER_6query69 is nonsmooth-convex and its argument is smooth, the canonical form introduces PRESERVED_PLACEHOLDER_6\6query6^ and yields
PRESERVED_PLACEHOLDER_6\6\6^
subject to
PRESERVED_PLACEHOLDER_6\6 arXiv6^
In both examples, the canonical model is a smooth NLP in standard form.
DNLP is implemented as a fully open-source extension to CVXPY (&&&6query6&&&). When prob.solve(nlp=True) is called, CVXPY builds expression trees for the objective and constraints, classifies nodes via a post-order traversal, and then performs a pre-order rewrite pass. Smooth atoms with restricted domain are rewritten using auxiliary variables, bounds, and equality links; nonsmooth-convex atoms are rewritten with epigraph variables and inequalities; nonsmooth-concave atoms are rewritten with hypograph variables and inequalities. Each such constraint is then replaced by a smooth reformulation.
The implementation also includes a two-phase differentiation backend in C. In the symbolic preprocessing phase, the canonical problem is traversed to discover and cache the sparsity pattern of the Jacobian of PRESERVED_PLACEHOLDER_6\6max_results6^ and the Hessian of the Lagrangian. In the numeric per-iteration phase, atom derivatives are evaluated at the current PRESERVED_PLACEHOLDER_6\6query6^ and used to assemble the Jacobian and Hessian. The paper states that this yields efficient, sparse derivative oracles for Ipopt, Uno, Knitro, and Copt. Additional interface features include prob.is_dnlp() for compliance checking, best_of=N for random restarts within user-specified variable bounds, and parameter changes between solves without recompilation (&&&6query6&&&).
6. Advantages, limitations, and interpretive context
The paper identifies several practical advantages of DNLP (&&&6query6&&&). One is simpler initialization: domain restrictions become simple bound constraints on auxiliary variables, so solvers need only a feasible point within these bounds and do not evaluate functions such as log or sqrt at infeasible points. The analytic-center example is used to illustrate that a polyhedron not containing the origin can still be handled automatically, whereas many modeling front-ends crash under default origin initialization. A second advantage is robust handling of nonsmooth atoms. Without DNLP, terms such as PRESERVED_PLACEHOLDER_6\6\6^ or Huber may remain in user code and be passed to automatic differentiation as black boxes, which often causes solver stagnation at nondifferentiable points. DNLP instead applies lossless relaxation followed by smooth reformulation. A third advantage is broader function support: all smooth atoms, including trigonometric, exponential, and Bessel functions, may appear in arbitrary nonconvex combinations, subject only to the DNLP rules, while nonsmooth convex and concave atoms enrich the language.
The same source emphasizes several limitations. DNLP provides no convergence guarantees beyond those of generic NLP and does not overcome nonconvexity; it reformulates user-specified nonconvexities in a disciplined way rather than resolving their algorithmic hardness. The grammar excludes some natural nonsmooth compositions, including expressions such as PRESERVED_PLACEHOLDER_6\66, so some problems must be manually reformulated or lie outside DNLP altogether. Canonicalization may increase problem size because of auxiliary variables, although the paper states that this trade-off is usually worthwhile for improved solver robustness. Performance also remains solver-dependent, and some canonical forms may be more efficient than others in particular solvers.
In this sense, DNLP occupies a specific methodological niche. It is neither an unrestricted algebraic modeling system nor a convexity-certifying framework in the DCP sense. Instead, it codifies a restricted but expressive syntax under which useful nondifferentiable convex and concave functions can be mixed with arbitrary smooth nonlinearities and then converted, without loss, into a solver-compatible smooth NLP. This suggests that its main contribution is structural mediation between high-level modeling and general-purpose NLP algorithms rather than a new solution method in the narrow algorithmic sense.