1 पॉइंट द्वारा GN⁺ 2024-12-18 | 1 टिप्पणियां | WhatsApp पर शेयर करें
  • Modelica जटिल साइबर-फिजिकल सिस्टम को अधिक कुशलता से मॉडल करने के लिए एक ऑब्जेक्ट-ओरिएंटेड भाषा है
  • पुन: उपयोग योग्य कंपोनेंट्स को non-causal connections के जरिए जोड़ा जा सकता है, और गणितीय समीकरणों पर आधारित मॉडल बनाए जा सकते हैं
  • इसे first principles आधारित मॉडलिंग को आसान बनाने के लिए डिज़ाइन किया गया है, और इसका फोकस फिजिकल सिस्टम की संरचना और व्यवहार को सीधे व्यक्त करने पर है
  • आधिकारिक साइट Modelica भाषा, libraries, tools और Modelica Association की जानकारी एक ही जगह उपलब्ध कराती है
  • Association से जुड़ी सामग्री, संगठनात्मक सदस्य, merchandising shop, और email/newsletter के संपर्क रास्ते भी साथ में देखे जा सकते हैं

Modelica भाषा का मॉडलिंग तरीका

  • Modelica साइबर-फिजिकल सिस्टम को मॉडल करने के लिए एक ऑब्जेक्ट-ओरिएंटेड भाषा है
  • पुन: उपयोग योग्य कंपोनेंट्स को non-causal connections के तरीके से जोड़ा जा सकता है
  • कंपोनेंट्स को गणितीय समीकरणों द्वारा नियंत्रित मॉडल के रूप में व्यक्त किया जाता है
  • यह संरचना first principles आधारित मॉडलिंग को आसान बनाने के लिए डिज़ाइन की गई है

आधिकारिक साइट पर उपलब्ध सामग्री

  • भाषा, libraries, tools

  • Association और संपर्क रास्ते

    • Modelica Association में संगठनात्मक सदस्य हैं, और साइट पर 21 से अधिक अतिरिक्त सदस्य देखे जा सकते हैं
    • Modelica merchandising shop के जरिए merchandising shop पर जा सकते हैं
    • संपर्क के रास्ते email board@modelica.org और Modelica Association Newsletter हैं

