Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulations end with warning messages #10

Open
polizzan opened this issue Jun 6, 2023 · 2 comments
Open

Simulations end with warning messages #10

polizzan opened this issue Jun 6, 2023 · 2 comments

Comments

@polizzan
Copy link

polizzan commented Jun 6, 2023

Dear rscocsim team,

I found that the simulations succesfully carried out with the rsocsim::socsim() command return two warning messages:

XX: In readLines(con, n = 1) :
  incomplete final line found on 'sim_results_supervisory.sup_SEED_/logfile.log'
XX: In startSocsimWithFile(supfile, seed, compatibility_mode,  ... :
  can't open transition history file. Hope that's OK

The help file does not currently specify the meaning of these warning messages and what their effect on the simulation output might be.

Many thanks and best wishes,
Antonino

@polizzan polizzan changed the title Simulations terminate with warning messages Simulations end with warning messages Jun 6, 2023
@tomthe
Copy link
Member

tomthe commented Jun 7, 2023

Hi Anonino,

Thank you for telling us about this issue with warning messages. I see them so often that I became blind to them :)

The first message ("incomplete final line ...log") is a bug on my part. It does not indicate an error in the simulation, it is just an error that can occur while reading the log file (which rsocsim does to show the output to the user in the r-console). I have to handle that error in the package so that users are not bothered with unhelpful error messages.

The second warning ("can't open transition history file.") is a warning from socsim itself. The transition history file is not necessary for most use cases - Only if you restart a simulation where you want to keep track of moves between groups, it is necessary.

Socsim oversimplified says:

If the simulation includes group transitions, than socsim will write a file with the same path as the
population and marriage files but with the suffix .otx. The transition events do not have unique ids as
do marriages, but each transition record contains the person id of the protagonist. Consequently it is
much more natural to link from the transition history to the population file.

If group transitions are part of the simulation then socsim will write (and may read) a transition history
file. In spirit, the otx file is much like the marriage file, the main differences are that the file is linked to
only one person and there is no unique identifier for a transition history record.

Maybe we should change the wording to make it more obvious that this is most likely no problem?

@polizzan
Copy link
Author

polizzan commented Jun 9, 2023

Hi Tom,

Thanks so much for your very helpful reply!

Regarding the second warning message, would it be accurate to instead have rsocsim indicate that "no prior transitions are assumed"? If this could be in the form of regular output in the r-console, rather than a warning message, this might be less concerning for the user?

This is just a suggestion. I am very happy to hear that the warning messages don't indicate any errors with the simulation.

Many thanks and best wishes,
Antonino

ohexel pushed a commit to ohexel/rsocsim that referenced this issue Nov 25, 2024
).

Made message regarding missing files more explicit. Added wording to
hint in which situations it might be a problem.
tomthe added a commit that referenced this issue Dec 4, 2024
Make warnings re missing input/output files less cryptic (issue #10).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants