{"action":"created","issue":{"url":"https://api.github.com/repos/casadi/casadi/issues/1590","labels_url":"https://api.github.com/repos/casadi/casadi/issues/1590/labels{/name}","comments_url":"https://api.github.com/repos/casadi/casadi/issues/1590/comments","events_url":"https://api.github.com/repos/casadi/casadi/issues/1590/events","html_url":"https://github.com/casadi/casadi/issues/1590","id":108615361,"number":1590,"title":"Uniform way for creating solver instances","user":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","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},"labels":[{"url":"https://api.github.com/repos/casadi/casadi/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","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},"milestone":{"url":"https://api.github.com/repos/casadi/casadi/milestones/13","html_url":"https://github.com/casadi/casadi/milestones/Version%203.0","labels_url":"https://api.github.com/repos/casadi/casadi/milestones/13/labels","id":1072673,"number":13,"title":"Version 3.0","description":"Release 3.0 consolidates and extends the syntax changes from 2.4 and previous releases. With this release, CasADi should enter a new stage of maturity and hopefully stability.","creator":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","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},"open_issues":74,"closed_issues":21,"state":"open","created_at":"2015-04-17T19:05:14Z","updated_at":"2015-11-13T23:01:48Z","due_on":"2016-01-31T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-09-28T08:55:22Z","updated_at":"2015-11-18T19:23:21Z","closed_at":null,"body":"As a follow-up of #1585, I propose to use overloads of a single function for the different solver classes. NlpSolver would be renamed `solver` and as now provide a general syntax, passing an \"nlp\" function and a simplified syntax passing an expression:\r\n```python\r\n# General syntax:\r\nnlp = MXFunction('nlp, nlpIn(x=...), nlpOut(f=..., g=...))\r\nmysolver = solver('mysolver', 'ipopt', nlp, opts)\r\n# Simplified syntax\r\nmysolver = solver('mysolver','ipopt', {'x':..., 'f':..., 'g':...}, opts)\r\n```\r\nThe convex solver classes would be renamed in a consistent way, with two function overloads:\r\n * One accepting a c++ with the data needed to construct the problem. This corresponds to the current constructors, but with a type safety and without the inefficiencies of storing `map<string, ...>` inside the convex solver classes.\r\n * One with the simplified syntax above, passing symbolic expressions. The function would extract the QP/SDP/QCQP etc. from the symbolic expressions and wrap the whole thing in an `MXFunction` with the same syntax as an `NlpSolver` instance:\r\n\r\n```python\r\n# General syntax:\r\nqp = qpStruct(...)\r\nmysolver = solver('mysolver', 'qpoases', qp, opts) # mysolver qp solver signature\r\n# Simplified syntax\r\nmysolver = solver('mysolver','qpoases', {'x':..., 'f':..., 'g':...}, opts) # mysolver nlp solver signature\r\n```"},"comment":{"url":"https://api.github.com/repos/casadi/casadi/issues/comments/157830078","html_url":"https://github.com/casadi/casadi/issues/1590#issuecomment-157830078","issue_url":"https://api.github.com/repos/casadi/casadi/issues/1590","id":157830078,"user":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","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":"2015-11-18T19:23:21Z","updated_at":"2015-11-18T19:23:21Z","body":"Renaming complete. Missing piece: creating QP solver using NLP solver syntax. Suggested syntax:\r\n * qpsol(structure arguments) -> QP solver instance (like now)\r\n * qpsol(expression arguments) -> QP solver instance wrapped to align with Nlpsol"}}