{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/1890","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/1890/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/1890/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/1890/events","html_url":"https://github.com/tbeu/Modelica/issues/1890","id":197629144,"number":1890,"title":"Complex matrix vector multiplication added in MSL trunk","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":506762997,"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701","default":true},{"id":506769007,"url":"https://api.github.com/repos/tbeu/Modelica/labels/L:Complex*","name":"L:Complex*","color":"0000aa","default":false}],"state":"open","locked":false,"assignee":{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false},"assignees":[{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/tbeu/Modelica/milestones/59","html_url":"https://github.com/tbeu/Modelica/milestone/59","labels_url":"https://api.github.com/repos/tbeu/Modelica/milestones/59/labels","id":2214862,"number":59,"title":"MSL3.2.2","description":"","creator":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":136,"state":"closed","created_at":"2016-12-25T13:02:16Z","updated_at":"2016-12-27T00:29:58Z","due_on":"2016-03-11T08:00:00Z","closed_at":"2016-12-25T13:02:16Z"},"comments":6,"created_at":"2016-12-27T00:28:27Z","updated_at":"2016-12-27T00:30:19Z","closed_at":null,"body":"**Reported by beutlich on 25 Jan 2016 09:04 UTC**\nThe newly introduced matrix vector product of type Complex (e.g., in Modelica.Magnetic.QuasiStatic.FundamentalWave.Components.MultiPhaseElectroMagneticConverter.vSymmetricalComponent) is currently not supported by all tools.\n\nWe therefore propose to add a new function matrixVectorProduct to Modelica.ComplexMath in order to circumvent this problem.\n\nThe following test model contains three implementations of the complex matrix vector product.\n\n```mo\nmodel TestComplexMatrixVectorMultiplication\n  parameter Complex m[2,2] = {{Complex(1,0),Complex(1,1)},{Complex(1,-1),Complex(0,1)}};\n  parameter Complex v[2] = {Complex(1,0),Complex(0,1)};\n  Complex mv1[2];\n  Complex mv2[2];\n  Complex mv3[2];\n\n  // Modelica.ComplexMath.matrixVectorProduct\n  function matrixVectorProduct \"Matrix vector product c1*c2 of a complex matrix and a complex vector\"\n    import Complex;\n    input Complex c1[:,:] \"Vector of Complex numbers 1\";\n    input Complex c2[size(c1,2)] \"Vector of Complex numbers 2\";\n    output Complex c3[size(c1,1)] \"= c3[j]:= sum_k(c1[j,k]*c2[k])\";\n  algorithm\n    for j in 1:size(c1,1) loop\n      c3[j] := Complex(0);\n      for k in 1:size(c1,2) loop\n        c3[j] := c3[j] + c1[j,k]*c2[k];\n      end for;\n    end for;\n  annotation(Documentation(info=\"<html>This function returns the matrix vector product of a given matrix of Complex and a given vector of Complex.</p></html>\"));\n  end matrixVectorProduct;\n\nequation\n  mv1 = m*v; // New in MSL trunk\n  mv2 = {sum(m[j,k]*v[k] for k in 1:size(m,2)) for j in 1:size(m,1)}; // Illegal Modelica since arguments of sum must be of type Real or Integer\n  mv3 = matrixVector(m, v); // Explicit use function matrixVector\n  \nannotation(uses(Complex));\nend TestComplexMatrixVectorMultiplication;\n```\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1890"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/269251646","html_url":"https://github.com/tbeu/Modelica/issues/1890#issuecomment-269251646","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/1890","id":269251646,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T00:30:18Z","updated_at":"2016-12-27T00:30:18Z","body":"**Comment by ahaumer on 3 Feb 2016 18:32 UTC**\nI did withdraw the ComplexMath.Vector.matrixVectorProduct function, but I replaced the complex matrix times vector product by another formulation (equations) for the 3 occurences. \nResolved by ad8900ec1e90c17c76c545a44df3f2d75ef18317; if you still have issues, please reopen the ticket and describe the problems."}}
{"actor":{"display_login":"modelica-trac-importer"}}