OpenModelica/C2/Control-flow-and-Event-handling/Khasi

From Script | Spoken-Tutorial
Revision as of 12:50, 2 August 2018 by Mousumi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Time Narration
00:01 Ngi pdiang sngewbha sha ka spoken tutorial ha Control flow and Event handling.
00:07 Ha kane ka jinghikai, ngin ia pule: kumno ban pyndonkam if-else statement, kumno ban handle time bad state events, kumno ban pyndonkam whenstatement.
00:19 Ban record kane ka jinghikai, nga pyndonkam: OpenModelica 1.9.2 bad Ubuntu Operating system version 14.04.
00:30 Tangba, kane ka rukom ka iasyriem ha Windows, Mac OS X lane FOSSEE OS ha ARM.
00:38 Ban sngewthuh bad practice kane ka jinghikai, phi donkam ban tip kine harum: equation-based modeling jong ka physical systems,
00:47 Branching ha kano kano ka programming language, class definition ha Modelica
00:53 Ka jinghikai Pre-requisite lah dep kdew ha ka Spoken Tutorial website. Sngewbha leit pule ia ki.
01:00 freeFall class lah dep iakren ha ka jinghikai kaba lah dep.
01:05 Mynta, to ngin ia pyndap u constraint ha ka.
01:08 Ka Ball ka ieng haduh t=0.5 seconds. Free fall hapoh gravity ka sdang ha ka por t=0.5 seconds.
01:19 Nga lah dep shna ka model ba kyrteng timeEventExample kaba lah ban simulate kane ka condition.
01:25 timeEventExample file lah ban ioh na Code Files link ha spoken tutorial website.
01:32 Sngewbha download bad save baroh ki files ha Code Files link.
01:38 Nga ka byta ka jing sngewbiang ka jong phi, freeFall class lah ruh ban ioh.
01:43 Mynta to ngan leit sha OMEdit.
01:45 Nga lah dep pynmeh lypa iaka ha ka system ka jong nga.
01:49 Ban plie OMEdit ha Ubuntu Operating System , klik ha Dash Home icon hajrong jong ka liang kadiang.
01:58 Type OMEdit ha ka Search bar bad klik ha OMEdit icon. To ngan leit phai biang.
02:06 Kynmaw: Windows u nongpyndonkam u lah ruh ban wad iaka OMEdit ha Start menu bad plie ia ka.
02:13 Ban plie timeEventExample file, klik ha ka tool ba kyrteng Open Model/Library File.
02:21 Wad iaka timeEventExample file ha ka system ka jong phi bad klik ha Open.
02:28 Phi lah ban pyndonkam da kumwei ia ka File menu ban plie kane ka file.
02:34 Kynmaw ba timeEventExample ka lah paw ha ka Libraries browser.
02:39 Right-klik ha une u icon bad jied View class.
02:44 Ka model mynta ka lah plie ha Diagram view.
02:47 Klik ha u button uba lai uba dei u Text View.
02:51 Ngi lah dep ia kren lypa ba ka model bad ka class pyndonkam synonymously ha Modelica.
02:58 Ka kyrteng jong kane ka model ka dei timeEventExample.
03:02 Comments kum kane, lah ban thoh ha ka lain kaba nyngkong jong ka model lane class.
03:08 h, v bad g ka ieng ia kajuh ka quantities kum ha ka freeFall class.
03:16 initial equation section ka don ka condition kaba sdang.
03:21 Value jong u h ha ka por t=0 ka dei 30m.
03:26 Value jong v ha ka por t=0 ka dei 0.
03:31 Equation ka kdew ia ka jingsdang jong ka equation section jong kane ka model.
03:36 Mynta, to ngin ia peit kumno ban thep u constraint ba la batai ha ka slides.
03:43 Kynmaw ba ka don ka if-else block ha equation section ba lah pyni.
03:48 To ngin ia pyrshang ban sngewthuh man la ka statement jong kane ka if-else block.
03:53 if statement ka bujli ia ka constraint ha ka time variable.
03:58 time ka dei ka built-in variable ha Modelica.
04:01 Kam da donkam ban declare explicitly ha ka class lane model.
04:06 Ka ball ka experience free fall hadien ka por 0.5 seconds.
04:12 Te, kine ki artylli ki equations ki thew ia kijuh ki equations kum kito ha ka freeFall class.
04:19 else branch ka don equations kaba lah shah executed haba ka por ka duna ia 0.5 seconds.
04:27 Ka ball ka don ha ba ieng haba ka pork a duna ia 0.5 seconds.
04:32 Te, kine ki artylli ki equations ki bat bha ha katei ka case.
04:36 end if ka thew ia kaba kut jong ka if-else block.
04:41 Ka model mynta ka lah dep.
04:44 To ngin ia simulate ia ka da kaba klik ha Simulate button.
04:48 Plotting prespective mynta ka lah plie.
04:51 Jied h ha u Variables browser.
04:55 Kane ka pynmih h versus time plot.
04:58 Namar ba ka ball ka ieng haduh ka por t=0.5 seconds, ka jing jrong ka neh kumjuh.
05:06 Ban delete ka result, right klik ha timeEventnExample ha Variables browser bad jied Delete Result.
05:15 Ban phai biang sha Modeling prespective klik ha Modeling button u button sha ka kamon.
05:21 Mynta, to ngan delete ka equation kaba ar ha else branch.
05:26 Klik ha Save button ha ka toolbar, ban save kane ka model.
05:31 Klik ha Simulate.
05:34 Ka simulation ka lah fail.
05:37 Leit sha ka Message browser bad scroll shajrong ban iohi ka jingbakla jong ka message.
05:42 Ka message ba bakla ka ong ba u number jong ka equations ha man ka branch ka dei ban dei ka juh.
05:49 Namar kata, ka number jong ka equations ha if bad else branches ka dei ban equal ia ka number jong ki variables.
05:58 To ngan thep biang ia ka equation sha la ka jaka bad klik ha Save button.
06:05 Kynmaw ba der(h) = v ka dei ka equation kaba long kajuh ia baroh ka if bad else branches.
06:14 Namar kata, ka if-else block lah ban bujli da artylli ki statements.
06:20 To ngan pyni ia phi kumno ban leh.
06:23 Delete ka if-else block nyngkong.
06:26 Ka equations ban type hangne hap ban pynbiang ha ka file ba kyrteng if-else-statement.txt.
06:34 Kine ki file ruh lah ban ioh na Code Files link.
06:39 Namar ka dei ka text file, nga lah pyndonkam gedit ban plie ia ka.
06:45 To ngan leit sha ka gedit .
06:47 Windows u nong pyndonkam u lah ban plie kane ka file da kaba pyndonkam Notepad lane kano kano ka text editor.
06:54 Copy ki artylli ki equations.
06:57 Leit phai biang sha OMEdit.
07:00 Leh u right-click bad jied Paste
07:04 Klik ha Save button ha ka toolbar sa shisien.
07:08 Klik ha Simulate.
07:11 Khang ia ka pop up window.
07:14 Jied h ha ka Variables browser sa shisien.
07:18 Kynmaw ba u h versus time plot ka dei ka juh kum haka case kaba mynshuwa kaba kdew ba baroh ar ki model ki long kumjuh.
07:27 Ban delete ia ka result, right-klik ha timeEventExample bad jied Delete Result.
07:34 Klik ha Modeling button sha trai jong ka kamon.
07:38 Kata ka dei ka if-else statement kaba kdew ba lada time >=0.5 dv/dt=g lem kumta dv/dt=0.
07:52 Mynta to ngan leit phai biang sha ka slides.
07:55 Sngewbha kynmaw ba ka number jong ka equations ha if branch ka dei ban equal ia ka number jong ka equations ha ka else branch.
08:03 Bad baroh ar ki dei ban ia rygkat bad u number jong u variables haka class lane model.
08:10 Eventka dei ka jingkylla ba abrupt ha ka jinglong jong ka system.
08:15 Events lah ban pyniapher hapdeng ka events jong ka por bad ka jinglong jong ka events.
08:20 Ha ka time event , ka por ha kaba ka event ka long lah tip kham bha.
08:25 timeEventExample ka shimti ia ka por hapoh t=0.5 seconds
08:32 state event ka jia haba ka system jong u variable u tam kato katne ki value.
08:38 To ngin ia pyrshang ban sngewthuh ka events da kaba pyndonkam ki nuksa.
08:43 Ka ball hapoh ka free fall, ka kynduh ka state event haba pyndei ia ka madan.
08:48 Ki jing long harum lah peit bniah haba ka tyngkhuh ia ka madan.
08:52 Velocity jong ka ball ka reverts ha ka direction.
08:55 Magnitude jong ka velocity ka kylla lada ka jing tyngkhuh ka dei ha inelastic.
09:00 Nga lah dep shna ka model ba kyrteng bouncingBall ban simulate kane ka jing long.
09:06 Kane ka file lah ban ioh na ka Spoken Tutorial website.
09:10 Ban peit ia kane ka model bad simulate ia ka, to ngan phai biang sha ka OMEdit.
09:15 Klik ha OpenModel/Lbrary File tool.
09:19 Wad iaka bouncingBall file ha ka system jong phi bad klik ha Open.
09:25 Right-klik ha bouncingBall icon ha Libraries browser bad jied View Class.
09:33 Lada ka model kam plie ha ka Text View, leit sha jrong jong ka modelling area bad klik ha Text View button.
09:41 e ka dei ka coefficient jong ka restitution na kabynta ka inelastic collision jong ka ball bad ka Pyrthei.
09:48 Ka dei ka paramenter bad ka value ka neh katjuh ha 0.8 lyngba ka simulation ka iaid.
09:56 radius ka ieng na kabynta ka radius jong ka ball ha m.
10:00 h, v bad g ka ieng na ka bynta ka juh ka quantities kum ha ka timeEventExample.
10:07 Kine ki artylli ki equations jong ka motions lah dep iakren lypa ha freeFall class.
10:13 when statement la pyndonkam ban ai signal ia ka event.
10:17 La pyndonkam ban kdew ia ka kam ba hap ban shimti haba ka event ka jia.
10:22 h <=radius ka long true lada ka ball ka dei bad ka madan.
10:29 Kane ka statement la executed lad aka event ka jia.
10:34 reinit() function la pyndonkam ban re-initialized u variable.
10:39 Hangne, la re-initializes ka velocity jong ka ball da ka negative product jong u e bad ka velocity jong ka ball shuwa ban ktah ia ka madan.
10:49 Ban simulate kane ka model klik ha Simulation Setup button haka toolbar.
10:55 Hapoh General tab, pynkylla Stop Time fields sha ka 30 units bad klik ha Simulate.
11:04 Khang ia ka pop-up window.
11:06 Jied h ha Variables browser.
11:10 Kynmaw ba u h u hap hapoh u zero, kadei ka bym lah ban pdiang.
11:16 Ngi lah dep ioh ka jing long kaba iasyriem katba ngi dang simulate ia ka freeFall class.
11:21 Kane ka jinglong kaba bakla ka dei naka daw ka jing bakla ki numericals.
11:25 Ka jingiakren jong ka jingbakla ki numerical ka dei shaneng jong ka scope jong kane ka jinghikai.
11:30 Sngewbha peit naka Zeno ka jing long jong ka bouncing ball na ka bynta ka jingsngewthuh kaba kham biang.
11:36 To ngan nym jied u h.
11:39 To ngin ia leit phai biang sha ki slides.
11:42 when statement la pyndonkam ban signal ia ka event.
11:45 reinit(a,b) ka assign u value jong u b sha u variable a bad sa resume ka simulation.
11:54 per(a) ka return ia u value jong u variable a shuwa ka event.
11:59 Kum ka nuksa, reinit(a,10) ka assign ia u value jong u 10 sha u a haba ka event ka jia.
12:08 Ka jinglong bakla jong ka bouncingBall model la pynbeit ha bouncingBallWithHysteresis.
12:15 bouncingBallWithHysteresis model lah ban ioh na spoken tutorial website.
12:21 Simulate bouncingBallWithHysteresis bad pynmih u h pyrshah ia ka time plot.
12:27 Kynmaw ba ka jingiapher hapdeng bouncingBall bad bouncingBallWithHysteresis
12:33 Kane ka wanrah ia ngi sha kaba kut jong kane ka jinghikai.
12:36 Peit ia ka video ba lah ban ioh na ka link harum. http://spoken-tutorial.org/ http://spoken-tutorial.org] /What\_is\_a\_Spoken\_Tutorial
12:40 Ka batai kyllum ia ka Spoken Tutorial project
12:42 Ngi pynlong ki workshop da kaba pyndonkam ka spoken tutorials ka ai certificate sngewbha thoh sha ngi.
12:48 Lada phi don kano kano ka jingkylli kaba iadei bad kane ka spoken tutorial, sngewbha wan sha kane ka website harum.
12:55 Hapoh Textbook Companion Project ngi coordinate coding jong ki nuksa ba lah solve jong ki kot kiba pawnam.
13:03 Ngi ai honorarium bad certificates ia kito kiba leh iakane. Na bynta ka jingtip ba kham bniah sngewbha wan jngoh sha ka website harum.
13:10 Hapoh Lab Migration Project ngi iarap ban migrate ka commercial simulator labs sha ka OpenModelica.
13:17 Na bynta ka jingtip ba kham bun sngewbha wan jngoh sha ka website.
13:21 Spoken Tutorial Project la kyrshan da ka NMEICT, MHRD, Sorkar India.
13:28 Ngi ai khublei ia ka kynhun ki nongshana jong ka OpenModelica ka jign kyrshan ka jong ki.
13:33 Ma nga I John Nongkynrih khublei ba iasnoh lang ha kane ka jing hikai. Leit suk.

Contributors and Content Editors

John123, Mousumi