Code Monkey home page Code Monkey logo

Comments (10)

lochel avatar lochel commented on June 15, 2024

Is this really connected to oms2_setLoggingInterval?

from omsimulator.

lochel avatar lochel commented on June 15, 2024

I think there is problem with the engine model as well. The simulation works fine for me when using the following:

print("*** initialization ***")
oms2_initialize("AVSDemo")
oms2_setLoggingInterval("AVSDemo", 0.5)
oms2_setFlags("AVSDemo.eCS_Generic_Export", "+fetchAllVars")
oms2_setFlags("AVSDemo.engine", "+fetchAllVars")

print("*** simulatation -> 1e-4 ***")
oms2_setCommunicationInterval("AVSDemo", 1e-5)
oms2_stepUntil("AVSDemo", 1e-4)

print("*** simulatation -> 1e-1 ***")
oms2_setCommunicationInterval("AVSDemo", 1e-4)
oms2_stepUntil("AVSDemo", 1e-1)

print("*** simulatation -> stopTime ***")
oms2_setCommunicationInterval("AVSDemo", 1e-3)
oms2_simulate("AVSDemo")

It works also without oms2_setLoggingInterval.

from omsimulator.

meek1 avatar meek1 commented on June 15, 2024

Which stopTime to you use? Try the example in 6.3\Demonstrator_20180620\AVSDemo_combi_20180620.lua

Using this example, the simulation is stuck at file size 4841KB if I use setLoggingInterval (even with +fetchAllVars also for the engine model).

If not using setLoggingInterval, the simulation runs. However, the result file still cannot be opened(!).

from omsimulator.

meek1 avatar meek1 commented on June 15, 2024

Tried again with today's build. Now when using setLoggingInterval the result file size is actually increasing slowly from 4841KB, so it seems like it's simulating. However, the result file cannot be opened (tried both Dymola and OMEdit).

Now with today's build, if not using setLoggingInterval, the simulation runs and the result file can be opened.

from omsimulator.

meek1 avatar meek1 commented on June 15, 2024

@lochel, seems now like the result files (.mat) cannot be opened during simulation, only after?

from omsimulator.

lochel avatar lochel commented on June 15, 2024

I noticed the same behaviour, but I don't know why. It should actually be possible to read it at all time.

from omsimulator.

meek1 avatar meek1 commented on June 15, 2024

@lochel, new update regarding result files:

If setLoggingInterval is used:

  • During simulation: Cannot open result file
  • After manually aborting a normal (working) simulation (Crtl+C -> Y in prompt): Result file OK
  • After manually aborting a simulation with error messages (Crtl+C -> Y in prompt): Cannot open result file

If setLoggingInterval is not used:

  • During simulation: Result file OK, i.e. can be opened during simulation

from omsimulator.

meek1 avatar meek1 commented on June 15, 2024

Regarding setLoggingInterval and setFlags: Results are a bit confusing, see figures. oms2_setLoggingInterval("AVS_test_case", 1) used for all cases except the red marked.

warning_mess
warning_mess2

from omsimulator.

stale avatar stale commented on June 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from omsimulator.

lochel avatar lochel commented on June 15, 2024

I tested this again using the reimplemented version of OMSimulator. Everything works now smoothly. The only thing which is not yet available is an option to disable --fetchAllVars again.

However, for test purpose I’ve implemented that option, and apparently it makes the simulation extremely slow and also the simulation results are slightly different. It might be a good idea to use a later version of Dymola to generate the FMUs.

from omsimulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.