modelica - OpenModelica updating CombiTable input in real time -


i have model in using combitable1d retrieve external input .txt file. file generated python script @ moment in final phase of project, going updated each second. now, simulation takes place without problem .txt file static. read file , make simulation according data written there.

what want simulate model until time, let's 100s, , make wait until real time event .txt file updated next external input values between 100-200. simulation should continue getting these new values next 100 seconds.

as have been working ompython, practical me edit .txt file using python, let's each 10 seconds in real time. can simulate model until time instance define refreshing point of external input. couldn't figure out how keep state of simulation , make read file once again.

actually, sounds co-simulation scenario me. anyway, extend combitable1d , have like

block combitable1dwithupdate   extends modelica.blocks.tables.combitable1d(final tableonfile=true);   algorithm     when sample(0, 10)       readtabledata(tableid, /* force update */ true, verboseread);     end when; end combitable1dwithupdate; 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -