-
Notifications
You must be signed in to change notification settings - Fork 180
faq 73334788
by Yousef Hindy on 2016-07-08 03:26:18
So I have a project configured with a pom.xml that includes the taxi extension.
When I try and write the following code:
new TaxiModule(taxiData)
It tells me that "The constructor is undefined", even though TaxiModule has constructors:
public TaxiModule(TaxiData taxiData)
{
this(taxiData, VehicleUtils.getDefaultVehicleType());
}
public TaxiModule(TaxiData taxiData, VehicleType vehicleType)
{
this.taxiData = taxiData;
this.vehicleType = vehicleType;
}
It suggests that I
Add argument to match constructor TaxiModule(TaxiData, TaxiConfigGroup).
Add argument to match constructor TaxiModule(TaxiData, TaxiConfigGroup, VehicleType).
I am very confused by this... The compiler is also giving me grief about the get() method for the TaxiConfigGroup, saying it doesn't exist even though it is clearly in the documentation.
Any help would be great!
Thanks!
by Michal Maciejewski on 2016-07-08 08:01:43
Probably you are pointing to a different version of matsim/taxi in your pom. In version 0.8, there is a constructor TaxiModule(TaxiData, TaxiConfigGroup), which is what your eclipse sees. Somewhere 2 weeks ago, the second argument was removed (as it was unnecessary), and currently this constructor takes only TaxiData, and this is what you see.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq