QuantEcon.jl icon indicating copy to clipboard operation
QuantEcon.jl copied to clipboard

LQ name conflict

Open arnavs opened this issue 6 years ago • 3 comments

Now that Julia has an LQ type (in the LinearAlgebra stdlib), there's a name conflict with the type exported by the package.

One way to handle this would be to change the following to ... struct LQProblem with the appropriate constructor.

mutable struct LQ
    Q::ScalarOrArray
    R::ScalarOrArray
    A::ScalarOrArray
    B::ScalarOrArray
    C::ScalarOrArray
    N::ScalarOrArray
    bet::Real
    capT::Union{Int, Nothing} # terminal period
    rf::ScalarOrArray
    P::ScalarOrArray
    d::Real
    F::ScalarOrArray # policy rule
end

https://github.com/QuantEcon/lecture-source-jl/issues/436

arnavs avatar Dec 11 '18 21:12 arnavs

That's annoying...

What do people think about LQProgram rather than LQProblem?

cc7768 avatar Dec 12 '18 03:12 cc7768

From the docstring,

Provides a type called LQ for solving linear quadratic control problems.

Ideally we would move toward more descriptive names rather than 3-letter structs (definitely not two), but until then I think LQC should be fine. Other exported structs with accronyms are: ARMA, LAE, LSS, and RBLQ (probably good to adjust this one as well based on the change to LQ).

Nosferican avatar Dec 12 '18 03:12 Nosferican

In the short run I think LQC or LQP sounds good. Probably best to keep style consistent with the other types, etc.

arnavs avatar Dec 12 '18 18:12 arnavs