As far regular and non-consuming demand:
The economy sim ultimately distributes commodities based on prices. High demand and high stability increase prices.
Regular demand is subtracted from stockpiles each economy interval. The details aren't quite as simple as that, so don't expect the average stockpile to be equal to production plus imports minus exports minus demand.
Non-consuming demand is a portion of the regular demand that's not subtracted from stockpiles.
For example:
market.getDemand(Commodities.REGULAR_CREW).getDemand().modifyFlat(id, 100);
market.getDemand(Commodities.REGULAR_CREW).getNonConsumingDemand().modifyFlat(id, 99);
This sets the demand for crew to 100, but only 1 crew is "consumed" every economy interval (which is configurable, 30 days by default). This crew consumption simulates crew loss due to retirement, accidents, etc.
Non-consuming demand is also useful if you want a location to have a stockpile of stuff that the player can buy. For example, space stations have a non-consuming demand for fuel - meaning fuel gets shipped there, but isn't consumed, so more of it is available on the market.
"defaultConnectionMult":1,
"defaultConnectionFlat":1,
The economy sim uses connection weights between markets to figure out at what price to ship stuff where.
For example, say Food at Tartessus is sold at 30 credits per unit, and it's considering shipping it to Sindria, where Food is bought at 50 credits per unit.
The cost of shipping it looks at will be 30 * <connection mult> + <connection flat>. Then, if that result is <50, it might decide to ship there, unless other markets offer a better margin.
The connection mult is affected by distance to the market, market size, piracy, and possibly other things. defaultConnectionMult is its default value. Setting it to 2, say, would cause a much greater disparity in prices - in effect, you're saying that shipping goods is very hard. What you'd end up with then are excess stockpiles on producer worlds and unmet demand on consumer worlds.
connection flat is, iirc, unused, beyond the default value. Manipulating the flat value can be useful to make it so that higher-price goods are "worth it" for the sim to ship, while lower price goods are not, if that's ever needed. I.E. an extra cost of 10 credits per unit means a lot to the price of Food but not as much for Luxury Goods.