repast.github.io | Repast github pages repository | Static Site Generator library
kandi X-RAY | repast.github.io Summary
kandi X-RAY | repast.github.io Summary
Repast github pages repository. This is the repast website github repository. The website is automatically updated from the repository after a short delay. We use the jekyll (template engine for layout. Github pages will run jekyll on the repository's contents after a repository update. You can run jekyll locally to view and debug any layout / template related updates, but you can also view the html as is in a browser, although it won't include any styling or formatting. That should, however, be enough to view and debug simple edits.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of repast.github.io
repast.github.io Key Features
repast.github.io Examples and Code Snippets
Community Discussions
Trending Discussions on repast.github.io
QUESTION
all.
Regardless of what my model does, I want to stop the simulation after running for a specific time (real clock time). For example, stop after 5 or 10 or 15 minutes. I tried stopping it after 5 minutes using the RunEnvironment.getInstance()endAt(double tick)
as follows:
ANSWER
Answered 2021-Apr-14 at 13:32Here's a quote from a recent paper re. the tick concept that might help.
Events in Repast simulations are driven by a discrete-event scheduler. These events themselves are scheduled to occur at a particular tick. Ticks do not necessarily represent clock-time but rather the priority of its associated event. Ticks determine the order in which events occur with respect to each other. For example, if event A is scheduled at tick 3 and event B at tick 6, event A will occur before event B. Assuming nothing is scheduled at the intervening ticks, A will be immediately followed by B. There is no inherent notion of B occurring after a duration of 3 ticks. Of course, ticks can and are often given some temporal significance through the model implementation. A traffic simulation, for example, may move the traffic forward the equivalent of 30 seconds for each tick.
If you want to schedule a stop after some amount of walltime (e.g., 5 minutes) has elapsed, you could schedule an action that gets the time at its first invocation and then subsequently checks if the correct amount of time has elapsed. At that point, you could call RunEnvironment.getInstance().endRun()
. How to do the time arithmetic is a Java question, so if you google for "Java time elapsed" or something like that you should get an answer.
As far as scheduling the action, you need to create a class that implements IAction (https://repast.github.io/docs/api/repast_simphony/repast/simphony/engine/schedule/IAction.html) and schedule that at whatever interval seems appropriate.
QUESTION
I am trying to get the Repast Simphony to work with the instructions from here https://repast.github.io/download.html#update-site-install which clearly states that it would work only with Groovy Compiler version 2.4.x
However, in October 2020, support for the Groovy compiler has been officially dropped: https://github.com/groovy/groovy-eclipse/commit/454c669ab9649be2a87f449f7b9ea2eb29f7999e
Is there a way to get Repast Simphony to work with Eclipse anymore?
...ANSWER
Answered 2021-Feb-11 at 22:05Thanks for finding this. You should be fine if you point to the update site from the previous version (v.3.9.0) of the Groovy Eclipse plugin: https://dist.springsource.org/release/GRECLIPSE/3.9.0/e4.16 We'll adjust the Repast Simphony Eclipse Update Site install instructions to reflect this.
(Adjusted the instructions here: https://repast.github.io/download.html#update-site-install)
QUESTION
I am using Repast Simphony framework for simulation. Let's say that I have following class:
...ANSWER
Answered 2020-Oct-19 at 20:37I think you might be able to do this by defining a custom aggregate datasource. You can add one via the Custom Data Sources tab, providing a class that implements AggregateDataSource.
https://repast.github.io/docs/api/repast_simphony/repast/simphony/data2/AggregateDataSource.html
In the get() method, you iterate through all the Generator objects and get the mean by name. You'd need an AggregateDataSource implementation for each generator. If you use some static variables, you can probably code it such that you only need to iterate through once and get the mean for all the generators for that tick. I'd leave that until you have it working though.
Update:
You should make a different class for the CustomDataSource to avoid confusion. The iterable in the get should allow you to iterate over all the instances of Generator. Also, when you need to supply the fully qualified name -- the package + the class name -- e.g. x.y.MyCustomDataSource
QUESTION
My understanding is that repastpy is an environment that can be created from repast in which Python-like code is used to create agents, behaviors, etc. I would like to use repastpy because my Java knowledge is limited, but have been unable to figure out how to set up/start repastpy. How is repastpy set up and started?
I have repast-simphony 2.7 downloaded on my Mac as per https://repast.github.io/download.html, and I am able to get the Java version running from Eclipse - that is, for the repast window to open and start the Java-based examples (e.g., GeoZombies). In reviewing the repast simphony 2.7.0 folder in my Applications, I see several reference documents for getting started with batch or Java but not for Python.
I consulted the repastpy pages at http://repast.sourceforge.net/repast_3/repastpy/; they discuss how to use repastpy once started but not how to get repastpy set up and/or started in the first place (or, I have missed any such instructions).
I have also not seen a file name including "repastpy" anywhere through a search of my Mac after downloading and installing repast simphony.
I would appreciate any clarification anyone might be able to offer about how to get repastpy running.
...ANSWER
Answered 2019-Dec-04 at 17:05I was able to get this all working by downloading the Repast_3.1_Suite_Installer.exe from https://sourceforge.net/projects/repast/files/Repast/Repast%203.1/ and then executing the installation. The default installation directory was c:/Program Files/Repast 3/. Inside this folder you can find the Repast Py folder which contains the RepastPy.exe launcher.
Best of Luck.
QUESTION
Each agent has a private boolean variable "Happy?". how to count the agents with [Happy? = True]?
Is there a direct method available in repast? Or I have iterate through all agents and count them individually?
Update:
I have tried the global scheduling method: https://repast.github.io/docs/RepastReference/RepastReference.html#schedule-global
It's not working when I put below code using the @ScheduledMethods in the ContextBuilder.
...ANSWER
Answered 2019-Aug-21 at 14:32You can use a Query for this -- see the query answer to this question:
Repast: how to get a particular agent set based on the specific conditions?
You could also use the query method in a Context where you pass it a predicate where the predicate returns true if happy.
In both of these cases, you'll need an accessor method for the private boolean happy field -- e.g.
QUESTION
I coded a Repast program in ReLogo. Basically, I copy pasted the code by following instructions up to Page 19 of this document.
I am on Ubuntu 18.04 and I installed Repast Symphony as instructed. My java version is basically oracle JDK-8:-
...ANSWER
Answered 2018-Sep-14 at 02:42I have two suggestions for you to try.
- Copying and pasting from the PDF document can have inadvertent effects, so please try typing the code in directly. You can also try to run the Zombies_Demo example model, found here. You can follow the instructions to import the example model in the "Linux users and Unix-related system users" section here. If you still see an issue...
- Try changing the Groovy version to 2.4.
Let us know if either of these suggestions help.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install repast.github.io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page