Skip to content

Support sympy.physics.mechanics.dynamicsymbols as well as sympy.Symbol in SymPy backend #64

@brocksam

Description

@brocksam

The SymPy backend should natively support sympy.physics.mechanics.dynamicsymbols as well as sympy.Symbol objects (as was the case prior to 24eb461). It is common for users to use sympy.physics.mechanics to derive equations of motion (EoMs) that are then used to construct their optimal control problem. These EoMs will be built from both sympy.physics.mechanics.dynamicsymbols and sympy.Symbol objects. It should be possible to directly set sympy.physics.mechanics.dynamicsymbols as state and control variables in the OCP definition when the SymPy backend is being used to save users doing a replacement to sympy.Symbol objects, which can be costly for large and complex models.

Note: the workaround until this issue is resolved is for users to manually substitute sympy.Symbol objects in place of sympy.physics.mechanics.dynamicsymbols before constructing their OCP via pycollo.OptimalControlProblem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions