I have a question related to the freight contribution.
My shipments contain characteristics in their ID. Is it possible to change the cost for their transport linked to the information of those characteristics in the shipment ID? And how should that go?
I thank you in advance.
I agree with Kai, a) using the CarrierScoringFunctionFactory, and b) CarrierShipment does not have an Id. If, however, the characteristics is associated with the Carrier's Id then you might do something similar than what we've done with roadpricing's TollFactor implementations, albeit there we used the vehicle's Id.
There doesn't seem to be a good example. RunChessboard (in the freight contrib) seems to be going into the right direction, in particular
final CarrierScoringFunctionFactory scoringFunctionFactory = new MyCarrierScoringFunctionFactory();
You then need to check how MyCarrierScoringFunctionFactory is implemented, and then either add or replace one of the pieces. Then hopefully you can get what you need, i.e. the shipment ID.
Unfortunately, to me it looks like this code has never been streamlined so if this does not work please let us know, preferably with some git project with the construction site so we can look at it.
BTW, where is the shipment ID? CarrierShipment does not seem to have an ID?
Please let us know how this goes, best wishes