MadNLP / DynamicNLPModels.jl

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

Add non-default vector/matrices to the test #16

Closed sshin23 closed 2 years ago

sshin23 commented 2 years ago

Add the following to the test and check whether the model is created correctly.

e.g.,

s0 = randn(Float32,2)
A = randn(Float32,2,2)
B = randn(Float32,2,2)
Q = randn(Float32,2,2)
R = randn(Float32,2,2)

@test LQDynamicModel(s0,A,B,Q,R,10) isa LQDynamicModel{Float32, Vector{Float32}, SparseArrays.SparseMatrixCSC{Float32, Int64}, SparseArrays.SparseMatrixCSC{Float32, Int64}, Matrix{Float32}}

and do the same for CuArrays. Currently we can't solve it with MadNLP yet, but later we can also test solving it with MadNLP once MadNLP supports single different precisions