/** * Compares events produced by java and by C++ simulation * @param personId TODO * @deprecated Use {@link #equals(Event,EventLog)} instead */ @Deprecated public static boolean equals(final Event personEvent, Id<Person> personId, final EventLog deqSimEvent) { return equals(personEvent, deqSimEvent); }
/** * Compare events to deq event file. The order of events must also be the * same. (this test will only succeed for simple tests with one car * often!!!) => reason: at junctions the order of cars can change + stuck * vehicles are dealt with in different ways */ protected void compareToDEQSimEvents(final String deqsimEventsFile) { LinkedList<Event> copyEventList=new LinkedList<Event>(); // remove ActStartEvent and ActEndEvent, because this does not exist in // c++ DEQSim for (int i=0;i<allEvents.size();i++){ if (!(allEvents.get(i) instanceof ActivityStartEvent || allEvents.get(i) instanceof ActivityEndEvent)){ copyEventList.add(allEvents.get(i)); } } ArrayList<EventLog> deqSimLog=CppEventFileParser.parseFile(deqsimEventsFile); for (int i=0;i<copyEventList.size();i++){ assertTrue("events not equal.", CppEventFileParser.equals(copyEventList.get(i), deqSimLog.get(i))); } }