I have written a fairly complicated code for my ABM (634 agents having interactions, each having different variables some of which are lists with multiple values that are updated each tick). As I need to save the updated values for all agents, I have defined a global variable using table:make. This table has 634 keys (each key for one agent), and each key has a list of those values (from that agents-own list variable) for the correspondent agent. But when I use the name of this table to be reported as one of my outputs in Behavior Space, the result in csv file is a table with no keys and it has only a number in it: {{table: 1296}}. So, I was wondering how I could change this variable to be able to have all values.
How to save a global variable with table format from NetLogo Behaviorspace
579 views Asked by user3918211 At
1
There are 1 answers
Related Questions in GLOBAL-VARIABLES
- Automatically importing a util module into every file in NodeJS
- How can I use a variable that is defined in one script in a different script in Unity
- Global variable isn't being recognized across functions in python with tkinter
- Why is my function overwriting global variable values that are passed to it?
- Global or accesing global variable datetime string dynamically in web form application using Visual Studio 2022
- What functions can access a global variable that appears in the same file with them?
- I'm having trouble trying to export the data from an object in Flutter using get_it
- Global variable value doesn't change in ISR in C
- Get configuration or global variables into modules definition in NestJS
- How I can reassign value inside of onMount() in sveltekit?
- Best way to use re.sub with a different behavior when first called
- global variables not being updated/ imported properly across modules
- Why does the function always return 0? (function + tkinter + global variables)
- How to set parent variable within a loop in a shell script?
- What could cause linking errors with global variables in header and cpp file?
Related Questions in NETLOGO
- All turtles are mating in NetLogo even after setting a condition
- How can I tell my agents not to move outside of gis:load-dataset
- Problem with 2-condition random number assign and using length and distance in a procedure
- New To NetLogo, don't really know what I'm doing
- Is it possible to use "min-one-of" and "in-cone"/"in-radius" in the same let procedure?
- How to move a turtle to the nearest colored patch which isn't occupied?
- Procedure with "foreach" command crashes model occasionally. Does "ask turtles with [x]" affect each turtle individually?
- How do i connect a 5 patches to 5 other patches without having double connections?
- How to assign a polygon value to existent turtles inside it with NetLogo GIS extension?
- Don't Understand Brackets
- Strange decimal addition errors
- BehaviorSpace having trouble to deal with subexperiments?
- How can I plot several distributions in the same window?
- How to handle large GIS shapefiles?
- how to define the value of a variable in an interface slider instead of agent initialization?
Related Questions in BEHAVIORSPACE
- BehaviorSpace having trouble to deal with subexperiments?
- Netlogo BehaviorSpace reporters
- Netlogo BehaviorSpace - exporting histogram at specific tick
- Netlogo Behaviorspace issue--Access Denied or Failure to Write to Disk
- Why netlogo alway shows runtime error when I use behaviorspace?
- Netlogo is working but behaviorspace is showing garbage
- why are my results from behaviorspace (netlogo) so inconsistent?
- NetLogo 6.2.2 BehaviorSpace not letting us select file to save results or run
- How to report agent variables in a consistent order in Netlogo's Behaviourspace
- How to measure a set of attributes of individual agents in Behaviour Space?
- Netlogo: keep data across runs in behavior space to save loading time
- Netlogo BehaviorSpace mean value after every repetition
- NetLogo: Exporting table results into CSV
- Netlogo BehaviorSpace sweep issue
- NetLogo set random-seed according to the number of repetitions in the Behavior Space
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
If you're happy to do some post-processing with R or something after the fact, then
table:to-listmight be all you need. For example, with a simple setup example like:And a
to-reportto clean each table item such that the first item is the key and all other items are the items in the list:You can set up your BehaviorSpace experiment such that one of your reporters is that reporter, something like:
To get a .csv file like:
Where the reporter column outputs a list of lists that you can process how you like.
However, I probably wouldn't use the basic BehaviorSpace output for this, but instead have a call in the experiment to call a manual table output procedure. For example, using the
csvextension to make thisoutput-tableprocedure:This outputs a much more analysis-ready table if you're less comfortable cleaning the output of a list-of-lists that as far as I know is what you would get from the BehaviorSpace output. So, you can either call it at the end of your experiment, like:
To get a table like:
Which is a little nicer to deal with. You can obviously modify this to report more often if needed, for example:
which would output a table at each tick of the experiment (you can also do this in your code to make it a little easier).