bugFreeciv - Bugs: bug #20978, Ferry set to ABANDON_BOSS when...

 
 
Show feedback again

bug #20978: Ferry set to ABANDON_BOSS when it's in fact available

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Wed 17 Jul 2013 10:56:58 AM UTC  
 
Category: aiSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.4.1, 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 15 Sep 2013 11:04:18 PM UTC, SVN revision 23420:

Fixes to ferry boss assignment:
- If boss finished with the ferry, left the boat, and reassigned it to new boss,
do not take boat away from the new boss
- If new boss cannot be found when ferry is ready to abandon old one, keep the old one.
This also avoids ferry being left in pseudo-state between having a boss and being free.

See bug #20978

(Browse SVN revision 23420)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 15 Sep 2013 11:04:12 PM UTC, SVN revision 23419:

Fixes to ferry boss assignment:
- If boss finished with the ferry, left the boat, and reassigned it to new boss,
do not take boat away from the new boss
- If new boss cannot be found when ferry is ready to abandon old one, keep the old one.
This also avoids ferry being left in pseudo-state between having a boss and being free.

See bug #20978

(Browse SVN revision 23419)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 15 Sep 2013 11:04:06 PM UTC, SVN revision 23418:

Fixes to ferry boss assignment:
- If boss finished with the ferry, left the boat, and reassigned it to new boss,
do not take boat away from the new boss
- If new boss cannot be found when ferry is ready to abandon old one, keep the old one.
This also avoids ferry being left in pseudo-state between having a boss and being free.

See bug #20978

(Browse SVN revision 23418)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 10 Aug 2013 11:05:31 PM UTC, comment #3:

- If handling of boss causes it to hand over control to some other unit without exhausting the ferry, use correct bossid in next iteration of ferry handling.

(file #18665, file #18666)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 26 Jul 2013 06:06:28 AM UTC, comment #2:

- S2_4 version

(file #18426)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 17 Jul 2013 11:27:23 AM UTC, comment #1:

Patch for TRUNK & S2_5 attached. In addition to not taking control away from old boss if he no longer has it to begin with, restore control to old boss in those cases where new boss cannot be found. This latter change is the more important one. Before it was possible that ABANDON_BOSS status was left to ferry which then was never able to get rid of it (as it was neither completely available nor assigned for specific unit)

(file #18311)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 17 Jul 2013 10:56:58 AM UTC, original submission:

dai_manage_ferryboat() may end up setting ferry passenger status to ABANDON_BOSS when boss has left the ferry ok and it has (correctly) AVAILABLE status.

It first manages the boss, and then does the check if boss is on board on assumption that boss is still to board. If boss is not yet in, and there's other units waiting in, it decides to abandon the boss by setting passanger (presumably from old boss id) to ABANDON_BOSS. This ignores the case where boss has actually already finished with the boat, and freed it, while boss was managed.
At the very least this causes ferry stats to be miscounted. I don't know if this can explain why AI ends building such huge numbers of unused ferries - maybe it ends considering all existing ferries being allocated because of this bug.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Sep 2013 11:04:28 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sat 10 Aug 2013 11:05:31 PM UTCcazfiAttached File-=>Added FerryAbandonAvailable-2.patch, #18665
      Attached File-=>Added FerryAbandonAvailable-S2_4-2.patch, #18666
      StatusIn Progress=>Ready For Test
    Tue 06 Aug 2013 09:16:24 PM UTCcazfiStatusReady For Test=>In Progress
    Fri 26 Jul 2013 06:06:28 AM UTCcazfiAttached File-=>Added FerryAbandonAvailable-S2_4.patch, #18426
      StatusIn Progress=>Ready For Test
      Planned Release=>2.4.1, 2.5.0, 2.6.0
    Wed 17 Jul 2013 11:27:23 AM UTCcazfiAttached File-=>Added FerryAbandonAvailable.patch, #18311
      StatusNone=>In Progress
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup