Skip to content

Commit

Permalink
again debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Mar 4, 2024
1 parent 4f05a42 commit bb3974e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.LinkedHashMap;
import java.util.Map;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.events.Event;
import org.matsim.contrib.emissions.Pollutant;
import org.matsim.contrib.emissions.analysis.EmissionsByPollutant;
import org.matsim.contrib.emissions.events.ColdEmissionEvent;
Expand Down Expand Up @@ -78,15 +79,15 @@ public void reset(int iteration) {

@Override
public void handleEvent(WarmEmissionEvent event) {
handleEmissionEvent(event.getVehicleId(), event.getWarmEmissions());
handleEmissionEvent( event.getVehicleId(), event.getWarmEmissions(), event);
}

@Override
public void handleEvent(ColdEmissionEvent event) {
handleEmissionEvent(event.getVehicleId(), event.getColdEmissions());
handleEmissionEvent(event.getVehicleId(), event.getColdEmissions(), event);
}

private void handleEmissionEvent(Id<Vehicle> vehicleId, Map<Pollutant, Double> emissions) {
private void handleEmissionEvent(Id<Vehicle> vehicleId, Map<Pollutant, Double> emissions, Event event) {

EmissionsByPollutant emissionsByPollutant = new EmissionsByPollutant(emissions);

Expand All @@ -103,9 +104,10 @@ private void handleEmissionEvent(Id<Vehicle> vehicleId, Map<Pollutant, Double> e
// System.out.println("### vehicle2Pollutants " + vehicle2pollutants.get(vehicleId.toString()).toString());
// }

// if ( vehicle2pollutants.get(FREIGHT_REWE_VERBRAUCHERMARKT_TROCKEN_VEH_MEDIUM_18_T_ELECTRO_160444_1).get(Pollutant.CO).doubleValue() != tempValue.doubleValue()){
// System.out.println("JETZT wurde was modifiziert: " + time + "vehid: " + vehicleId + "; emissions: "+ emissions.toString());
// tempValue = vehicle2pollutants.get(FREIGHT_REWE_VERBRAUCHERMARKT_TROCKEN_VEH_MEDIUM_18_T_ELECTRO_160444_1).get(Pollutant.CO);
// }
if ( vehicle2pollutants.get(FREIGHT_REWE_VERBRAUCHERMARKT_TROCKEN_VEH_MEDIUM_18_T_ELECTRO_160444_1).getEmission(Pollutant.CO) != tempValue.doubleValue()){
System.out.println("JETZT wurde was modifiziert: " + "vehid: " + vehicleId + "; emissions: "+ emissions.toString());
System.out.println("EVENT:" + event.toString());
tempValue = vehicle2pollutants.get(FREIGHT_REWE_VERBRAUCHERMARKT_TROCKEN_VEH_MEDIUM_18_T_ELECTRO_160444_1).getEmission(Pollutant.CO);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class RunFoodEmissions2024 {

public static void main(String[] args) throws IOException {

final String runDirectory = "/Users/kturner/git-and-svn/shared-svn/projects/freight/studies/UpdateEventsfromEarlierStudies/foodRetailing_wo_rangeConstraint/71_ICEVBEV_NwCE_BVWP_10000it_DCoff_noTax"; //KMT
final String runDirectory = "/Users/kturner/git-and-svn/shared-svn/projects/freight/studies/UpdateEventsfromEarlierStudies/foodRetailing_wo_rangeConstraint/72_ICEVBEV_NwCE_BVWP_10000it_DCoff_Tax25"; //KMT
final String hbefaFileWarmDet = "original-input-data/HBEFA_summarized_final2.csv"; //TODO: In verschlüsselte Dateien integrieren und ins public SVN laden. DAbei nochmal auf Spalten achten. mMn ist hier emConcept und Technology verdreht -.-
//Tabelle mit Endung2 hat die Spalten korrigiert.

Expand Down

0 comments on commit bb3974e

Please sign in to comment.