TBot icon indicating copy to clipboard operation
TBot copied to clipboard

Expedition : wrong calculation of fleet

Open Kachime opened this issue 2 years ago • 0 comments

Research :

  • Computer : 4
  • Astrophysics : 1

Available fleet :

  • Small Cargo : 31
  • Some light fighters and probes

Settings :

: "Expeditions": { "Active": true, "PrimaryShip": "SmallCargo", "MinPrimaryToSend": 10, "PrimaryToKeep": 10, "SecondaryShip": "Null", "MinSecondaryToSend": 0, "SecondaryToPrimaryRatio": 2, "ManualShips": { "Active": false, "Ships": { "LargeCargo": 1300, "LightFighter": 26000, "Reaper": 1, "Pathfinder": 1, "EspionageProbe": 1 } }, "WaitForAllExpeditions": true, "WaitForMajorityOfExpeditions": false, "SplitExpeditionsBetweenSystems": { "Active": true, "Range": 1 }, "RandomizeOrder": true, "FuelToCarry": 200, "Origin": [ { "Galaxy": G, "System": S, "Position": P, "Type": "Planet" } ] },

TBot output

: [07:26:57|Debug|Expeditions] Expedition slot free: 4 [07:26:58|Warning|Expeditions] Available SmallCargo in origin xxx [P:xxx]: 21 [07:26:58|Info|Expeditions] 4 expeditions with LightFighter: 1; SmallCargo: 10; EspionageProbe: 1; will be sent from xxx [P:xxx] [07:26:58|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: LightFighter: 1; SmallCargo: 10; EspionageProbe: 1; [07:26:58|Debug|FleetScheduler] Calculated flight time (one-way): 00:10:14 [07:26:58|Debug|FleetScheduler] Calculated flight time (full trip): 01:20:28 [07:26:58|Debug|FleetScheduler] Calculated flight fuel: 14 [07:27:00|Info|FleetScheduler] Fleet succesfully sent [07:27:01|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: LightFighter: 1; SmallCargo: 10; EspionageProbe: 1; [07:27:01|Debug|FleetScheduler] Calculated flight time (one-way): 00:16:57 [07:27:01|Debug|FleetScheduler] Calculated flight time (full trip): 01:33:54 [07:27:01|Debug|FleetScheduler] Calculated flight fuel: 36 [07:27:02|Info|FleetScheduler] Fleet succesfully sent [07:27:03|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: LightFighter: 1; SmallCargo: 10; EspionageProbe: 1; [07:27:03|Debug|FleetScheduler] Calculated flight time (one-way): 00:16:41 [07:27:03|Debug|FleetScheduler] Calculated flight time (full trip): 01:33:22 [07:27:03|Debug|FleetScheduler] Calculated flight fuel: 35 [07:27:05|Info|FleetScheduler] Fleet succesfully sent [07:27:06|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: LightFighter: 1; SmallCargo: 10; EspionageProbe: 1; [07:27:06|Debug|FleetScheduler] Calculated flight time (one-way): 00:16:41 [07:27:06|Debug|FleetScheduler] Calculated flight time (full trip): 01:33:22 [07:27:06|Debug|FleetScheduler] Calculated flight fuel: 35 [07:27:08|Info|FleetScheduler] Fleet succesfully sent [07:27:09|Info|Expeditions] Next check at 4/10/2022 09:03:14

Result :

TBot has sent 4 expedition, 3 with 10 Smal Cargos, 1 with only 1 Smal Cargo No primary kept on the planet

It correctly calculate that i have only 21 Small Cargos to be sent (31 - 10 to be kept), but calculate all fleet without taking the previous one into consideration

It should have only sent 2 expeditions with 10 SC

It also generate error message :

: [06:02:40|Debug|Expeditions] Expedition slot free: 3 [06:02:40|Warning|Expeditions] Available SmallCargo in origin xxx [P:xxx]: 8 [06:02:40|Info|Expeditions] 3 expeditions with SmallCargo: 10; will be sent from xxx [P:xxx] [06:02:41|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: SmallCargo: 10; [06:02:41|Debug|FleetScheduler] Calculated flight time (one-way): 00:10:14 [06:02:41|Debug|FleetScheduler] Calculated flight time (full trip): 01:20:28 [06:02:41|Debug|FleetScheduler] Calculated flight fuel: 13 [06:02:42|Info|FleetScheduler] Fleet succesfully sent [06:02:43|Info|FleetScheduler] Sending fleet from [P:xxx] to [DS:xxx]. Mission: Expedition. Speed: 100% Ships: SmallCargo: 10; [06:02:43|Debug|FleetScheduler] Calculated flight time (one-way): 00:10:14 [06:02:43|Debug|FleetScheduler] Calculated flight time (full trip): 01:20:28 [06:02:43|Debug|FleetScheduler] Calculated flight fuel: 13 [06:02:44|Error|FleetScheduler] Unable to send fleet: an exception has occurred: An error has occurred: Status: error - Message: no ships to send [06:02:44|Warning|FleetScheduler] Stacktrace: at Tbot.Services.OgamedService.SendFleet(Celestial origin, Ships ships, Coordinate destination, Missions mission, Decimal speed, Resources payload) at Tbot.Program.SendFleet(Celestial origin, Ships ships, Coordinate destination, Missions mission, Decimal speed, Resources payload, CharacterClass playerClass, Boolean force)

Here it has sent a fleet with 10 SC and a second with 8, then failed on the 3rd one

Fleet should be calculated one by one and vessels already sent should be substracted from the total available

Kachime avatar Oct 04 '22 07:10 Kachime