You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@marcengelmann Until now only the_ First Class Passenger_ number (first element in tree) is calculated based on the load factor. Do you've any idea why? tc.getAvailableSeats() and tc.getLoadFactor() aren't zero but numberPax returns zero.
privatevoidupdateTravelClassProperties() {
for (TravelClasstc : cabin.getClasses()) {
// set number of seatsintnumberSeats = ModelHelper.getChildrenByClass(tc, Seat.class).size();
tc.setAvailableSeats(numberSeats);
// calculate load factor and number of passengersif (tc.getPassengers() == 0 && tc.getLoadFactor() != 0){
intnumberPax = tc.getAvailableSeats()*tc.getLoadFactor()/100;
tc.setPassengers(numberPax);
}
else {
intloadFactor = tc.getPassengers()*100/tc.getAvailableSeats();
tc.setLoadFactor(loadFactor);
}
}
}
Either definition of number of passengers per seating class or load factor
The text was updated successfully, but these errors were encountered: