Skip to content

Commit

Permalink
add variable name change constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Mar 18, 2018
1 parent f382436 commit 0543563
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Variable(name,
Variable(name,value,value_type,subtype,nothing,
dependents,description,flow,domain,size,context)
Variable(name,args...;kwargs...) = Variable(name,args...;subtype=:Variable,kwargs...)

Variable(name,x::Variable) = Variable(name,x.value,x.value_type,
x.subtype,D,x.dependents,x.description,x.flow,x.domain,
x.size,x.context)

Parameter(name,args...;kwargs...) = Variable(name,args...;subtype=:Parameter,kwargs...)
Constant(value::Number) = Variable(Symbol(value),value,typeof(value);subtype=:Constant)
Constant(name,args...;kwargs...) = Variable(name,args...;subtype=:Constant,kwargs...)
Expand Down

0 comments on commit 0543563

Please sign in to comment.