Skip to content

Non-linear Sparse Constraint Jacobians #377

Description

@jylambert

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis is related to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions