Promised I would post this once it stopped embarrassing me. It has.
What it does: consolidates part-load freight from multiple shippers into full containers,
prices each shipper’s share, and tracks the container through customs to final delivery.
The model: around 60 classes. The interesting part is that the consolidation rules —
which shipments can share a container, based on destination, hazard class, temperature
requirements and delivery window — are entirely OCL. There is no hand-written business logic
in the system at all.
What surprised me: the pricing rules changed four times during the build, twice after we
had “finished”. Each change took under an hour because it was one derived attribute and a
constraint, not a service class with tests around it.
What was hard: the state machine for a container that can be partially unloaded and
reconsolidated mid-route. Took three attempts. The composite-state advice from
an earlier thread here is what finally unstuck it.
Happy to answer questions about any of it.