Skip to content

Commit

Permalink
more explaination of how fill mass is calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Mar 22, 2024
1 parent 632b002 commit d51b8ed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/package.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ class Package {

/// Returns optimal fill mass for a resource to be packaged. Can be used
/// to determine how to respond to requests for material, and to actually
/// package and send off trades
/// package and send off trades.
/// Packaging strategy "first" simply fills the packages one by one to the
/// maximum fill. Therefore, it should always try to max fill.
/// Packaging strategy "equal" tries to fill all packages to the same mass.
/// This tries to find the optimal number and fill mass of packages given the
/// packaging limitations. It does this by calculating bounding fills,
/// floor(quantity/fill_min) and ceiling(quantity/fill_max).
/// There might be a scenario w
double GetFillMass(Resource::Ptr r, Package::Ptr pkg);

/// Repackages a single resource into a package. If some quantity of the
Expand Down

0 comments on commit d51b8ed

Please sign in to comment.