powered by
Create a constraint function for constrained optimization. Only inequality constraints are supported.
constraint(func, inequality)
constraint returns an object of class Constraint.
constraint
Constraint
function describing the constraint.
inequality type. Possible values: >, >=, <=, <.
>
>=
<=
<
g1 <- function(x) 0.0193*x[3] - (x[1]*0.0625) c1 <- constraint(g1, "<=")
Run the code above in your browser using DataLab