I am using the AnyLogic traffic library and need to use two functions listed here: CAR API, getDistanceDriven() and getLaneIndex(). But when I invoke them I get the error: The method getDistanceDriven() is undefined for the type Vehicle, The method getLaneIndex() is undefined for the type Vehicle.
distance is a parameter in Vehicle agent:
I don't have much experience with AnyLogic and I don't know if I am using the function well. Inside the list there is the function called getSpeed() but this one works fine. I have the AnyLogic 8 University version thinking it was some limitation of the PLE version but I have the same problem.
Could you help me, please?
I fix it like this:
Go to the project browser, click on the agent "Vehicle". In its properties, under the tab Agent in flowcharts change on Use in flowcharts as: to "Car".