# @NLconstraint not working with splatting syntax

**URL:** https://discourse.julialang.org/t/nlconstraint-not-working-with-splatting-syntax/13796
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [August 21, 2018, 12:25am UTC](https://discourse.julialang.org/t/nlconstraint-not-working-with-splatting-syntax/13796 "2018-08-21T00:25:07Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)
#### Post date: [August 22, 2018, 2:12am UTC](https://discourse.julialang.org/t/nlconstraint-not-working-with-splatting-syntax/13796/2 "2018-08-22T02:12:34Z")

</div>

> [@Arrigo\_Benedetti](#):
>
> Any ideas about what is going on?

Yes, this nasty error message means that the splatting syntax is not supported. I just fixed the error message ([syntax error on splatting in NLexpression by mlubin · Pull Request #1434 · jump-dev/JuMP.jl · GitHub](https://github.com/JuliaOpt/JuMP.jl/pull/1434)). See previous discussions for workarounds:

> [@Solvers, nonlinear constraints and user defined functions](https://discourse.julialang.org/t/solvers-nonlinear-constraints-and-user-defined-functions/4690):
>
> I apologize if someone had raised questions like this. And I understand the topic sounded similar to some previous topics. I did do a search. But didn’t found specific answers to all the questions I have. I understand that Gurobi is not a nonlinear programming solver. But it’s one of the lead solvers these days. Is it worth to go through all the trouble trying to reformulate the problem somehow into a convex quadratic problem approximately or a nonlinear solver such as Ipopt works as well? …

> [@Optimizing an array of variables using JuMP (NLP)](https://discourse.julialang.org/t/optimizing-an-array-of-variables-using-jump-nlp/12104):
>
> Hi all, I’m trying to formulate a nonlinear optimization problem with JuMP. Specifically, I’m looking to minimize the sum of the products of certain values in a matrix where one matrix is variable, and two additional matrices are constants. My question is how should I be handling an optimization problem where my variables are a 2D or 3D matrix of floats. The objective function can be expressed as: min \sum\_{i=1}^n \alpha\_i \prod\_{s=1}^S exp(-w\_{i,s}\*x\_{i,s}) I’ve run in to a number of probl…

---

_[View the full topic](https://discourse.julialang.org/t/nlconstraint-not-working-with-splatting-syntax/13796)._
