Codota Logo
SnapshotGenerator.addSnapshotWriter
Code IndexAdd Codota to your IDE (free)

How to use
addSnapshotWriter
method
in
org.matsim.core.events.algorithms.SnapshotGenerator

Best Java code snippets using org.matsim.core.events.algorithms.SnapshotGenerator.addSnapshotWriter (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

private void loadSnapshotWriters(final String outputDir) {
  if (this.writer != null) {
    this.visualizer.addSnapshotWriter(this.writer);
  }
  Collection<String> snapshotFormat = this.config.controler().getSnapshotFormat();
  if (snapshotFormat.contains("transims")) {
    String snapshotFile = outputDir + "T.veh";
    this.visualizer.addSnapshotWriter(new TransimsSnapshotWriter(snapshotFile));
  }
  if (snapshotFormat.contains("googleearth")) {
    String snapshotFile = outputDir + "googleearth.kmz";
    String coordSystem = this.config.global().getCoordinateSystem();
    this.visualizer.addSnapshotWriter(new KmlSnapshotWriter(snapshotFile,
        TransformationFactory.getCoordinateTransformation(coordSystem, TransformationFactory.WGS84)));
  }
}
origin: matsim-org/matsim

public static void convert(Scenario scenario, String eventFileName, String outFileName, double interval_s) {
  OTFFileWriter otfFileWriter = new OTFFileWriter(scenario, outFileName);
  EventsManager events = EventsUtils.createEventsManager();
  SnapshotGenerator visualizer = new SnapshotGenerator(scenario.getNetwork(), interval_s, scenario.getConfig().qsim());
  visualizer.addSnapshotWriter(otfFileWriter);
  events.addHandler(visualizer);
  new MatsimEventsReader(events).readFile(eventFileName);
  visualizer.finish();
  otfFileWriter.finish();
}
origin: matsim-org/matsim

public void makeMVI(Carriers carriers, String outfile, double snapshotInterval){
  OTFFileWriter otfFileWriter = new OTFFileWriter(scenario, outfile);
  
  EventsManager events = EventsUtils.createEventsManager();
  CarrierAgentTracker carrierAgentTracker = new CarrierAgentTracker(carriers, scenario.getNetwork(), new CarrierScoringFunctionFactory() {
    
    @Override
    public ScoringFunction createScoringFunction(Carrier carrier) {
      return getNoScoring();
    }
    
  });
  CarrierConfig carrierConfig = new CarrierConfig();
  carrierConfig.setPhysicallyEnforceTimeWindowBeginnings(true);
  FreightQSimFactory mobsimFactory = new FreightQSimFactory(scenario, events, carrierAgentTracker, carrierConfig);
  Mobsim mobsim = mobsimFactory.get();
  
  SnapshotGenerator visualizer = new SnapshotGenerator(scenario.getNetwork(), snapshotInterval, scenario.getConfig().qsim());
  visualizer.addSnapshotWriter(otfFileWriter);
  events.addHandler(visualizer);
  
  mobsim.run();
  
  visualizer.finish();
  otfFileWriter.finish();
}

org.matsim.core.events.algorithmsSnapshotGeneratoraddSnapshotWriter

Popular methods of SnapshotGenerator

  • <init>
  • finish
  • doSnapshot
  • getEventAgent
  • getVehiclePositions
  • reset
  • testForSnapshot

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Kernel (java.awt.image)
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ImageIO (javax.imageio)
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