+
+ /* We need to construct the LP problem. GLPK talks
+ * about rows and columns, which are numbered from 1.
+ *
+ * Each column is a `structural variable' ie one of the entries in
+ * the objective function. In our case the set of structural
+ * variable is, for each visit, the set of Trades which collect at
+ * that island. (We use `visit' to mean `specific visit to an
+ * island' so if an island appears more than once so do its trades.)
+ * We don't need to worry about crossing with all the possible
+ * delivery locations as we always deliver on the first visit.
+ * We will call such a structural variable a Flow, for brevity.
+ *
+ * We iterate over the possible Flows adding them as columns as we
+ * go, and also adding their entries to the various constraints.
+ *
+ * Each row is an `auxiliary variable' ie one of the constraints.
+ * We have two kinds of constraint:
+ * - mass/volume/capital: one constraint for each sailed leg
+ * (unless relevant constraint is not satisfied)
+ * - quantity of commodity available for collection
+ * or delivery at particular price and island
+ * The former are numbered predictably: we have first all the mass
+ * limits, then all the volume limits, then all the capital limits
+ * (as applicable) - one for each leg, ie one for each entry
+ * in islands except the first.
+ *
+ * The latter are added as needed and the row numbers are stored in
+ * a data structure for later reuse.
+ */
+