MadNLP / DynamicNLPModels.jl

NLPModels for dynamic optimization
MIT License
11 stars 1 forks source link

Refactored `src/` and cleaned up tests #40

Closed dlcole3 closed 2 years ago

dlcole3 commented 2 years ago

The source code in src/ is over 2000 lines long and needed to be refactored. I added two subdirectories, nonlinear and lq. nonlinear contains an empty Julia file that just has a TODO comment. lq now contains four files: lq.jl, sparse.jl, dense.jl, and tools.jl. lq.jl contains most of the data structures for the linear quadratic MPC problem. sparse.jl contains all the code for building the sparse models. dense.jl contains the code for building the dense and the dense-implicit models. tools.jl contains various extended functions and API functions, such as the get_u or get_Q functions, as well as the mul! extensions and add_jtsj functions.

I also updated the test folder so that testing the mul! extension and add_jtsj! function are done within @testset and which calls both Arrays and CuArrays the same.