@@ -33,7 +33,7 @@ julia> @NLobjective(model, Min, exp(x[1]) - sqrt(x[2]))
33
33
34
34
Use [ ` @NLconstraint ` ] ( @ref ) to add a nonlinear constraint.
35
35
36
- ``` jldoctest; setup=:(model = Model(); @variable(model, x[1:2]))
36
+ ``` jldoctest nonlinear_constraint ; setup=:(model = Model(); @variable(model, x[1:2]))
37
37
julia> @NLconstraint(model, exp(x[1]) <= 1)
38
38
exp(x[1]) - 1.0 ≤ 0
39
39
@@ -52,6 +52,11 @@ julia> @NLconstraint(model, con[i = 1:2], prod(x[j] for j = 1:i) == i)
52
52
You can only create nonlinear constraints with ` <= ` , ` >= ` , and ` == ` .
53
53
More general ` Nonlinear ` -in-` Set ` constraints are not supported.
54
54
55
+ Delete a nonlinear constraint using [ ` delete ` ] ( @ref ) :
56
+ ``` jldoctest nonlinear_constraint
57
+ julia> delete(model, con[1])
58
+ ```
59
+
55
60
## Create a nonlinear expression
56
61
57
62
Use [ ` @NLexpression ` ] ( @ref ) to create nonlinear expression objects. The syntax
@@ -90,6 +95,17 @@ julia> @NLexpression(model, nested[i = 1:2], sin(my_expr[i]))
90
95
subexpression[7]: sin(subexpression[5])
91
96
```
92
97
98
+ Use [ ` value ` ] ( @ref ) to query the value of a nonlinear expression:
99
+ ``` jldoctest nl_expression
100
+ julia> set_start_value(x[1], 1.0)
101
+
102
+ julia> value(start_value, nested[1])
103
+ 0.7456241416655579
104
+
105
+ julia> sin(sin(1.0))
106
+ 0.7456241416655579
107
+ ```
108
+
93
109
## Create a nonlinear parameter
94
110
95
111
For nonlinear models only, JuMP offers a syntax for explicit "parameter" objects,
0 commit comments