Tabnine Logo
EngineInformation
Code IndexAdd Tabnine to your IDE (free)

How to use
EngineInformation
in
org.matsim.vehicles

Best Java code snippets using org.matsim.vehicles.EngineInformation (Showing top 3 results out of 315)

origin: matsim-org/matsim

private void writeTypes(BufferedWriter writer)throws IOException {
  writer.write("\t<vehicleTypes>\n");
  for(CarrierVehicleType type : vehicleTypes.getVehicleTypes().values()){
    writer.write("\t\t<vehicleType id=\"" + type.getId() + "\">\n");
    writer.write("\t\t\t<description>" + type.getDescription() + "</description>\n");
    EngineInformation engineInformation = type.getEngineInformation();
    if(engineInformation != null) writer.write("\t\t\t<engineInformation fuelType=\"" + engineInformation.getFuelType().toString() + "\" gasConsumption=\"" + engineInformation.getGasConsumption() + "\"/>\n");
    writer.write("\t\t\t<capacity>" + type.getCarrierVehicleCapacity() + "</capacity>\n");
    VehicleCostInformation vehicleCostInformation = type.getVehicleCostInformation();
    if(vehicleCostInformation == null) throw new IllegalStateException("vehicleCostInformation is missing.");
    writer.write("\t\t\t<costInformation fix=\"" + vehicleCostInformation.fix + "\" perMeter=\"" + vehicleCostInformation.perDistanceUnit + 
        "\" perSecond=\"" + vehicleCostInformation.perTimeUnit + "\"/>\n");
    writer.write("\t\t</vehicleType>\n");
  }
  writer.write("\t</vehicleTypes>\n\n");
}
origin: matsim-org/matsim

private void writeEngineInformation(EngineInformation ei) throws UncheckedIOException {
  this.writeStartTag(VehicleSchemaV1Names.ENGINEINFORMATION, null);
  this.writeStartTag(VehicleSchemaV1Names.FUELTYPE, null);
  this.writeContent(ei.getFuelType().toString(), false);
  this.writeEndTag(VehicleSchemaV1Names.FUELTYPE);
  atts.clear();
  atts.add(this.createTuple(VehicleSchemaV1Names.LITERPERMETER, Double.toString(ei.getGasConsumption())));
  this.writeStartTag(VehicleSchemaV1Names.GASCONSUMPTION, atts, true);
  this.writeEndTag(VehicleSchemaV1Names.ENGINEINFORMATION);
}
origin: matsim-org/matsim

assertEquals(23.23, vehType.getCapacity().getFreightCapacity().getVolume(), EPSILON);
assertNotNull(vehType.getEngineInformation());
assertEquals(EngineInformation.FuelType.diesel, vehType.getEngineInformation().getFuelType());
assertEquals(0.23, vehType.getEngineInformation().getGasConsumption(), EPSILON);
assertEquals(23.23, vehType.getAccessTime(), EPSILON);
assertEquals(42.42, vehType.getEgressTime(), EPSILON);
org.matsim.vehiclesEngineInformation

Most used methods

  • getFuelType
  • getGasConsumption

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now