Search code examples
javamathematical-optimizationanylogicor-tools

Protocolbuffer package isString empty error in AnyLogic


I am trying to use custom routing in anylogic. For routing optimization, I am using Google OR-Tools and I have imported all the necessary packages and dependencies in the model properties section.

dependencies

Imports section in main properties

I am a rookie after doing some research I made several changes in the protocol buffer .jar file as mentioned in GitHub but still I am facing the same error.

error message.

If I try to remove the protocol buffer dependency from the model properties again I end up getting the same error.

Thanks in advance.


Solution

  • For the protobuf version I STRONGLY recommend you to look at the version specified in the maven pom.xml template since the version should match the version use in the C++ side of the library.

    You can find it here https://github.com/google/or-tools/tree/stable/ortools/java
    note: use the tag related to your or-tools version usually we try to be in sync with the last protobuf release available when we release a new or-tools version.

    note: this is a mandatory requirement in python to avoid any strange behaviour and I expect the same weird undefined behaviour if you also don't follow this..