Skip to content

Error sol.print_cost() #712

Description

@AnaisFarr

I'm currently running simulations in several phases. In my phase 0, q, qdot and tau are declared as q, qdot and tau. But in my phase 1, which contains holonomic constraints, the q, qdot and tau of the independent segments are declared as u, udot and tau. The problem is that in solution.py, the key chosen is that of the first phase and the key name (here q) is considered to be the same for all phases. However, this is not the case in my example. As a result, I get this error for the phase 1 because the real key is u:

KeyError: 'q'

On this line of solution.py (l.1457):

 for key in nlp.states:
            x = np.concatenate((x, self._states["scaled"][phase_idx][key][:, node_idx]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions