-
Notifications
You must be signed in to change notification settings - Fork 179
faq 108409626
by Koen Mommens on 2017-03-14 16:25:16
Hello,
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.
Best regards,
Koen Mommens
by Kai Nagel on 2017-03-14 19:44:03
Dear Koen,
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();
...
bind(CarrierScoringFunctionFactory.class).toInstance(scoringFunctionFactory);
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
Kai
by Johan W. Joubert on 2017-03-15 15:54:04
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
.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq