Skip to content

Supporting closed kinematic loops #23

@baggepinnen

Description

@baggepinnen

Modelica automatically detects loops and replaces the frame_a.R ~ frame_b.R resulting from connect(frame_a, frame_b) with the residual equation. Initially, we can require the user to do this manually by calling connect_loop instead of connect. By storing some metadata in the frame connector if it belongs to a loop opening, like this

function connect_loop(F1, F2)
    F1.metadata[:loop_opening] = true
    connect(F1, F2)
end

we could detect the loop opening when we expand the connections and emit

residue(F1, F2) .~ 0

instead of frame_a.R ~ frame_b.R. @YingboMa do you have a suggestion on how to modify connection2set! to accomplish this? It's not apparent to me where the equality constraints between the potential variables are introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions