Codota Logo
LanesWriter.write
Code IndexAdd Codota to your IDE (free)

How to use
write
method
in
org.matsim.lanes.LanesWriter

Best Java code snippets using org.matsim.lanes.LanesWriter.write (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

writerDelegate.write(config.network().getLaneDefinitionsFile());
org.matsim.lanesLanesWriterwrite

Popular methods of LanesWriter

  • <init>
    Writer for the http://www.matsim.org/files/dtd/laneDefinitions_v2.0.xsd file format.
  • convertDataToXml

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • setContentView (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JOptionPane (javax.swing)
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