Science & engineering

Ship atomic loading and ballast-sequence calculator with linearized state limits

The selected order minimizes the peak absolute value of one entered linearized state coordinate while respecting every intermediate box bound..

Your numbers

Numeric JSON array. Follow the displayed column labels and units; example data are synthetic.
Rows [oneincrementperstatecoordinate...,signedmasstonnes,positive ratetonnes/h].
Numeric JSON array. Follow the displayed column labels and units; example data are synthetic.
Numeric JSON array. Follow the displayed column labels and units; example data are synthetic.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A final cargo and ballast distribution may satisfy the entered constraints while an intermediate state does not. Sequence optimization therefore asks how to order specified changes while checking every modeled intermediate state. It is distinct from calculating one final KG or trim and assuming that any path to that endpoint is equally suitable.

THE FORMULAExact subset DP minimizes peak absolute selected state subject to all intermediate box bounds and precedence.

A worked example

The prefilled example gives Minimum peak selected-state magnitude = 100. This demonstration uses supplied example data, not an approved vessel operating condition.

Good to know

Exact subsetDP over supplied atomic LINEARIZED state increments (e.g.draft,trim,GM,strength,tankstates), with bounds at every completed step; straight withinstep interpolation stays in boxbounds. Eachrow[stateincrements...,signedmass,rate tonnes/h]. Minimizes peak absolute selectedstate, not time; no automatic nonlinear hydrostatics or simultaneouspump/cargo scheduling.

Intermediate conditions can matter more than the final one

A final cargo and ballast distribution may satisfy the entered constraints while an intermediate state does not. Sequence optimization therefore asks how to order specified changes while checking every modeled intermediate state. It is distinct from calculating one final KG or trim and assuming that any path to that endpoint is equally suitable.

This calculator uses atomic supplied steps and a bounded state search. Each completed-step subset determines a cumulative state from the initial condition. The selected objective is the smallest achievable peak absolute value of the chosen state coordinate within that finite model, rather than a claim that a static final balance automatically supplies an executable shipboard loading procedure.

Optimizing the worst intermediate trim is a genuine finite ordering problemSame final trim; different intermediate peaks0−100+100−1000Gray: +100,−100,+200,−200 gives peak200Blue: −100,+200,−200,+100 gives peak100Finite optimum: any200-unit step needs peak at least100
Scroll across to see the full diagram.
Atomictrimchanges[+100,−100,+200,−200]sumzero. Pairwiseorderreachespeak200;order[−100,+200,−200,+100]haspeak100andisoptimalbecauseanystepofmagnitude200requiresendpointmagnitudesatleast100. Unitsareillustrative;thisdoesnotinstructanactualcargo/ballastsequence.

For a related navigation or vessel calculation, use the Bulk-cargo integer hold allocation calculator with supplied vessel constraints. Compare the model and input conventions before combining results.

Defining atomic cargo and ballast steps

Each step supplies a vector of linearized state increments together with its signed transfer mass and positive transfer rate. The state coordinates can represent draft, trim, GM, strength or inventory quantities, but their increments must come from a consistent external vessel model. A ballast change also needs the applicable inventory and rate interpretation when those quantities are included. Keep load, discharge and internal transfer signs explicit, and do not represent one physical movement twice through overlapping cargo and ballast records.

An atomic step is treated as completed before the next state is checked. That is a declared simplification: a real operation moves continuously through partial states. Where the underlying model is nonlinear or free-surface geometry changes during a step, checking only its endpoints cannot establish that every intermediate partial state satisfies the same restrictions.

Subset states and the optimization objective

For a completed-step subset, cumulative additive state increments are independent of the order used to reach it in the additive model. Dynamic programming can therefore retain the best feasible peak-trim cost for that subset and extend it by an eligible next step. Any declared precedence restrictions must be respected during those transitions.

The updated cost is the larger of the previous path's peak selected-coordinate magnitude and the new state's corresponding absolute value. Minimizing that quantity across the complete finite state graph genuinely optimizes sequence quality under the chosen model. It does not optimize every operational goal or account for omitted effects such as simultaneous work, pump startup or terminal interruptions.

A small exact ordering example

Take an initial trim coordinate zero and four atomic trim increments +100, −100, +200 and −200 in consistent illustrative units. A naive order that completes the first cancelling pair before the second reaches a peak absolute coordinate of 200. Yet the final sum is zero regardless of the order, so final-state checking alone cannot distinguish them.

The order −100, +200, −200, +100 gives successive coordinates −100, +100, −100 and zero. Its peak is only 100. No path can have peak below 100 because any step of magnitude 200 must connect two states whose absolute values cannot both be smaller than 100. This proves the finite example's optimum without relying on the search implementation.

Duration and rate assumptions

If each atomic sequential step has a fixed duration, the sum of those durations is the same for every ordering. Reporting that sum as an optimized makespan would therefore be misleading. Rates can support a transparent duration estimate, but a meaningful time-minimization problem needs additional order-dependent or parallel-resource features actually represented in the model.

The selected peak-trim objective avoids that vacuous claim. Where durations are displayed, retain their supplied cargo or pump rates and the assumption of sequential completion. Real pump performance can change with head and tank condition, while cargo handling can involve changing terminal rates; neither effect is automatically inferred from a constant entered rate.

Constraint checks and search status

Each new state should be checked against the specific supplied bounds used by the implementation, such as its modeled draft, trim, stability, strength or inventory conditions. A generic field label must not suggest that an omitted physical constraint has been assessed. Preserve which state and limit caused a transition to be rejected so the result remains understandable.

An exhausted finite search finding no complete path is different from stopping because a state or resource limit was reached. Do not convert the latter into an infeasibility claim. Likewise, the best path in a simplified additive model remains conditional on that model, even when the dynamic-programming search itself is mathematically complete and exact.

Practical interpretation

The vessel's authorized loading information supplies relevant hydrostatic data, limits and inventory conventions. The optimizer only organizes the declared steps and checks their stated model consequences. Its sequence is a mathematical result for review, not a substitute for the vessel's loading system, terminal coordination or approved ballast and cargo procedures.

Use the calculator to understand intermediate-state effects or compare documented finite scenarios. Real operations require qualified review of partial states, equipment, stability, strength and procedures. The output does not authorize valve movements, prescribe cargo operations or establish that a sequence is operationally executable merely because its sampled states meet the entered numerical bounds. Exact subsetDP over supplied atomic LINEARIZED state increments (e.g.draft,trim,GM,strength,tankstates), with bounds at every completed step; straight withinstep interpolation stays in boxbounds. Eachrow[stateincrements...,signedmass,rate tonnes/h]. Minimizes peak absolute selectedstate, not time; no automatic nonlinear hydrostatics or simultaneouspump/cargo scheduling.

A few questions, answered

Why not just check the final loading condition?

Different orders can pass through different intermediate conditions even when their final mass and moments match.

Is total fixed sequential time a useful ordering objective?

No. When every step duration is fixed and all steps are sequential, the total is order-independent; this model instead minimizes peak absolute trim.

Does checking step endpoints cover a continuous transfer?

Not generally. Nonlinear hydrostatics and changing free surface can require checks within the step as well.

Does a complete search make the sequence an operating instruction?

No. It proves only the result within the declared finite model and supplied constraints, subject to operational review.

Find your calculator

Start typing to explore the library.