Journal

What the FSM ship tariff regulation taught us about pricing

· 10 min read

Fares by the mile, a cabin minimum, half fare from four to twelve, two free packages, pigs at seven dollars a head. The pricing engine is the regulation, rewritten as code with tests.

A printed government shipping tariff table on a desk beside a folded chart of Pacific atolls, dividers, a pencil and a ferry ticket stub
The published tariff is the pricing engine. Every fare on the demo can be checked against the printed table.

Commercial booking software treats price as a lever. Seasons, early-booking discounts, dynamic pricing that rises as the sailing fills, promotional codes, bundles. The vendors compete on how many levers they offer. On a government ship, none of those exist. The price is a regulation, with a date and a signature, and the operator's job is to charge exactly what it says. This article is about what the Federated States of Micronesia' Ship Tariff Regulations say, how we turned them into the pricing engine of Supaferry, and why a tariff that lives in one place and can be checked against a public document is worth more than any lever.

What the regulation says

The Proposed Ship Tariff Regulations of the Federated States of Micronesia, adopted under the authority of the Secretary of Transportation, Communication and Infrastructure, set “uniform freight charges, passenger fares, and special voyage rates” for the government's field trip vessels. They are eight pages long and remarkably precise.

Passenger fares are point to point by distance. A cabin passenger pays eighteen cents a mile for journeys under a hundred miles, with a cabin minimum of thirteen dollars, and twenty cents a mile for journeys of a hundred miles or more. A deck passenger pays seven cents a mile. The regulation gives its own worked examples between the state centres: Pohnpei to Kosrae is 319 miles, so $63.80 in a cabin and $22.30 on deck; Chuuk to Yap is 842 miles, $168.40 and $58.90. Full fare applies from thirteen years of age; children from four to twelve pay half; children under four travel free with a parent or guardian; and no child of twelve or under may travel unaccompanied.

Then the extras. A passenger may bring two packages of personal effects free, and pays one dollar for each additional piece. Meals on request are four dollars for breakfast, six for lunch and seven fifty for dinner. Food for the voyage can be carried free. Lighterage, the transfer by boat between ship and shore at an anchorage, is provided by the master's service boats at no charge where it does not disrupt the ship's operation.

Cargo has its own part: thirty-five dollars per revenue ton for intra-state freight, forty-five inter-state, fifty-five international, all free in and out, where a revenue ton is the greater of a weight ton of two thousand pounds and a measurement ton of forty cubic feet. A short list of commodities carries its own rate:

  • copra at thirty dollars a short ton, refrigerated cargo at thirty-five per revenue ton, aggregate and sand at twenty;
  • canoes up to twenty feet at a flat thirty dollars, empty drums at three fifty each;
  • pigs, goats and dogs at seven dollars a head, chickens at a dollar, cows and horses at twenty;
  • a minimum charge of twenty dollars for any bill of lading.

And finally the rules of money: all fares and charges in US dollars, the same rates for government and private parties alike, payment at the FSM Finance Office with a receipt that is the condition of boarding, and revenue to the Maritime Operations Fund.

What this is, seen from software

Read as a specification, the regulation describes a pricing function with a small number of inputs: the distance between two points along the route, the class of accommodation, the passenger's age band, the count of packages beyond the allowance, and the extras chosen. It describes a minimum, a threshold where the rate changes, and factors by age. It describes a catalogue of chargeable items with unit prices and natural units (per piece, per meal, per head, per boat). And it describes a rounding convention implicitly, through its own examples, which print fares to the cent.

That is the whole of the Supaferry tariff module. The rates are five numbers in the operator's settings:

  • deck cents per mile;
  • cabin cents per mile under the threshold;
  • cabin cents per mile from the threshold;
  • the threshold in miles;
  • the cabin minimum in cents.

The age factors are two numbers, one half for children and zero for infants. The extras are a catalogue the operator edits: label, unit, price, maximum per booking. Nothing about the FSM is hard-coded; a different operator enters a different tariff, or a fixed table, and the same engine prices it.

The regulation's examples are the tests

The most useful thing a regulation can give a software team is worked examples, and this one gives twelve. We turned them into automated tests that run every time the code changes. Pohnpei to Kosrae at 319 miles must produce $63.80 in a cabin; Pohnpei to Yap at 1,210 miles must produce $242.00; Chuuk to Yap at 842 miles, $168.40. On deck, 385 miles must produce $26.95 and 1,515 miles $106.05. A cabin at 99 miles must use the lower rate; at exactly 100 miles the higher one; at 50 miles the thirteen-dollar minimum. If any of those ever came out differently, the build would fail before the change reached an operator.

One example exposed something. The regulation prints the deck fare for 319 miles as $22.30, but seven cents times 319 is $22.33. The printed table rounded to the nearest ten cents; the rule did not say to. We kept the rule, documented the three-cent difference, and made the override available: an operator who wants the printed table can enter it as a fixed fare per port pair, and the fixed fare wins over the computed one. A regulation is a text and a practice, and the software has to be able to follow either.

The worked examples in a regulation are the acceptance tests, and they settle arguments.

Distance along the route

The regulation prices point to point, and it publishes the distances between the four state centres. Between the outer islands it publishes nothing, because the islands are many and the routes change. Supaferry therefore keeps a table of published distances for the pairs the regulation names, and computes the great-circle distance from the ports' coordinates for every other pair. For a booking across several legs, the distance is the sum of the legs actually sailed, not the straight line between the first and last island, because the ship does not sail the straight line and the regulation says point to point along the route.

This has a visible consequence that passengers understand immediately: Pohnpei to Kapingamarangi via Sapwuahfik and Nukuoro costs a little more than a direct run would, and the fare page says so by listing the islands in between. It also means that if the operator re-orders a run, the fares follow the new order without anyone touching a price list.

Age bands and the guardian rule

The three fare types are adult, child and infant, with the age bands bounded at four and thirteen years. The booking form asks the fare type per passenger and, in the FSM configuration, the date of birth as well, because the manifest needs it and the agent at the counter can check it. The rule that no child of twelve or under travels unaccompanied is enforced where it belongs, at the booking: a booking that contains a child or an infant and no adult is refused with a message that says why. The operator's own booking questions add a guardian name field, so the manifest shows who is responsible for whom.

Extras as a catalogue

The extras are a list the operator maintains in the settings, and the FSM demonstration ships with the regulation's own items: extra package beyond the two free ones at a dollar, breakfast, lunch and dinner at their prices, pigs, goats and dogs at seven dollars a head, chickens at a dollar, a canoe up to twenty feet at thirty dollars. Each has a unit label so the booking form says “per head” or “per meal”, and a maximum per booking so a typing error cannot book fifty pigs. The itemised quote lists each line with its quantity and total, and the same lines appear on the ticket and in the back office.

The free allowance is a setting too, two packages per passenger, and the booking form says so next to the extras, because a passenger who knows the rule brings two bags and a passenger who does not pays a dollar at the gangway and resents it.

One engine, two sides

A detail that matters for trust: the same pricing function runs on the server, where it produces the fare that is charged, and in the browser, where it shows the running total while the passenger adds people and packages. The browser does not call the server for every change; it has the tariff and the same code. The server recomputes the quote when the booking is created and stores the itemised quote with the booking, so the price a passenger saw is the price recorded, and the price recorded can be reproduced later from the tariff in force that day. The fare calculator on this site's home page is that same function with a slider for distance.

A fare the passenger can check against a public document is a fare that does not get argued at the counter.

Versions and the auditor

