Open mashrur93 opened 2 years ago
The userguide chapter 16 might be helpful for you.
The pt modes don't have to be declared as main modes. They are all handled as pt which has its own config section. This should be described in the userguide as well.
For some historical reason the network mode of pt vessels is changed to car
within the mobism. This is why your pt-vehicles will have car
as network mode in your visualization. It is possible to filter the pt-vehilces by driver id, which is usually pre-pended with pt_
Thanks, @Janekdererste for the feedback. I have the following questions. I want to get a skim matrix for analyzing the event file. Therefore, with reference to the SwissRailRaptor, I used the following codes. But I am getting errors while loading the shapefiles. I have attached the config, shapefiles, and errors herewith.
queries:
I will highly appreciate any assistance in this regard.
public class skim_trial {
public static void main(String[] args) throws IOException {
String zonesShapeFilename = "./input/SkimMatrics/zones/zones.shp";
String zonesIdAttributeName = "gta06";
String networkFilename = "./input/SkimMatrics/network.xml";
String transitScheduleFilename = "./input/SkimMatrics/transitScedule.xml";
String eventsFilename = "./input/SkimMatrics/events.xml.gz";
String outputDirectory = "./input/SkimMatrics/output";
Config config = ConfigUtils.loadConfig( "./input/SkimMatrics/config.xml" );
int numberOfPointsPerZone = 1;
int numberOfThreads = 2;
double[] timesCar = {0, 2};
double earliestTime = 0;
double latestTime = 86399;
Random r = new Random(4711);
CalculateSkimMatrices skims = new CalculateSkimMatrices(outputDirectory, numberOfThreads);
skims.calculateSamplingPointsPerZoneFromNetwork(networkFilename, numberOfPointsPerZone, zonesShapeFilename, zonesIdAttributeName, r);
// as facilities file are not available
skims.calculateNetworkMatrices(networkFilename, eventsFilename, timesCar, config, null, link -> true);
skims.calculatePTMatrices(networkFilename, transitScheduleFilename, earliestTime, latestTime, config, null, (line, route) -> route.getTransportMode().equals("rail"));
skims.calculateBeelineMatrix();
skims.writeSamplingPointsToFile(new File(outputDirectory, CalculateSkimMatrices.ZONE_LOCATIONS_FILENAME));
}
So, I have never seen this kind of error before. I found a similar error here
I guess you have to search through your project for conflicting library versions.
Unfortunately, I have never worked with this. And I also don't know, who has. I therefore can't tell, whether this will do what you want.
Recently, this PR was done. Maybe tag some of those people https://github.com/matsim-org/matsim-libs/pull/1890#event-6126171201
Hi,
I was trying to visualize the transit vehicles to check if bus/tram was not teleported, as I declared those as main mode in qsim.
However, while visualizing the bus/tram vehicles, I saw bus/tram as car mode in via. I also saw the same issue in the pt-tutorial example file, where train vehicles were simulated as car mode. Is there a way to see the trasnit vehicle as it is (not as car mode in via). However, subway and rail were seen to be simulated as their respective type. it is to be noted that I declared subway and rail to have deterministic service in swissRailRaptor module.
The following is the scenario of the matsim model:
I have a network and transitSchedule file with 4 pt modes: bus, tram, subway, train.
in the plan file, the agent used two types of trasnit mode: localPt and regionalPt
Therefore, localPt and regionalPt were declared in the "planCalcScore" module as follows:
I further used pt mapping in the swiss rail raptor modules,
Lastly, I declared subway and rail as deterministic service modes and kept the other trasnit modes (bus, tram) simulated as non-deterministic mode, so that they are not teleported and their interaction with car and effect of congestion on their scheduling may be captured.
I will highly appreciate any guidance in this regard. Thanks