# Syntax Error while running MPC with Ipopt

**URL:** <https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817>\
**Category:** Optimization (Mathematical)\
**Created:** [May 20, 2017, 10:06am UTC](https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817 "2017-05-20T10:06:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Angshuman\_Goswami](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Angshuman\_Goswami](https://discourse.julialang.org/u/Angshuman_Goswami)\
**Post date:** [May 20, 2017, 10:06am UTC](https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817/1 "2017-05-20T10:06:13Z")

</div>

I am working with the simulator with a 3DOF-bicycle model. I am having a problem when I use the dynamic model in the MPC. When I am using the kinematic model, it works.

I have uploaded the files here. ([https://github.com/agoswam/Simulator/blob/master/src/controller\_MPC\_ARC\_Dyn.jl](https://github.com/agoswam/Simulator/blob/master/src/controller_MPC_ARC_Dyn.jl) )

Run the simulator:  
roslaunch simulator simulator

Run the MPC with kinematic model:  
rosrun simulator controller\_MPC\_ARC\_Kin1.jl

Run the MPC with dynamic model:  
rosrun simulator controller\_MPC\_ARC\_Dyn.jl

I am getting the following error:  
while loading /home/angshuman/catkin\_ws/src/GitHub\_simulator/src/controller\_MPC\_ARC\_Dyn.jl, in expression starting on line 63  
ERROR: LoadError: syntax: missing comma or ) in argument list  
in include\_from\_node1(::String) at ./loading.jl:488  
in process\_options(::Base.JLOptions) at ./client.jl:265  
in \_start() at ./client.jl:321  
while loading /home/angshuman/catkin\_ws/src/GitHub\_simulator/src/controller\_MPC\_ARC\_Dyn.jl, in expression starting on line 109. I don’t see any syntax problem where I am getting the error.

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [May 20, 2017, 12:26pm UTC](https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817/2 "2017-05-20T12:26:26Z")

</div>

What version of JuMP are you using? `@defVar` has been replaced by `@variable` quite some time ago. Perhaps this could simply be fixed by switching to a newer version of JuMP. (sorry, can’t run the code right now to verify, on a mobile phone).
