Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRT: com.google.common.base.VerifyException: null #1178

Open
FNaqavi opened this issue Nov 4, 2024 · 8 comments
Open

DRT: com.google.common.base.VerifyException: null #1178

FNaqavi opened this issue Nov 4, 2024 · 8 comments

Comments

@FNaqavi
Copy link

FNaqavi commented Nov 4, 2024

Dear all,

I got this error at iterations 20 of one run and 22 of another run of my DRT scenario. Any idea how to fix it?

image

This is my drt and dvrp settings for now:

<module name="multiModeDrt">
    <parameterset type="drt">
        <parameterset type="ExtensiveInsertionSearch"/>
        <param name="changeStartLinkToLastLinkInSchedule" value="true"/>
        <param name="drtServiceAreaShapeFile" value="./center1.shp" />
        <param name="maxTravelTimeAlpha" value="2.0"/>  
        <param name="maxTravelTimeBeta" value="900.0"/>
        <param name="maxWaitTime" value="600.0"/>
        <param name="operationalScheme" value="serviceAreaBased"/>
        <param name="stopDuration" value="10.0"/>
        <param name="vehiclesFile" value="drt_osm_2000.xml"/>
        <param name="writeDetailedCustomerStats" value="true"/>
        <parameterset type="zonalSystem">
            <param name="zonesGeneration" value="GridFromNetwork"/>
            <param name="cellSize" value="500"/>  
        </parameterset>
        <parameterset type="rebalancing">
            <parameterset type="minCostFlowRebalancingStrategy">
                <param name="targetAlpha" value="0.5"/>
                <param name="targetBeta" value="0.5"/>
            </parameterset>
        </parameterset>
        <parameterset type="drtfare">
            <param name="basefare" value="0"/>
            <param name="dailySubscriptionFee" value="34"/>
            <param name="distanceFare_m" value="0"/>
            <param name="timeFare_h" value="0"/>
            <param name="minFarePerTrip" value="0.0"/>  
        </parameterset>
    </parameterset>
</module>

<module name="dvrp">
    <parameterset type="travelTimeMatrix">
        <param name="cellSize" value="500"/>   
        <param name="maxNeighborDistance" value="1000"/>   
    </parameterset>
    <param name="networkModes" value="car"/>
    <param name="travelTimeEstimationAlpha" value="0.05"/>
</module>
@FNaqavi
Copy link
Author

FNaqavi commented Nov 29, 2024

Update:

I set "maxTravelTimeAlpha" to 1, and it ran without error. It seems that there is a bug that causes this error.
Here is my log file.

slurm-5715213.txt

Also, when I create the DRTs on random links within the shapeFile, I get the same error (even with "maxTravelTimeAlpha" =1). Last time I got it after 20+ iterations, the simulation runs if I hand-pick certain fairly longer links and create DRTs on those links.

Here is the log file for this one:
slurm-6016952.txt

The network is generated by MATSim tools from OSM, and is cleaned.

I hope this bug gets fixed.

@FNaqavi
Copy link
Author

FNaqavi commented Dec 6, 2024

Update:

Even when creating DRTs on certain links this error might be thrown! This one happened after several (around 5) iterations.

slurm-6185319.txt

Is there a way to fix this?

@FNaqavi FNaqavi changed the title DRT: com.google.common.base.VerifyException: null DRT (bug): com.google.common.base.VerifyException: null Dec 6, 2024
@nkuehnel
Copy link
Member

nkuehnel commented Dec 6, 2024

Which version of matsim/drt are you using? Are you using prebooking?

There have been a few updates to the scheduler this year

@FNaqavi
Copy link
Author

FNaqavi commented Dec 6, 2024

Dear Nico (@nkuehnel ),

Here is my pom file: pom.txt

image

I tried to change the MATSim version to a more recent version, but other dependency errors arose and I couldn't run it. I use java/17.0.4.

Best,
Fatemeh

@nkuehnel
Copy link
Member

nkuehnel commented Dec 6, 2024

Mh I'm afraid it's hard to tell from the verify exception, since it's not so descriptive.
What other dependency errors do you get, maybe you can sort them out?

@FNaqavi
Copy link
Author

FNaqavi commented Dec 11, 2024

class file has wrong version 65.0, should be 61.0.
Are the new updates incompatible with Java 17? That is the version I am currently using (on the remote server, with no privileges).

This is part of the error:

[ERROR] /Stockholm_MATSim_Drt/src/main/java/org/matsim/RunMatsim.java:[21,41] cannot access org.matsim.contrib.drt.run.DrtControlerCreator
  bad class file: ~/.m2/repository/org/matsim/contrib/drt/2025.0-2024w38/drt-2025.0-2024w38.jar(/org/matsim/contrib/drt/run/DrtControlerCreator.class)
    class file has wrong version 65.0, should be 61.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR] /Stockholm_MATSim_Drt/src/main/java/org/matsim/RunMatsim.java:[25,31] cannot access org.matsim.api.core.v01.Scenario
  bad class file:~/.m2/repository/org/matsim/contrib/drt/2025.0-2024w38/drt-2025.0-2024w38.jarr(/org/matsim/api/core/v01/Scenario.class)
    class file has wrong version 65.0, should be 61.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

@nkuehnel
Copy link
Member

Indeed, the latest matsim versions are compiled with java 21:
https://github.com/matsim-org/matsim-libs/blob/5f58a97e2538b5c7a184ab07d52d2fcdcd8909d8/pom.xml#L370-L377

@FNaqavi
Copy link
Author

FNaqavi commented Dec 11, 2024

Thank you so much!

@FNaqavi FNaqavi changed the title DRT (bug): com.google.common.base.VerifyException: null DRT: com.google.common.base.VerifyException: null Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants