Overriding Objective Function with no penalty should receive no planned shipments

Hello,

I’m trying to do a basic test, where I have a handful of shipments and a single vehicle, and I’ve copied the base objective function but REMOVED the unassigned tasks cost:
(from objective function) c += solution.getUnassignedJobs().size() * c * .1;

I would expect all shipments to remain unassigned, as mentioned here under 2014-09-08:
(https://github.com/graphhopper/jsprit/blob/7590be97948da47eefed61413c27f2a70b6ff434/WHATS_NEW.md)

However, I continue to get shipments assigned. So, do I have to modify/override the built-in ShipmentInsertionCalculator in some way?

I know the examples and link below mention modifying the insertion costs, but I can’t understand why that is necessary if I’ve only removed the penalty on unassigned tasks.
(Overriding the Objective function)

The insertion heuristic always tries to insert a shipment even if insertion costs are high. It inserts a shipment if every hard constraint is fulfilled. It does not trade-off insertion costs to decide whether or not to schedule the shipment at all. It only searches for the “best” insertion positions. However, you can add a hard activity constraint that does such a trade-off. This might then control whether a shipment can or cannot be inserted.

Thank you very much! I’ll investigate that approach.