String parameters?

Should I be able to do

rcp::String = Parameter()

where I set the rcp parameter to, say, “rcp85”?

I don’t get any error when I create the model or set the parameter, but when I then run the model, I get this:

ERROR: LoadError: MethodError: no method matching copy(::String)
Closest candidates are:
  copy(::Expr) at expr.jl:36
  copy(::BitSet) at bitset.jl:46
  copy(::Markdown.MD) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Markdown/src/parse/parse.jl:30
  ...
Stacktrace:
 [1] copy(::Mimi.ScalarModelParameter{String}) at /Users/jrising/.julia/dev/Mimi/src/core/defs.jl:735
 [2] (::getfield(Mimi, Symbol("##87#88")))(::Pair{Symbol,Mimi.ModelParameter}) at ./none:0
 [3] iterate at ./generator.jl:47 [inlined]
 [4] Dict{Symbol,Mimi.ModelParameter}(::Base.Generator{Dict{Symbol,Mimi.ModelParameter},getfield(Mimi, Symbol("##87#88"))}) at ./dict.jl:104
 [5] copy_external_params at /Users/jrising/.julia/dev/Mimi/src/core/defs.jl:731 [inlined]
 [6] copy(::Mimi.ModelDef) at /Users/jrising/.julia/dev/Mimi/src/core/defs.jl:771
 [7] build at /Users/jrising/.julia/dev/Mimi/src/core/build.jl:92 [inlined]
 [8] #run#113(::Int64, ::Nothing, ::Function, ::Model) at /Users/jrising/.julia/dev/Mimi/src/core/model.jl:395
 [9] run(::Model) at /Users/jrising/.julia/dev/Mimi/src/core/model.jl:390
 [10] top-level scope at none:0
 [11] include at ./boot.jl:317 [inlined]
 [12] include_relative(::Module, ::String) at ./loading.jl:1044
 [13] include(::Module, ::String) at ./sysimg.jl:29
 [14] include(::String) at ./client.jl:392
 [15] top-level scope at none:0
in expression starting at /Users/jrising/research/iamup/mimi-page-2020.jl/test/test_AbatementCosts.jl:37

Looks like a bug to me? I don’t see why we wouldn’t want this to work.

Okay, I’ll open an issue.

@jrising @davidanthoff I can take a look at this this weekend

@jrising this is fixed here: https://github.com/mimiframework/Mimi.jl/pull/469 and will be merged as soon as I get approval