1 टिप्पणियां

 
GN⁺ 2024-12-18
Hacker News की राय
  • वेबसाइट के वर्णन की तरह, Modelica गणितीय व्यवहार को बताने वाली high-level declarative language है, और आम तौर पर engineering systems पर लागू होती है
    HVAC industry में इसका काफी इस्तेमाल होता है, और मेरे मामले में एक control engineer के तौर पर optimization काम के लिए मैं system engineer से कई components के FMU मांग सकता हूँ
    FMU (Functional Mockup Unit) एक standalone binary है, जो किसी dynamics system को दर्शाता है जिसे दूसरी applications चला सकती हैं
    मेरा background reinforcement learning, model predictive control और Python में है, और domain-specific language में लिखे physics-based models को Python workflow में embed कर पाना सुविधाजनक है
    Modelica का नजरिया Python/MATLAB जैसी आम imperative programming से अलग है
    आप equations, variables और constraints को order से स्वतंत्र रूप से define करते हैं, और compiler तय करता है कि simulation कैसे चलेगी, जैसे कौन-सा variable पहले solve करना है
    OpenModelica ने language standard के open source implementation के रूप में काफी प्रगति की है, लेकिन industry में Dymola जैसी proprietary applications अभी भी आगे हैं
    https://fmi-standard.org/
    https://fmpy.readthedocs.io/en/latest/
    https://openmodelica.org/

    • एक और उभरता हुआ समाधान Julia का simulation ecosystem है
      Julia language के पीछे की commercial organization को ये tools बनाने के लिए DARPA funding मिली, और यह numerical analysis researchers, scalable computing, और electrical/mechanical जैसे engineering system modeling domain experts को एक साथ ला रही है
      लगता है simulation का भविष्य इसी दिशा में जाएगा
      https://juliahub.com/products/juliasim
      https://news.ycombinator.com/item?id=26425659
      https://docs.sciml.ai/DiffEqDocs/stable/
    • क्या MATLAB भी इसी क्षेत्र में compete करता है?
  • यह काफी niche non-causal language है, और motorsports (F1, NASCAR) में driver simulators की real-time simulation के लिए व्यापक रूप से इस्तेमाल होती है
    language specification open source है, लेकिन कई commercial compilers हैं, जिनमें Dymola सबसे मशहूर है
    मैं इस language में काफी coding करता हूँ और non-causality बेहद powerful है
    यह models को बहुत composable बना देती है, ताकि mechanical systems को Lego blocks की तरह assemble करें तो equations अपने-आप निकल आती हैं
    model को उलटना भी आसानी से संभव है
    programming world में इसका सबसे करीबी analogy Haskell है

    • यह approach बहुत दिलचस्प लगी थी, इसलिए pipes, valves, tanks वगैरह वाले काफी complex fluid system की modeling में इसे आजमाने की कोशिश की थी
      लेकिन आखिर में generated equations के कारण solver संभाल नहीं पाया, और यह debug न हो सकने वाले black box जैसा लगा, इसलिए छोड़ दिया
      साफ नहीं है कि गलती हमारी थी या open source alternatives अभी इसे handle नहीं कर पाते
    • पूरी तरह सहमत हूँ, और शायद आप दिलचस्प काम कर रहे हैं
      non-causal modeling environments मुझे symbolic computation systems से भी काफी मिलते-जुलते लगते हैं
      क्योंकि वे असल में applied computer algebra systems ही हैं
  • landing page के description को देखकर, इस field से बाहर के व्यक्ति के तौर पर, पहले screen पर कोई example या examples की link हो तो अच्छा होगा
    करीब 30 seconds तक click किया, लेकिन कोई आकर्षक चीज नहीं मिली

    • Modelica को लेकर curious outsider के तौर पर, कुछ साल पहले मुझे यह जानकर रुचि हुई कि यह language ज्यादातर programming languages की तुलना में equations को अधिक सीधे तरीके से लिखने देती है
      उदाहरण के लिए ideal gas law PV = nRT में 5 identifiers हैं
      ज्यादातर programming languages में assignment के left side पर सिर्फ एक variable रखना पड़ता है, इसलिए T=PV/nR जैसा लिखते हैं, और किसी दूसरे variable को निकालना हो तो वैसी ही equations का अलग set बनाना पड़ता है
      Modelica में आप natural mathematical notation की तरह वही equation लिखते हैं, और known values के आधार पर unknown को solve किया जा सकता है
      https://mbe.modelica.university/behavior/equations/electrical/
      इससे आगे मुझे ज्यादा नहीं पता
    • examples यहाँ हैं
      यह physical/electrical systems की simulation लिखने के लिए simplified framework जैसा दिखता है
      https://mbe.modelica.university/
    • “Modelica Language” की पहली link में tutorials और examples हैं
      करीब 5 seconds click करके मैं यहाँ तक पहुँचा

      एक बहुत सरल differential equation पर विचार करें:
      x = (1-X)
      इस equation को देखें तो variable सिर्फ x एक है
      इस equation को Modelica में इस तरह व्यक्त किया जा सकता है:
      model FirstOrder
      Real x;
      equation
      der(x) = 1-x;
      end FirstOrder;
      यह code model definition की शुरुआत बताने वाले keyword model से शुरू होता है
      model keyword के बाद model का नाम FirstOrder आता है, और उसके बाद उन सभी variables की declarations आती हैं जिनमें रुचि है
      वगैरह

    • Modelica Language -> Modelica By Example -> https://mbe.modelica.university/
      खोजने में 5 seconds से भी कम लगे
    • लगता है वे अपने branded merchandise भी बेचते हैं
  • समझ नहीं आ रहा कि यह है क्या
    landing page पर एक भी उदाहरण नहीं है, और landing page के मुख्य links में कहीं भी एक भी उदाहरण नहीं है
    इसकी जगह mugs और hoodies खरीदने के लिए एक merch store है, और “organizational members” के नाम पर बड़ी-बड़ी company logos हैं
    अगर कुछ बनाया है, तो जो बनाया है उसे दिखाना चाहिए
    जब तक मुझे पहले से पता न हो कि इसकी जरूरत है, मुझे नहीं लगता कि मैं यह समझने में 30 सेकंड से ज्यादा लगाऊंगा कि यह क्या है
    इसे इतना मुश्किल क्यों बनाया होगा?

    • सहमत
      यहां तक पहुंचने के लिए कई बार click करना पड़ा
      https://mbe.modelica.university/behavior/equations/first_order/
    • सच कहूं तो मुझे यह काफी modern site लगती है
      USB consortium से तुलना करके देखिए
      https://www.usb.org
      या PCI-SIG:
      https://pcisig.com
      शायद design language जरूरत से ज्यादा modern थी
      कहीं आपने इसे 25 साल से ज्यादा पुराने industry standard के बजाय कोई startup project तो नहीं समझ लिया?
      यह सोचना दिलचस्प है कि बहुत modern दिखना perception और expectations पर उलटा असर डाल सकता है
      अगर site design 2018 के आसपास वाला होता तो प्रतिक्रिया कैसी होती?
      http://web.archive.org/web/20180214180117/https://www.modelica.org/
    • क्योंकि यह आपके लिए नहीं है
      यह उन लोगों के लिए है जिन्हें जटिल multi-domain systems simulate करने होते हैं, और systems के behavior को describe, package और exchange करने का तरीका चाहिए होता है
    • “Modelica is an object oriented language to model cyber-physical systems.”
      यह सचमुच पहला वाक्य ही है
  • अपने मौजूदा workplace में मैं OpenModelica के साथ Modelica इस्तेमाल करके electromagnetic systems describe कर रहा हूं, और language भी शानदार है और OpenModelica का graphical user environment भी बेहतरीन है
    कभी-कभी मैं इसे multi-physics systems के लिए SPICE जैसा समझता हूं
    Modelica library काफी mature और polished है, और OpenModelica में शामिल numerical solvers भी मजबूत और performant हैं
    सीखने में थोड़ा समय लगा, लेकिन अब उसका फायदा मिल रहा है
    ऊपर से, Modelica कई vendors द्वारा implement किया गया standard है और open-source application भी मौजूद है, इसलिए vendor lock-in से बचने के लिए भी अच्छा है
    engineers और companies के नजरिए से मुझे यह investment के लिए सुरक्षित technology लगती है

    • इस तरह की simulations करने के लिए Modelica एक बेहतरीन तरीका है
      FMI standard के अनुसार FMU export first-class feature होना भी बहुत valuable है, खासकर system integrators के लिए
      आप reasonably obfuscated system model किसी untrusted party को दे सकते हैं, फिर भी वे system model के फायदे पूरी तरह ले सकते हैं
      इस मामले में OpenModelica, open-source ModelingToolkit.jl और संबंधित library FMIExport.jl समेत competitors से आगे है
      https://openmodelica.org/doc/OpenModelicaUsersGuide/v1.11.0/fmi.html
      https://docs.sciml.ai/ModelingToolkit/stable/
      https://github.com/ThummeTo/FMIExport.jl
    • Siemens में student के तौर पर काम करते समय मुझे याद है कि neural network को ONNX में extract किया, ONNX runtime DLL जोड़कर FMU को OpenModelica से test किया, और फिर Simcenter Amesim से connect किया था
      engineering software की पुरानी और rigid APIs की तुलना में यह काफी अच्छा standard था
  • मैंने 4 साल पहले यूनिवर्सिटी से ग्रैजुएशन किया था, और अब जाकर bond graph modeling के rabbit hole में उतरा हूँ—Henry M. Paynter के MIT lecture notes से खुद पढ़ रहा हूँ, और नौकरी में Simscape से vehicle systems मॉडल कर रहा हूँ
    मेरी समझ है कि Modelica और Simscape bond graph को underlying mechanism के रूप में इस्तेमाल करते हैं—पता नहीं यह सही है या नहीं
    अच्छा होगा अगर इस field का कोई expert थोड़ी दिशा दिखा दे
    अभी मेरा मानना है कि bond graph theory समझ लेने से मैं जिन लगभग सभी systems पर काम करता हूँ, उन्हें intuitive तरीके से समझ पाऊँगा
    यह भी दिलचस्प है कि यह field आश्चर्यजनक रूप से niche है
    मेरे आसपास ज़्यादातर colleagues ने इस पर खास ध्यान नहीं दिया, लेकिन जब मुझे इसके बारे में पता चला तो यह मेरी सारी समस्याओं की magic bullet जैसा लगा
    https://dirac.ruc.dk/~heine/paynter/analysis_and_design_of_engineering_systems_henry_m_paynter.pdf

    • मैं इस बात से सहमत नहीं हूँ कि bond graph Modelica का “underlying mechanism” है
      असल में Modelica community और bond graph community के बीच थोड़ी खींचतान रही है
      इस बारे में मेरा रुख [1] और [2] में है
      मैं इस विचार से भी सहमत नहीं हूँ कि bond graph लगभग सभी systems को intuitive तरीके से समझा देगा
      इससे आपको bond graph formalization की elegance की सराहना जरूर मिलती है
      लेकिन 30 साल के industrial modeling अनुभव के आधार पर, उससे निकाली जाने वाली analogies बहुत सतही होती हैं
      passive, linear elements से आगे जाते ही analogies टूट जाती हैं
      जैसे thermal systems में momentum क्यों नहीं होता, compressible fluid होने पर क्या होता है, electrical system में clutch के equivalent क्या है—ऐसे सवाल आते हैं
      bond graph सच में acausal भी नहीं है; यह बस physics के ज़्यादा करीब एक अलग causal formalization है
      bond graph fans निश्चित रूप से असहमत होंगे, लेकिन मैं अपना निजी और subjective नजरिया साझा कर रहा हूँ
      https://www.linkedin.com/feed/update/urn:li:ugcPost:7272516319944589312?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7272516319944589312%2C7272661328605900801%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287272661328605900801%2Curn%3Ali%3AugcPost%3A7272516319944589312%29
      https://mbe.modelica.university/components/connectors/simple_domains/
  • संबंधित पोस्ट:
    All about Modelica: An equation-based language for modeling physical systems - https://news.ycombinator.com/item?id=23690788 - जून 2020, 44 टिप्पणियाँ
    Modelica - https://news.ycombinator.com/item?id=16013179 - दिसंबर 2017, 12 टिप्पणियाँ

  • ModelingToolkit.jl को +1
    इसने Modelica से सीखी गई बातें अपनाई हैं, और इसके साथ काम करना मजेदार है

  • मेरी समझ के अनुसार, यह “systems” को काफी general तरीके से describe करने वाली language है, और systems को differential equations या discrete equations (if/then/else) से model किया जा सकता है
    अगर यह पर्याप्त general है तो बहुत अच्छा है
    हालांकि ज़्यादा दिलचस्प हिस्सा ऐसे systems की time-based simulation को सच में run करने की general methodology है
    खासकर brute-force Monte Carlo-style integration या sampling के बजाय, अगर arbitrarily complex differential equations को describe किया जा सके तो और भी ज्यादा

    • ordinary differential equations और differential-algebraic equations के numerical solutions ऐसा field है जिसमें कई शानदार methods मौजूद हैं
  • Modelica भाषा पर आधारित open source implementation OpenModelica को भी नहीं छोड़ा जा सकता
    मैंने अभी इसे इस्तेमाल नहीं किया है, लेकिन इस छुट्टी में इसकी कुछ features देखने की योजना है
    https://openmodelica.org/

    • अगर आप OpenModelica देखने की सोच रहे हैं, तो ModelingToolkit.jl भी आपको पसंद आ सकता है
      https://docs.sciml.ai/ModelingToolkit/dev/
      Modelica के प्रमुख commercial implementation Dymola पर Dassault में काम कर चुके Hilding Elmqvist का भी एक project है
      उनका project Modia.jl है
      https://github.com/ModiaSim/Modia.jl
      निजी तौर पर मुझे लगता है कि Julia community MTK के इर्द-गिर्द जुट रही है, लेकिन Julia में dynamic system simulation के शुरुआती दौर में Modia आगे था, और MTK ने Modia और Modelica दोनों से काफी प्रेरणा ली है
      Modia इस्तेमाल में थोड़ा बेहतर लगता है, और इसने 3D viewer और पूरे multibody package जैसी चीज़ें कई साल पहले ही integrate कर ली थीं; Julia Computing अब जाकर catch up कर रहा है
      MTK में backend interpreter support बेहतर है और इसमें Modia से आगे निकलने की संभावना ज्यादा है
      खासकर इसलिए क्योंकि Modia की release speed धीमी पड़ती दिख रही है
      https://github.com/JuliaComputing/Multibody.jl

    • काम पर इसे इस्तेमाल करने के अनुभव से paid version पर मेरी छोटी राय है: दूर रहो, भागो
      free SPICE की तुलना में यह बहुत ज्यादा कुछ नहीं कर पाता, licensing जटिल है, और bugs बहुत हैं
      यह simulation जगत का LabVIEW जैसा है
      free version मैंने इस्तेमाल नहीं किया है

    • सहकर्मियों के साथ मिलकर मैंने hybrid dynamical systems के लिए dynamical system modeling language NESTML विकसित की है
      यहां hybrid dynamical systems से मतलब ऐसे systems से है जिनमें ordinary differential equations से व्यक्त continuous-time dynamics और समय में तुरंत होने वाले discrete events का भेजना-प्राप्त करना, दोनों शामिल होते हैं
      हमने syntax को न्यूनतम रखने की कोशिश की, इसलिए models बहुत संक्षिप्त रूप में लिखे जा सकते हैं
      उदाहरण के लिए:
      model lorenz_attractor:

      state:
      x real = 1
      y real = 1
      z real = 1

      equations:
      x' = sigma * (y - x) / s
      y' = (x * (rho - z) - y) / s
      z' = (x * y - beta * z) / s

      update:
      integrate_odes()

      parameters:
      sigma real = 10
      beta real = 8/3
      rho real = 28

      events के लिए "onReceive(in_port_name)" और "emit_spike()" जैसे constructs हैं
      naming पर neuroscience application domain का काफी असर है
      यह अभी work in progress है, लेकिन training के बाद sequence replay करने वाले spiking neural network जैसे दिलचस्प applications पहले से मौजूद हैं
      https://nestml.readthedocs.io/en/latest/tutorials/sequence_learning/sequence_learning.html
      NESTML development शुरू करते समय सच कहूं तो मुझे हैरानी हुई कि ऐसी चीज़ पहले से मौजूद नहीं थी
      Modelica मिलता-जुलता है, लेकिन उसमें discrete event support नहीं दिखता
      मुझे पता है कि यह खुला promotion है, लेकिन सच में comments और feedback का बहुत स्वागत है
      सारा development GitHub पर public रूप से होता है और GPL license के तहत है
      अगर किसी को ऐसे ही domain-specific languages के बारे में पता हो, तो मैं comments पढ़ना चाहूंगा