Skip to content

policy shortest-queue-available not selecting shortest queue #196

Description

@thigger

The policy "shortest-queue" seems to include server count
as well as queue size when deciding what's shorter.

eg
ward A - 20 patients being served (capacity 20), queue of 4
ward B - 30 patients being served (capacity 30), queue of 1

The policy chooses ward A despite the queue in ward B being shorter.

Enclosed a test scenario.

From simmer/inst/include/simmer/activity/resource_internal.h :

if (!selected || res->get_server_count() + res->get_queue_count() <
selected->get_server_count() + selected->get_queue_count())
selected = res;

policy queue test - Copy.R.txt

Activity

  1. Enchufa2 commented on Jul 13, 2019

    @Enchufa2
    Member

    Thanks, you're right, this function should check whether there's availability in the server, but if not, it shouldn't include the server count in the decision.

    As a workaround until the next release, you can provide your own R function implementing this policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions