Error saving variable


#1

Hi, I’m trying to execute the code bellow. It was written in Julia 0.4.5 and I’m not sure if there is some part of it that is outdated.

The error happens on line 10: save("./EAData.jld2",“X”,X,“U”,U,“D”,D,“Tend”,Tend)

Error evaluating Run.jl
LoadError: eUndefVarError: save not definede
while loading /Users/marcelord12/Documents/phd2018/mppo/thesis/MDP/Takeoff/Run.jl, in expression starting on line 10
include_string(::String, ::String) at loading.jl:522
include_string(::Module, ::String, ::String) at Compat.jl:88
(::Atom.##112#116{String,String})() at eval.jl:109
withpath(::Atom.##112#116{String,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
hideprompt(::Atom.##111#115{String,String}) at repl.jl:67
macro expansion at eval.jl:106 [inlined]
(::Atom.##110#114{Dict{String,Any}})() at task.jl:80

==============
"using JLD2

include(“MonteCarlo.jl”)
include(“Abstraction.jl”)
include(“PlotMCSim.jl”)

Run Monte carlo trials with pilot

RunMCSim(1)
save("./PilotData.jld2",“X”,X,“U”,U,“D”,D,“Tend”,Tend)

#PlotSim()
GetTransMat!(X,U,D,Tend,TM_P)

Run Monte carlo trials with envelope-aware controlle

RunMCSim(2)
save("./EAData.jld2",“X”,X,“U”,U,“D”,D,“Tend”,Tend)

#for i=1:trials
#PlotSim(i)
#end

GetTransMat!(X,U,D,Tend,TM_EA)

#===============================================
Use Pilot and Envelope-aware transition matrices
to construct transition matrices for actions
NOOP and TOGL
===============================================#

TM_NOOP = zeros(TotalN2,TotalN2)
TM_TOGL = zeros(TotalN2,TotalN2)

TM_NOOP[1:TotalN,1:TotalN] = TM_P[:,:]
TM_NOOP[TotalN+1:2TotalN,
TotalN+1:2
TotalN] = TM_EA[:,:]

TM_TOGL[1:TotalN,TotalN+1:2TotalN] = TM_EA[:,:]
TM_TOGL[TotalN+1:2
TotalN,1:TotalN] = TM_P[:,:]

writedlm(“TensorNOOP.txt”,TM_NOOP)
writedlm(“TensorTOGL.txt”,TM_TOGL)"


#2

Please quote your code. EDIT: And create a minimal example.