Codota Logo
VisLink.getVisData
Code IndexAdd Codota to your IDE (free)

How to use
getVisData
method
in
org.matsim.vis.snapshotwriters.VisLink

Best Java code snippets using org.matsim.vis.snapshotwriters.VisLink.getVisData (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

@Override
public void writeDynData(ByteBuffer out) throws IOException {
  out.putFloat((float)0.) ; 
  positions.clear();
  this.src.getVisData().addAgentSnapshotInfo( positions);
  if (showParked) {
    out.putInt(positions.size());
    for (AgentSnapshotInfo pos : positions) {
      writeAgent(pos, out);
    }
  } else {
    int valid = 0;
    for (AgentSnapshotInfo pos : positions) {
      if (pos.getAgentState() != AgentState.PERSON_AT_ACTIVITY)
        valid++;
    }
    out.putInt(valid);
    for (AgentSnapshotInfo pos : positions) {
      if (pos.getAgentState() != AgentState.PERSON_AT_ACTIVITY)
        writeAgent(pos, out);
    }
  }
}
origin: matsim-org/matsim

private void doSnapshot(final double time, VisMobsim visMobsim) {
  if (!this.snapshotWriters.isEmpty()) {
    Collection<AgentSnapshotInfo> positions = new ArrayList<AgentSnapshotInfo>();
    for (VisLink link : visMobsim.getVisNetwork().getVisLinks().values()) {
      link.getVisData().addAgentSnapshotInfo(positions);
    }
    
    // We do not put non-network agents in movies.
    // Otherwise, we would add snapshots from visMobsim.getNonNetworkAgentSnapshots() here.
    
    for (SnapshotWriter writer : this.snapshotWriters) {
      writer.beginSnapshot(time);
      for (AgentSnapshotInfo position : positions) {
        writer.addAgent(position);
      }
      writer.endSnapshot();
    }
  }
}
origin: matsim-org/matsim

Collection<AgentSnapshotInfo> positions = new LinkedList<AgentSnapshotInfo>();
for(VisLink qlink : simulationView.getVisNetwork().getVisLinks().values()) {
  qlink.getVisData().addAgentSnapshotInfo(positions);
org.matsim.vis.snapshotwritersVisLinkgetVisData

Popular methods of VisLink

  • getLink
  • getAllVehicles

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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