GithubHelp home page GithubHelp logo

Comments (6)

quesnel avatar quesnel commented on September 2, 2024 1

Hi,
In commit 81cb9da, I tried to fix the problem. Can you test the test branch ?

from irritator.

ynedelec3 avatar ynedelec3 commented on September 2, 2024

Something strange happens :
with this irt file if plot output is selected, a run ends with incomplete file (last chars are ",-0.").
If plot option is then selected for the same output the end of file is immediately added (during selection, not necessary to launch a run). End of file seems to be waiting for some lost or pending commit.

from irritator.

ynedelec3 avatar ynedelec3 commented on September 2, 2024

During a simulation run all values are written in file object by instruction

fmt::print(output->ofs, "{},{}\n", t, value);

in function observation_file_output_observe (simulation-ediitor.cpp)

but the disk file is only partially updated meanwhile.

observation_file_output_free (file or plot_output.free) seems to be called only during output selection, which may delay the file completion...

from irritator.

ynedelec3 avatar ynedelec3 commented on September 2, 2024

Final update of file occurs just when clicking on plot button but before reaching the

plot_output& tf = plot_outs.alloc(names[i].c_str());

instruction in (node-ditor.cpp) :

            ImGui::RadioButton("none", &choose, 0);
            ImGui::SameLine();
            ImGui::RadioButton("plot", &choose, 1);
            ImGui::SameLine();
            ImGui::RadioButton("file", &choose, 2);

            if (choose == 1) {
                if (file) {
                    file_outs.free(*file);
                    sim.observers.free(mdl->obs_id);
                }

                if (!plot) {
                    plot_output& tf = plot_outs.alloc(names[i].c_str());
                    plot = &tf; ...

In simulation-editor.cpp, I guess there should be some sim.end() at the end of run_simulation which would close and update pending files.

from irritator.

ynedelec3 avatar ynedelec3 commented on September 2, 2024

It works fine -)
Output files end with the exact simulation end time value.
Great thanks

from irritator.

quesnel avatar quesnel commented on September 2, 2024

Cool! Thanks for the report. I will merge the branches soon.

from irritator.

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.