-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: teach miners how to travel to sell
I had to teach findBestMarketToSell about minimum duration as well as sell volume and units to sell. The previous usage was wrong, since it didn't include unitsToSell and would thus undervalue the extra trip time since it was comparing against an absolute earnings per second, not one per unit. minimumDuration was necessary in order to get the miner to want to travel to sell, since it accounts for the fact that the miner will otherwise sit idle waiting for its reactor cooldown. includeRoundTripCost was needed to model the return trip for miners. This still does not account for fuel costs (which is wrong) and could cause miners to end up traveling to sell at a loss when fuel prices are high.
- Loading branch information
Showing
5 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -643,6 +643,7 @@ void main() { | |
ship, | ||
TradeSymbol.ALUMINUM, | ||
expectedCreditsPerSecond: 1, | ||
unitsToSell: 1, | ||
), | ||
); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters