Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 506445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:42:07+00:00 2026-05-13T06:42:07+00:00

I have a task, which I know how to code (in C#), but I

  • 0

I have a task, which I know how to code (in C#),
but I know a simple implementation will not meet ALL my needs.
So, I am looking for tricks which might meet ALL my needs.

  1. I am writing a simulation involving N number of entities interacting over time.

  2. N will start at around 30 and move in to many thousands.

    a. The number of entities will change during the course of the simulation.
    

    b. I expect this will require each entity to have its own trace file.

  3. Each Entity has a minimum of 20 parameters, up to millions; I want to track over time.

    a. This will most likely required that we can’t keep all values in memory at all times. Some subset should be fine.

    b. The number of parameters per entity will initially be fixed, but I can think of some test which would have the number of parameters slowing changing over time.

  4. Simulation will last for millions of time steps and I need to keep every value for every parameter.

  5. What I will be using these traces for:

    a. Plotting a subset (configurable) of the parameters for a fixed amount of time from the current time step to the past.

    i.  Normally on the order of 300 time steps.
    
    ii. These plots are in real time while the simulation is running.
    

    b. I will be using these traces to re-play the simulation, so I need to quickly access all the parameters at a give time step so I can quickly move to different times in the simulation.

    i.  This requires the values be stored in a file(s) which can be inspected/loaded after restarting the software.
    
    ii. Using a database is NOT an option.
    

    c. I will be using the parameters for follow up analysis which I can’t define up front so a more flexible system is desirable.

My initial thought:

  1. One class per entity which holds all the parameters.

  2. Backed by a memory mapped file.

  3. Only a fixed, but moving, amount of the file is mapped to main memory

  4. A second memory mapped file which holds time indexes to main file for quicker access during re-playing of simulation. This may be very important because each entity file will represent a different time slice of the full simulation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:42:08+00:00Added an answer on May 13, 2026 at 6:42 am

    KISS — just write a logfile for each entity and at each time slice write out every parameter in a specified order (so you don’t double the size of the logfile by adding parameter names). You can have a header in each logfile if you want to specify the parameter names of each column and the identify of the entity.

    If there are many parameter values that will remain fixed or slowly changing during the course of the simulation, you can write these out to another file that encodes only changes to parameter values rather than every value at each time slice.

    You should probably synchronize the logging so that each log entry is written out with the same time value. Rather than coordinate through a central file, just make the first value in each line of the file the time value.

    Forget about database – too slow and too much overhead for simulation replay purposes. For replaying of a simulation, you will simply need sequential access to each time slice, which is most efficiently and fastest implemented by simply reading in the lines of the files one by one.

    For the same reason – speed and space efficiency – forget XML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 347k
  • Answers 347k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Add an output parameter to your procedure: @new_id int output… May 14, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer I've not tried it, but I think you may be… May 14, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer I had a simliar issue with sub level and tertiary… May 14, 2026 at 6:20 am

Related Questions

I know this question has been asked before, but I feel it wasn't asked
I'm developing an Windows Forms application that requires me to call a separate program
About 4 years ago I used a php product called amember pro, it is
My question pertains to multi-threading in Java. I'm translating an app I wrote in
I apologise for the long-winded, rantyness of this but I'm up at 3am dreading

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.