Another quick update on the engineers:
You can rule out the method EffectiveThroughput for class EntityMetalFlowEntry. I just added debugging for the output from that:
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #SelfConstruction, with max flow rate of 49.9267578125
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #ClaimingNeutrals, with max flow rate of 49.9267578125
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #RepairingHullsOfFriendlies, with max flow rate of 99.853515625
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #RepairingShieldsOfFriendlies, with max flow rate of 99.853515625
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #RepairingEnginesOfFriendlies, with max flow rate of 99.853515625
2/20/2019 2:04:37 PM Calculating metal flow for unit, Engineer, flow #AssistConstruction, with max flow rate of 74.89013671875
My thoughts is that when you assign the flows for hull and shield in this bit of code:
plannedFlow.Recipients.Add( DelegateHelper_MetalFlowPlanning_bestTarget );
plannedFlow.RequestedFlow += repairCost;
DelegateHelper_MetalFlowPlanning_bestTarget.FramePlan_ExpectedRepairs += repairExpected;
DelegateHelper_MetalFlowPlanning_bestTarget.FramePlan_ExpectAssistanceFromThese.Add( plannedFlow );
I think that plannedFlow.RequestedFlow += repairCost and DelegateHelper_MetalFlowPlanning_bestTarget.FramePlan_ExpectAssistanceFromThese.Add( plannedFlow ) are both subtracting metal from your total, and so the cost is doubled.