Tariffs change. Fuel goes up, a legislature amends the regulation, a state adds a resident discount. When the operator changes a rate in the settings, the change is written to the audit log with the actor and the time, and bookings made before it keep the itemised fare they were made with. An auditor who asks why a passenger paid $35.30 for Pohnpei to Kapingamarangi on a given date can see the distance, the rate per mile in force, the age factors and the extras, line by line. That is the reconciliation the Finance Office wants, and it is a by-product of storing the quote rather than just the total.

Beyond the FSM

Other operators price differently, and the engine allows it. A line with a published table of fares per port pair enters the table as fixed fares and never uses the per-mile rule. A line with a resident discount adds it as a factor on a passenger type, the way the Canary Islands lines apply the residents' subsidy. A line with seasons can still have them, as dated tariff versions. What the engine refuses to do is surge pricing on a leg that is filling up, because for a public service to an island with no alternative that is not a pricing strategy, it is a tax on the people who booked last.

Cargo: the same engine, a different unit

Cargo booking is the natural second phase for an operator of this kind, and Part 4 of the regulation reads like a second catalogue for the same engine. A consignment has a shipper, a consignee, a destination island, pieces, a weight and a volume. The chargeable quantity is the revenue ton, the greater of the weight in two-thousand-pound tons and the volume in forty-cubic-foot tons, which is a two-line function. The rate depends on a distance class, intra-state, inter-state or international, rather than on miles, and a short list of commodities carries its own unit: copra by the short ton, drums by the drum, animals by the head, canoes by the boat. The minimum charge per bill of lading is twenty dollars, which is simply a floor on the total, the same construction as the cabin minimum. When we build the cargo module, the tariff settings grow by one table and the quote grows by a few line types; the pricing function, the versioning, the audit trail and the itemised record on the document all stay as they are. Reading the whole regulation before building the passenger side is what made that possible: the data model already has the units the cargo rules need, and a bill of lading will be itemised the way a ticket is today.

What we took from it

The regulation taught us three things that now shape the whole product. First, that the rules of a public service are often written down precisely, and a vendor who reads them before designing saves the customer from explaining them. Second, that worked examples in a regulation are a gift: they are the acceptance tests, and they settle arguments. Third, that pricing on a government ship is a matter of fidelity rather than optimisation, and the right design is one place for the rates, one function that applies them on both sides of the screen, and a record of every number that was ever charged.

Pricing on a government ship is a matter of fidelity rather than optimisation.

Questions people ask

How are passenger fares calculated under the FSM ship tariff?
Point to point by distance. Cabin passengers pay 18 cents a mile under 100 miles with a $13 minimum and 20 cents a mile from 100 miles; deck passengers pay 7 cents a mile. Children from four to twelve pay half, children under four travel free with a guardian, and full fare applies from thirteen.
What is a revenue ton?
The greater of a weight ton of 2,000 pounds and a measurement ton of 40 cubic feet. Cargo rates are quoted per revenue ton by distance class, intra-state, inter-state or international, with a few commodities priced by their own unit such as the head, the drum or the boat. The minimum per bill of lading is $20.
What happens when the printed table and the rule disagree?
The regulation prints the deck fare for 319 miles as $22.30, while 7 cents times 319 is $22.33. Supaferry keeps the rule, documents the difference and lets the operator enter the printed figure as a fixed fare per port pair. A fixed fare always wins over the computed one, and both are versioned.
Can the engine price something other than a per-mile tariff?
Yes. A line with a published table enters it as fixed fares and never uses the per-mile rule; a resident discount becomes a factor on a passenger type; seasons become dated tariff versions. What it will not do is raise the price of a leg as it fills, because surge pricing on a public service with no alternative is a tax on whoever booked last.
How can an auditor check a fare charged months ago?
Every booking stores its itemised quote: distance, rate per mile in force, age factors and each extra line. Tariff changes are written to the audit log with actor and time, and earlier bookings keep the quote they were made with. The auditor sees exactly how $35.30 for Pohnpei to Kapingamarangi was composed on that date.