![]() ![]() Variable values that should be recognized by NetLogo as strings need to be nested inside escaped quotes (e.g.Categorical variable values are currently only allowed for simdesign_simple, simdesign_distinct and simdesign_ff.Values, or min, max, step (values is prioritized)Īdditionally, please note the following restrictions in order to define variables and constants correctly: The implemented simdesigns have different requirements for variable definitions: Simdesign Requires a ‘who’ column for theĪgent_name ( str) – Name of the NetLogo agent type to update (singular, e.g.Correctly defining variables within the experiment class object is crucial for creating simdesigns. Parameters :Īgent_data ( pandas DataFrame) – DataFrame indexed with a row for each agent, and columns forĮach attribute to update. Attribute valuesĬan be numerical or strings. Update attributes of a set of NetLogo agents from a DataFrameĪssumes a set of NetLogo agents of the same type. NetLogoException – If a LogoException or CompilerException is raised by NetLogo write_NetLogo_attriblist ( agent_data, agent_name ) ¶ Max_seconds ( int, optional) – Time limit used to break execution ![]() Netlogo_reporter ( str) – Valid NetLogo reporterĬondition ( str) – Valid boolean NetLogo reporterĬommand ( str) – NetLogo command used to execute the model Return values from a NetLogo reporter while a condition is true NetLogoException – If a LogoException or CompilerException is raised by NetLogo report_while ( netlogo_reporter, condition, command = 'go', max_seconds = 10 ) ¶ Netlogo_reporter ( str) – Valid NetLogo reporter Raises : In the NetLogo Command Center can be called with this method. report ( netlogo_reporter ) ¶Īny reporter (command which returns a value) that can be called Using command, and next retrieve the lists through report. First run the model for the required time steps Use cases, you are better of using a model specific way of interfacing.įor example, have a go routine which accumulates the relevant This is slow and can break when used at scale. This method relies on files to send results from netlogo back to Or CompilerException is raised by NetLogo If reporters are not in a valid format, or if a LogoException Key is the reporter, and the value is a list order by ticks NetLogoException Return values from a NetLogo reporter over a number of ticks. NetLogoException – If a LogoException or CompilerException is raised by NetLogo repeat_report ( netlogo_reporter, reps, go = 'go', include_t0 = True ) ¶ Reps ( int) – Number of repetitions for which to repeat commands Netlogo_command ( str) – Valid NetLogo command NetLogoException – If a LogoException or CompilerException is raised by NetLogo repeat_command ( netlogo_command, reps ) ¶Įxecute the supplied command in NetLogo a given number of times Parameters : Parameters :Īttribute ( str) – Valid NetLogo patch attributeĭata ( Pandas DataFrame) – DataFrame with same dimensions as NetLogo world Values from a pandas DataFrame of same dimensions as the NetLogo world. NetLogoException – If a LogoException or CompilerException is raised by NetLogo patch_set ( attribute, data ) ¶ Parameters :Īttribute ( str) – Valid NetLogo patch attribute Returns :ĭataFrame containing patch attributes Return type : Values of the dataframe correspond to patch attributes. With column labels and row indices following pxcor and pycor patchĬoordinates. Returns a pandas DataFrame with same dimensions as the NetLogo world, NetLogoException – In case of a NetLogo exception Path ( str) – Path to the NetLogo model Raises :įileNotFoundError – in case path does not exist NetLogoException – If a LogoException or CompilerException is raised by NetLogo kill_workspace ( ) ¶Ĭlose NetLogo and shut down the JVM. Netlogo_command ( str) – Valid NetLogo command Raises : Jvmargs ( list of str, optional) – additional arguments that should be used when startingĮxecute the supplied command in NetLogo Parameters : Jvm_path ( str, optional) – path of the jvm Netlogo_home ( str, optional) – Path to the NetLogo installation directory (required on Linux) Thd ( bool, optional) – If true, use NetLogo 3D Gui ( bool, optional) – If true, displays the NetLogo GUI (not supported on Mac) netlogo_home and netlogo_version are required on Linux. The link will try to identify the correct parameters automatically on Mac If netlogo_home, netlogo_version, or jvm_home are not provided, NetLogoLink ( gui = False, thd = False, netlogo_home = None, jvm_path = None, jvmargs = ) ¶Ĭreate a link with NetLogo. NetLogoException ¶īase project exception class re. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |