Hello guys, My data looks like this : I have four flights, and for each flight i have a segment. Segment means where i have a passengers. For example, for flight number 2, i have passengers in two segments, NYC-AMS and NYC-LON, i.e some passengers fly from NYC to AMS and others from NYC to LON. Capacity means maximum number of seats in aircraft. In other words the number of passengers cannot be more than the number of seats. For each station, AMS and LON, i have a total number of passengers. My goal is to divide the passengers between each segment. I want that the percent of passengers divided by capacity for each segment(NYC-AMS, NYC-LON) will be identical. For example, let's take NYC-AMS. There are two segments NYC-AMS, 150 passengers, because both segments have the same capacity, each segment will have 75 passengers. 75/166=0.4518 percent. Percent we get is identical for all NYC-AMS. Of course the capacity can be different. Another problem, that flight number two has another segment NYC-LON, i.e flight NYC-AMS-LON cannot be more than 166 seats. In other words, when you calculate passengers for segment NYC-AMS, you take into account also other segments. You cannot divide the number of passengers for each segment separately. To summarize, this problem has three conditions : 1. for each flight the number of passengers no more than the capacity 2. the total number of passengers for each segment is equal to total number of passengers in station. 3. as i told early, percent of passengers divided by capacity have to be identical for each segment. I will be very happy for your help to solve this task.
... View more