本文整理汇总了Java中org.matsim.core.scenario.ScenarioUtils类的典型用法代码示例。如果您正苦于以下问题:Java ScenarioUtils类的具体用法?Java ScenarioUtils怎么用?Java ScenarioUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScenarioUtils类属于org.matsim.core.scenario包,在下文中一共展示了ScenarioUtils类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transformScheduleFile
import org.matsim.core.scenario.ScenarioUtils; //导入依赖的package包/类
/**
* Transforms a MATSim Transit Schedule file. Overwrites the file.
*/
public static void transformScheduleFile(String scheduleFile, String fromCoordinateSystem, String toCoordinateSystem) {
log.info("... Transformig schedule from " + fromCoordinateSystem + " to " + toCoordinateSystem);
final CoordinateTransformation coordinateTransformation = TransformationFactory.getCoordinateTransformation(fromCoordinateSystem, toCoordinateSystem);
final Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig());
new TransitScheduleReader(coordinateTransformation, scenario).readFile(scheduleFile);
TransitSchedule schedule = scenario.getTransitSchedule();
new TransitScheduleWriter(schedule).writeFile(scheduleFile);
}
示例2: readTransitSchedule
import org.matsim.core.scenario.ScenarioUtils; //导入依赖的package包/类
/**
* @return the transitSchedule from scheduleFile.
*/
public static TransitSchedule readTransitSchedule(String fileName) {
Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig());
new TransitScheduleReader(scenario).readFile(fileName);
return scenario.getTransitSchedule();
}
示例3: createSchedule
import org.matsim.core.scenario.ScenarioUtils; //导入依赖的package包/类
/**
* @return an empty transit schedule.
*/
public static TransitSchedule createSchedule() {
Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig());
return scenario.getTransitSchedule();
}