Codota Logo
LanesWriter.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.matsim.lanes.LanesWriter
constructor

Best Java code snippets using org.matsim.lanes.LanesWriter.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

private void dumpLanes() {
  try {
    new LanesWriter(lanes).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_LANES));
  } catch ( Exception ee ) {
    log.error("Exception writing lanes.", ee);
  }
}
origin: matsim-org/matsim

public static void calculateMissingCapacitiesForLanes20(String networkInputFilename, String lanes20InputFilename, String lanes20OutputFilename){
  Config config = ConfigUtils.createConfig();
  config.network().setInputFile(networkInputFilename);
  config.qsim().setUseLanes(true);
  config.network().setLaneDefinitionsFile(lanes20InputFilename);
  Scenario scenario = ScenarioUtils.loadScenario(config);
  Network network = scenario.getNetwork();
  Lanes lanes = scenario.getLanes();
  for (LanesToLinkAssignment l2l : lanes.getLanesToLinkAssignments().values()){
    Link link = network.getLinks().get(l2l.getLinkId());
    for (Lane lane : l2l.getLanes().values()){
      if (lane.getToLaneIds() == null || lane.getToLaneIds().isEmpty()){
        calculateAndSetCapacity(lane, true, link, network);
      }
      else {
        calculateAndSetCapacity(lane, false, link, network);
      }
    }
  }
  LanesWriter writerDelegate = new LanesWriter(lanes);
  writerDelegate.write(lanes20OutputFilename);
}

origin: matsim-org/matsim

public void testWriter20() {
  Fixture f = new Fixture();
  String testoutput = this.getOutputDirectory() + "testLaneDefinitions2.0out.xml.gz";
  log.debug("reading file...");
  // read the test file
  LanesReader reader = new LanesReader(
      f.scenario);
  reader.readFile(this.getClassInputDirectory() + FILENAME);
  // write the test file
  log.debug("write the test file...");
  LanesWriter writerDelegate = new LanesWriter(f.scenario.getLanes());
  writerDelegate.write(testoutput);
  f = new Fixture();
  log.debug("and read it again");
  reader = new LanesReader(
      f.scenario);
  reader.readFile(testoutput);
  checkContent(f.scenario.getLanes());
}
origin: matsim-org/matsim

LanesWriter writerDelegate = new LanesWriter(scenario.getLanes());
writerDelegate.write(config.network().getLaneDefinitionsFile());
org.matsim.lanesLanesWriter<init>

Javadoc

Writer for the http://www.matsim.org/files/dtd/laneDefinitions_v2.0.xsd file format.

Popular methods of LanesWriter

  • write
  • convertDataToXml

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onRequestPermissionsResult (Fragment)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now