simmer.plot | Plotting Methods for 'simmer | Data Visualization library
kandi X-RAY | simmer.plot Summary
kandi X-RAY | simmer.plot Summary
simmer.plot provides plotting methods for simmer, the Discrete-Event Simulation (DES) package for R.
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 simmer.plot
simmer.plot Key Features
simmer.plot Examples and Code Snippets
install.packages("simmer.plot")
# install.packages("remotes")
remotes::install_github("r-simmer/simmer.plot")
Community Discussions
Trending Discussions on simmer.plot
QUESTION
I have the following dependency chain in a package I'm developing:
- My package uses a class (
trajectory
) defined in package A (simmer
). - It also uses an S3 method for that class (
plot.trajectory
), which is defined in package B (simmer.plot
). - I can import package A as a whole, but I cannot import package B as a whole, because it contains replacements for other functions defined in package A (the
get_mon
functions), so I get unwanted warnings about the original functions being replaced.
How do I use/import the S3 method without importing the rest of package B, preferably via roxygen2
?
The roxygen2
documentation suggests the following:
If you want to add a new method to an S3 generic, import it with @importFrom pkg generic.
For my example, this would be @importFrom simmer.plot plot
, but this returns a warning that plot
is not exported by simmer.plot
. The same thing happens if I import the generic first, using @importFrom graphics plot
.
ANSWER
Answered 2020-Jan-11 at 18:36Use (see this):
QUESTION
Is is possible to plot resource usage by attribute in simmer? So for example in this simulation:
...ANSWER
Answered 2019-Dec-14 at 00:02You could get the service and waiting times per resource from the arrival table with get_mon_arrivals(env, per_resource=TRUE)
. Then, get the name<->gender correspondence from the attributes table with get_mon_attributes(env)
, join the tables and, finally, reconstruct the server usage by gender using the time series. But that's a bit challenging. Doable, but it requires some work.
I would just increment/decrement some auxiliary global variables based on that attribute to keep the count for me.
QUESTION
I have created the following MWE to illustrate the code. Consider a system with 20 queues and servers (such that for each server there is a FCFS queue). When an arrival comes, it takes the shortest. Say you wish to compare 20 simulations, each 400 over units of time from start to finish.
You can see in my code that the queues are added using a for loop (indeed, this becomes necessary when simulating asymptotically large queueing systems).
...ANSWER
Answered 2019-Aug-03 at 11:28The simulation environment, as every environment in R, has reference semantics. Therefore, here
QUESTION
Consider the system and routing algorithm specified below: Image of the system. Let us first define some attributes which will be useful in the simulation:
...ANSWER
Answered 2019-Jun-07 at 21:42The function get_attribute
cannot be called directly. Instead, it must be placed inside a function that is called during the simulation.
QUESTION
I've got on own dataframe on actual events/task and I use the simmer r package to simulate how many task can be done if different resources were available. My simulation runs very fast up to 120.000 rows within my dataframe.
...ANSWER
Answered 2018-Nov-15 at 13:32I took your table and simply replicated it to build 100k and 400k datasets, and I confirm the issue: the execution time is not linear.
Internally, attributes are always double
, so there are lots of conversions, row by row, which apparently take most of the execution time (!). Try converting your table before feeding it into simmer
. Using dplyr
,
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install simmer.plot
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