Skip to content

Turn set_capacity() and set_queue_size() into activities #77

Closed
@Enchufa2

Description

@Enchufa2

This is not very useful:

env <- simmer() %>%
  add_resource("resource_name", 1) %>%
  set_capacity("resource_name", 2)

because it's stupid. These methods are interesting inside a trajectory. And although we may do the following:

env <- simmer()

t <- create_trajectory() %>%
  timeout(function() set_capacity(env, "resource_name", 2))

and it works, turning set_capacity() (as well as set_queue_size()) into activities is far more intuitive to the user, so that the first (absurd) use is not possible anymore and the second one becomes the following:

t <- create_trajectory() %>%
  set_capacity("resource_name", 2)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions