-
Notifications
You must be signed in to change notification settings - Fork 179
faq 293109761
by Carlos Olivos on 2018-06-21 13:39:18
Hello,
I'm starting to use the freight contribution and I tried to run a simulation using shipments instead of services, but I encoutered that org.matsim.contrib.freight.jsprit.MatsimJspritFactory prompts an error stating "IllegalStateException if shipments are involved". Later I found out in the Java docs that shipments are not yet implemented.
So my question is: has anyone already implemented shipments? If so, where can I find the changements to the code.
Thanks,
Carlos
P.S: I imported MATSim's master to Eclipse via Github and later imported the contribs as Maven projects. So everything I have is version 0.11.
by Johan W. Joubert on 2018-06-21 14:36:07
Hi Carlos, I don't have an answer/solution, but some context. The freight
contrib was fairly quiet for a few years. We are currently working on it (very) actively from TU Berlin, German Aerospace Centre (DLR) and University of Pretoria side. The most active repository is (unfortunately) currently private, but the latest public stuff you will find on the freight-dfg17-mainBranch
Git branch of the repository you have.
That said, you're right, my understanding too is that CarrierShipment
is not fully implemented/incorporated in the code.
We focus on the receiver side, while DLR is focussing on the shipper side (Carrier
was always there). So on our side we just bully the code so that we create a CarrierService
even though they represent actual goods/shipments.
by Kai Nagel on 2018-06-22 19:13:39
Jsprit (the underlying engine) actually seems to have the functionality at least since v1.7 (see here: https://github.com/graphhopper/jsprit/blob/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples/MultipleProductsWithLoadConstraintExample.java) and click yourself through previous versions. The MATSim freight contrib (which is the adapter to MATSim) uses jsprit 1.7.2 both in 0.10.x and in the current release. So in principle, the functionality should be there.
This implies that someone (you?) should try out if it maybe already works. This would entail git-cloning the matsim project, importing it into the IDE, and commenting out the offending line 320 in MatsimJspritFactory.
(Evidently, you could also do it directly in jsprit as in the MultipleProducts... example. But then, possibly, the result would not get translated to the matsim side afterwards. But I don't really know.)
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq