@@ -330,17 +330,17 @@ struct MissingGuessError <: Exception
330330    vals:: Vector{Any} 
331331end 
332332
333- function  Base. showerror (io:: IO , err:: MissingGuessError )  
334-     println (io,  
335-              """ 
336-              Cyclic guesses detected in the system. Symbolic values were found for the following variables/parameters in the map: \ 
337-              """  )
333+ function  Base. showerror (io:: IO , err:: MissingGuessError )
334+     println (io,
335+         """ 
336+         Cyclic guesses detected in the system. Symbolic values were found for the following variables/parameters in the map: \ 
337+         """  )
338338    for  (sym, val) in  zip (err. syms, err. vals)
339339        println (io, " $sym   => $val " 
340340    end 
341341    println (io,
342-              """ 
343-              In order to resolve this, please provide additional numeric guesses so that the chain can be resolved to assign numeric values to each variable.            """  )
342+         """ 
343+         In order to resolve this, please provide additional numeric guesses so that the chain can be resolved to assign numeric values to each variable.            """  )
344344end 
345345
346346""" 
@@ -351,20 +351,20 @@ in `varmap`. Does not perform symbolic substitution in the values of `varmap`.
351351
352352Keyword arguments: 
353353- `tofloat`: Convert values to floating point numbers using `float`. 
354- - `use_union`: Use a `Union`-typed array if the values have heterogeneous types. 
355354- `container_type`: The type of container to use for the values. 
356355- `toterm`: The `toterm` method to use for converting symbolics. 
357356- `promotetoconcrete`: whether the promote to a concrete buffer (respecting 
358-   `tofloat` and `use_union` ). Defaults to `container_type <: AbstractArray`. 
357+   `tofloat`). Defaults to `container_type <: AbstractArray`. 
359358- `check`: Error if any variables in `vars` do not have a mapping in `varmap`. Uses 
360359  [`missingvars`](@ref) to perform the check. 
361360- `allow_symbolic` allows the returned array to contain symbolic values. If this is `true`, 
362361  `promotetoconcrete` is set to `false`. 
363362- `is_initializeprob, guesses`: Used to determine whether the system is missing guesses. 
364363""" 
365364function  better_varmap_to_vars (varmap:: AbstractDict , vars:: Vector ;
366-         tofloat =  true , use_union =  true , container_type =  Array,
367-         toterm =  default_toterm, promotetoconcrete =  nothing , check =  true , allow_symbolic =  false , is_initializeprob =  false )
365+         tofloat =  true , container_type =  Array,
366+         toterm =  default_toterm, promotetoconcrete =  nothing , check =  true ,
367+         allow_symbolic =  false , is_initializeprob =  false )
368368    isempty (vars) &&  return  nothing 
369369
370370    if  check
@@ -382,8 +382,8 @@ function better_varmap_to_vars(varmap::AbstractDict, vars::Vector;
382382        end 
383383
384384        if  ! isempty (missingsyms)
385-             is_initializeprob ?  throw (MissingGuessError (missingsyms, missingvals)) :   
386-                  throw (UnexpectedSymbolicValueInVarmap (missingsyms[1 ], missingvals[1 ]))
385+             is_initializeprob ?  throw (MissingGuessError (missingsyms, missingvals)) : 
386+             throw (UnexpectedSymbolicValueInVarmap (missingsyms[1 ], missingvals[1 ]))
387387        end 
388388    end 
389389
@@ -393,7 +393,7 @@ function better_varmap_to_vars(varmap::AbstractDict, vars::Vector;
393393
394394    promotetoconcrete ===  nothing  &&  (promotetoconcrete =  container_type <:  AbstractArray )
395395    if  promotetoconcrete &&  ! allow_symbolic
396-         vals =  promote_to_concrete (vals; tofloat =  tofloat, use_union =  use_union )
396+         vals =  promote_to_concrete (vals; tofloat =  tofloat, use_union =  false )
397397    end 
398398
399399    if  isempty (vals)
@@ -731,8 +731,7 @@ Keyword arguments:
731731- `fully_determined`: Override whether the initialization system is fully determined. 
732732- `check_initialization_units`: Enable or disable unit checks when constructing the 
733733  initialization problem. 
734- - `tofloat`, `use_union`, `is_initializeprob`: Passed to [`better_varmap_to_vars`](@ref) for building `u0` (and 
735-   possibly `p`). 
734+ - `tofloat`, `is_initializeprob`: Passed to [`better_varmap_to_vars`](@ref) for building `u0` (and possibly `p`). 
736735- `u0_constructor`: A function to apply to the `u0` value returned from `better_varmap_to_vars` 
737736  to construct the final `u0` value. 
738737- `du0map`: A map of derivatives to values. See `implicit_dae`. 
@@ -762,7 +761,7 @@ function process_SciMLProblem(
762761        implicit_dae =  false , t =  nothing , guesses =  AnyDict (),
763762        warn_initialize_determined =  true , initialization_eqs =  [],
764763        eval_expression =  false , eval_module =  @__MODULE__ , fully_determined =  nothing ,
765-         check_initialization_units =  false , tofloat =  true , use_union  =   false , 
764+         check_initialization_units =  false , tofloat =  true ,
766765        u0_constructor =  identity, du0map =  nothing , check_length =  true ,
767766        symbolic_u0 =  false , warn_cyclic_dependency =  false ,
768767        circular_dependency_max_cycle_length =  length (all_symbols (sys)),
@@ -841,7 +840,7 @@ function process_SciMLProblem(
841840    evaluate_varmap! (op, dvs; limit =  substitution_limit)
842841
843842    u0 =  better_varmap_to_vars (
844-         op, dvs; tofloat  =   true , use_union  =   false ,
843+         op, dvs; tofloat,
845844        container_type =  u0Type, allow_symbolic =  symbolic_u0, is_initializeprob)
846845
847846    if  u0 != =  nothing 
@@ -867,15 +866,15 @@ function process_SciMLProblem(
867866    if  is_split (sys)
868867        p =  MTKParameters (sys, op)
869868    else 
870-         p =  better_varmap_to_vars (op, ps; tofloat, use_union,  container_type =  pType)
869+         p =  better_varmap_to_vars (op, ps; tofloat, container_type =  pType)
871870    end 
872871
873872    if  implicit_dae &&  du0map != =  nothing 
874873        ddvs =  map (Differential (iv), dvs)
875874        du0map =  to_varmap (du0map, ddvs)
876875        merge! (op, du0map)
877876        du0 =  varmap_to_vars (op, ddvs; toterm =  identity,
878-             tofloat  =   true )
877+             tofloat)
879878        kwargs =  merge (kwargs, (; ddvs))
880879    else 
881880        du0 =  nothing 
@@ -944,8 +943,8 @@ function get_u0_p(sys,
944943        u0map,
945944        parammap =  nothing ;
946945        t0 =  nothing ,
947-         use_union =  true ,
948946        tofloat =  true ,
947+         use_union =  true ,
949948        symbolic_u0 =  false )
950949    dvs =  unknowns (sys)
951950    ps =  parameters (sys; initial_parameters =  true )
@@ -985,7 +984,7 @@ function get_u0_p(sys,
985984    if  symbolic_u0
986985        u0 =  varmap_to_vars (u0map, dvs; defaults =  defs, tofloat =  false , use_union =  false )
987986    else 
988-         u0 =  varmap_to_vars (u0map, dvs; defaults =  defs, tofloat  =   true , use_union)
987+         u0 =  varmap_to_vars (u0map, dvs; defaults =  defs, tofloat, use_union)
989988    end 
990989    p =  varmap_to_vars (parammap, ps; defaults =  defs, tofloat, use_union)
991990    p =  p ===  nothing  ?  SciMLBase. NullParameters () :  p
0 commit comments