Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Queue size lowering not redirecting the patients to other available idle rooms #2445

Open
divajsz opened this issue Oct 29, 2023 · 3 comments
Labels
bug issue type

Comments

@divajsz
Copy link

divajsz commented Oct 29, 2023

Describe the issue

I was testing 0.67 with the last but one map and I had 3 operation room built, all of them had 2-2-2 doctors in it. I set the queue size to 3 instead of 6 to distribute the patients among the 3 room. Emergency patients came, the queue filled up with 6 people. I tried to lower te max size but the patients were not moving to other room

Other interesting thing, when I had like 4 general practitioner rooms and I built a 5th one the patients came there where the new GP office estabilished and waited for the doctor to arrive.

Steps to Reproduce

I attached 4 savegame in chronological order for trial

Saves.zip

Expected Behaviour

I expect if I have idle rooms from the same type the and I lower the queue size e.g. 6 to 3 then the rest of the patients should go to an other idle room for treatment

Save Game

Save game attached to report: Yes

CorsixTH Version

0.67

Operating System

windows 10

Theme Hospital Version

Origin

Gamelog.txt

Compiled with api_version: 2682, arch: x64, audio: true, os: windows
SDL renderer: direct3d
Lua 5.4 run with api version: 2682, game version: v0.66, savegame version: 170
Created game with savegame version 170.
Savegame version is 170 (v0.66), originally it was 170 (v0.66).

Kind of wierd... I just installed the 0.67 version on top

Additional Information

No response

@divajsz divajsz added the bug issue type label Oct 29, 2023
@lewri
Copy link
Member

lewri commented Nov 4, 2023

Funnily enough, I was convinced this was also broken in the original game too. Likely not enough weight going into patient redirection. Thanks for the report

@Alberth289346
Copy link
Contributor

OP didn't mention original behavior :)

@lewri
Copy link
Member

lewri commented Nov 7, 2023

--! Score function to decide how desirable a room is for a patient.
--!return (int) The score, lower is better.
function Room:getUsageScore()
local queue = self.door.queue
local score = queue:patientSize() + self:getPatientCount() - self.maximum_patients
score = score * tile_factor
if self:testStaffCriteria(self:getRequiredStaffCriteria()) then
score = score - readiness_bonus
end
-- Add constant penalty if queue is full
if queue:isFull() then
score = score + 1000
end
return score
end

Queue max size control is not very impactful maybe, could explain why.

What would be better is to start increasing the penalty proportionally to how much over size a queue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue type
Projects
None yet
Development

No branches or pull requests

3 participants