{"action":"created","issue":{"url":"https://api.github.com/repos/casadi/casadi/issues/2197","repository_url":"https://api.github.com/repos/casadi/casadi","labels_url":"https://api.github.com/repos/casadi/casadi/issues/2197/labels{/name}","comments_url":"https://api.github.com/repos/casadi/casadi/issues/2197/comments","events_url":"https://api.github.com/repos/casadi/casadi/issues/2197/events","html_url":"https://github.com/casadi/casadi/issues/2197","id":299435068,"number":2197,"title":"DaeBuilder Vector State Handling Error","user":{"login":"jgoppert","id":473772,"avatar_url":"https://avatars1.githubusercontent.com/u/473772?v=4","gravatar_id":"","url":"https://api.github.com/users/jgoppert","html_url":"https://github.com/jgoppert","followers_url":"https://api.github.com/users/jgoppert/followers","following_url":"https://api.github.com/users/jgoppert/following{/other_user}","gists_url":"https://api.github.com/users/jgoppert/gists{/gist_id}","starred_url":"https://api.github.com/users/jgoppert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgoppert/subscriptions","organizations_url":"https://api.github.com/users/jgoppert/orgs","repos_url":"https://api.github.com/users/jgoppert/repos","events_url":"https://api.github.com/users/jgoppert/events{/privacy}","received_events_url":"https://api.github.com/users/jgoppert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T17:11:24Z","updated_at":"2018-02-23T04:45:56Z","closed_at":null,"author_association":"NONE","body":"```python\r\ndef quat_product(q, p):\r\n    return ca.vertcat(\r\n    p[0]*q[0] - p[1]*q[1] - p[2]*q[2] - p[3]*q[3],\r\n    p[0]*q[1] + p[1]*q[0] + p[2]*q[3] - p[3]*q[2],\r\n    p[0]*q[2] - p[1]*q[3] + p[2]*q[0] + p[3]*q[1],\r\n    p[0]*q[3] + p[1]*q[2] + p[2]*q[1] + p[3]*q[0])\r\n\r\ndef quat_deriv_body(q, omega):\r\n    v = ca.vertcat(0, omega[0], omega[1], omega[2])\r\n    return 0.5 * quat_product(q, v)\r\n\r\ndae = ca.DaeBuilder()\r\nq, qdot = dae.add_s('q', 4)\r\nomega = dae.add_u('omega', 3)\r\ndae.add_dae('qdot', qdot - quat_deriv_body(q, omega))\r\ndae.make_explicit() <-- runtime error\r\n```\r\nIs this not supported, it results in a runtime error, no useful exceptions.\r\n\r\nIf I use explicit equations it gets a bit farther, but fails on display(True)\r\n```python\r\ndae = ca.DaeBuilder()\r\nq = dae.add_x('q', 4)\r\nomega = dae.add_u('omega', 3)\r\ndae.add_ode('qdot', quat_deriv_body(q, omega))\r\ndae.make_explicit()\r\ndae.disp()\r\n```bash\r\nns = 0, nx = 1, nz = 0, nq = 0, ny = 0, np = 0, nd = 0, nu = 1\r\n```python\r\ndae.disp(True)  <-- runtime error\r\n```\r\nSanity check of my function\r\n```python\r\neq1 = ca.Function('qdot', [q, omega], [quat_deriv_body(q, omega)])\r\neq1([1, 0, 0, 0], [1, 2, 3])\r\n```\r\n```bash\r\nDM([-0, 0.5, 1, 1.5])\r\n```"},"comment":{"url":"https://api.github.com/repos/casadi/casadi/issues/comments/367908521","html_url":"https://github.com/casadi/casadi/issues/2197#issuecomment-367908521","issue_url":"https://api.github.com/repos/casadi/casadi/issues/2197","id":367908521,"user":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars1.githubusercontent.com/u/2487645?v=4","gravatar_id":"","url":"https://api.github.com/users/jaeandersson","html_url":"https://github.com/jaeandersson","followers_url":"https://api.github.com/users/jaeandersson/followers","following_url":"https://api.github.com/users/jaeandersson/following{/other_user}","gists_url":"https://api.github.com/users/jaeandersson/gists{/gist_id}","starred_url":"https://api.github.com/users/jaeandersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaeandersson/subscriptions","organizations_url":"https://api.github.com/users/jaeandersson/orgs","repos_url":"https://api.github.com/users/jaeandersson/repos","events_url":"https://api.github.com/users/jaeandersson/events{/privacy}","received_events_url":"https://api.github.com/users/jaeandersson/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T04:45:56Z","updated_at":"2018-02-23T04:45:56Z","author_association":"OWNER","body":"Don't hold your breath for fixes to the DaeBuilder class... but do feel free to do pull requests.."}}
{"actor":{"display_login":"jaeandersson"}}