{"id":22549955,"url":"https://github.com/openmodelica/ommatlab","last_synced_at":"2025-04-10T02:02:29.884Z","repository":{"id":44904383,"uuid":"126152099","full_name":"OpenModelica/OMMatlab","owner":"OpenModelica","description":"Matlab scripting OpenModelica interface","archived":false,"fork":false,"pushed_at":"2024-03-26T12:00:15.000Z","size":505,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-24T03:42:34.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenModelica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T09:09:53.000Z","updated_at":"2024-09-03T07:23:00.000Z","dependencies_parsed_at":"2024-12-07T16:10:33.302Z","dependency_job_id":"7b89e878-9215-4efb-b054-9fb41e2a3207","html_url":"https://github.com/OpenModelica/OMMatlab","commit_stats":{"total_commits":52,"total_committers":8,"mean_commits":6.5,"dds":"0.21153846153846156","last_synced_commit":"0bbe0aa27ce60044a752b12935c69838f534ddd5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2FOMMatlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2FOMMatlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2FOMMatlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2FOMMatlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenModelica","download_url":"https://codeload.github.com/OpenModelica/OMMatlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142960,"owners_count":21054671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T16:10:31.116Z","updated_at":"2025-04-10T02:02:29.853Z","avatar_url":"https://github.com/OpenModelica.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OMMatlab\nMatlab scripting OpenModelica interface using ZEROMQ \n\n# Requirement:\n[Openmodelica](https://www.openmodelica.org/)\u003cbr\u003e\n[Matlab](https://se.mathworks.com/products/matlab.html)\u003cbr\u003e\n[zeromq/jeromq](https://github.com/zeromq/jeromq)\u003cbr\u003e\n\nThe jeromq/zeromq library can be build by following the instructions in the repository, or the users can use the pre-build \"jeromq-0.4.4-SNAPSHOT.jar\" available in this repository and start using it straight away.\n\n# Installation\nClone the repository and add the installation directory to Matlab PATH for future sessions. For Example \u003cbr\u003e\n```\nfrom the matlab terminal, in windows\n\u003e\u003e\u003e pathtool\nwill open a window, add the directory to the list of entries and save. For example in windows\n\"C:/OPENMODELICAGIT/OpenModelica/OMMatlab\"\n```\n```\nThen we have to set the java classpath, so that the jeromq library can be used from Matlab. for that we need to create a file called javaclasspath.txt and add the jar file location to the file, To do that \n\u003e\u003e\u003e prefdir\nwill show the preferred directory path, For example in windows \n'C:\\Users\\arupa54\\AppData\\Roaming\\MathWorks\\MATLAB\\R2017b'\ncreate a file javaclasspath.txt in that location and add the jar file path to the file, for example in windows the entry would be\nC:/OPENMODELICAGIT/OpenModelica/OMMatlab/jeromq-0.4.4-SNAPSHOT.jar\nNote: The path should be added without any quotes either single or double\n```\nYou can also directly use the OMMatlab package directly from the directory where you have cloned, without need to perform the above steps. But the package cannot be used globally.\n\n# Usage\n```\n\u003e\u003e\u003e import OMMatlab.*;\n\u003e\u003e\u003e omc=OMMatlab();\n\u003e\u003e\u003e omc.sendExpression(\"getVersion()\")\n\"v1.13.0-dev-531-gde26b558a (64-bit)\"\n\u003e\u003e\u003e omc.sendExpression(\"model a end a;\")\n\"{a}\"\n\u003e\u003e\u003e omc.sendExpression('loadFile(\"C:\\OMMatlab\\BouncingBall.mo\")')\ntrue\n\u003e\u003e\u003e omc.sendExpression(\"getClassNames()\")\n{a,BouncingBall}\n\u003e\u003e\u003e omc.sendExpression(\"simulate(BouncingBall)\")\nrecord SimulationResult\n    resultFile = \"C:/Users/arupa54/BouncingBall_res.mat\",\n    simulationOptions = \"startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'BouncingBall', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''\",\n    messages = \"LOG_SUCCESS       | info    | The initialization finished successfully without homotopy method.\nLOG_SUCCESS       | info    | The simulation finished successfully.\n\",\n    timeFrontend = 0.03334629789025638,\n    timeBackend = 0.05818852816547053,\n    timeSimCode = 0.02908068832276598,\n    timeTemplates = 0.04130980342652182,\n    timeCompile = 4.495768417986718,\n    timeSimulation = 0.135430370984969,\n    timeTotal = 4.795528603068404\nend SimulationResult;\n```\nTo see the list of available OpenModelicaScripting API see    (https://www.openmodelica.org/doc/OpenModelicaUsersGuide/latest/scripting_api.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmodelica%2Fommatlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmodelica%2Fommatlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmodelica%2Fommatlab/lists"}