Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-linear Sparse Constraint Jacobians #377

Open
jylambert opened this issue Jan 24, 2024 · 0 comments
Open

Non-linear Sparse Constraint Jacobians #377

jylambert opened this issue Jan 24, 2024 · 0 comments

Comments

@jylambert
Copy link

Description

The documentation regarding the constraint Jacobians mentions, "However, we have currently assumed that each of the blocks with an X in is a dense sub-block. pyOptSparse allows each of the sub-blocks to itself be sparse."

If I am passing a constraint Jacobian to a non-linear constraint as a simplified pyOptSparse sparse matrix format, the following error is shown, "pyOptSparse Error: The number of nonzero elements for constraint group 'constraint_1' with respect to var_1 was not the correct size. The supplied Jacobian has 1450 nonzero entries, but must contain 526350 nonzero entries." However, the number of nonzero elements in the Jacobian is 1450; the other entries are 0. The shape (725, 726) of the Jacobian is correct. Does the constraint Jacobians to a non-linear sub-block always have to be dense, or can it also be sparse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant