Skip to content

Commit 28758bd

Browse files
committed
eliminated importall JuMP
1 parent 4db46d5 commit 28758bd

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/NLOptControl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ isdefined(Base, :__precompile__) && __precompile__()
22

33
module NLOptControl
44

5+
using JuMP
6+
#import JuMP: @NLexpression, @NLobjective, @NLparameter, @NLconstraint, @constraint, @variable, setvalue, Model, setupperbound, setlowerbound
57
using Ipopt # temp fix for 0.6
68
using FastGaussQuadrature
7-
importall JuMP
89
using DataFrames
910
using Ranges
10-
1111
include("Base.jl")
1212
using .Base
1313

src/setup.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ function defineSolver!(n::NLOpt;kwargs...)
121121
else
122122
error("the :name key needs to be set to either :KNITRO or :Ipopt in defineSolver!()\n ")
123123
end
124-
n.mdl=JuMP.Model(solver=NLPsolver)
124+
#n.mdl=JuMP.Model(solver=NLPsolver)
125+
n.mdl=Model(solver=NLPsolver)
125126

126127
# optimal control problem
127128
OCPdef!(n);
@@ -185,7 +186,7 @@ function OCPdef!(n::NLOpt)
185186

186187
# boundary constraints
187188
n.r.xf_con=[]; # currently modifying the final state constraint (with tolerance) is not needed, can easily ad this functionlity though
188-
@show if any(.!isnan.(n.X0_tol)) # create handles for constraining the entire initial state
189+
if any(.!isnan.(n.X0_tol)) # create handles for constraining the entire initial state
189190
n.r.x0_con=Array{Any}(n.numStates,2); # this is so they can be easily reference when doing MPC
190191
else
191192
n.r.x0_con=[];

src/utils.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Date Create: 1/2/2017, Last Modified: 6/16/2017 \n
104104
--------------------------------------------------------------------------------------\n
105105
"""
106106
function integrate!(n::NLOpt,V::Array{JuMP.Variable,1}; C=1.0,D=zeros(n.numStatePoints,),kwargs...)
107+
107108
kw = Dict(kwargs);
108109
if !haskey(kw,:integrand); integrand = :default;
109110
else; integrand = get(kw,:integrand,0);

0 commit comments

Comments
 (0)