Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem of computation for EN-ROUTE phase #1

Open
GGurtner opened this issue Mar 12, 2024 · 1 comment
Open

Problem of computation for EN-ROUTE phase #1

GGurtner opened this issue Mar 12, 2024 · 1 comment

Comments

@GGurtner
Copy link

I tried to build the following function:

cost_function = get_tactical_delay_costs(aircraft_type="A320", flight_length=800, flight_phase_input="EN-ROUTE",
                                         passenger_scenario="BASE", passengers_number=170)

When called, this function returns:


File ~/Documents/DelayCostFunction/DelayCostFunction/CostPackage/TacticalDelayCosts/tactical_delay_costs.py:275, in get_tactical_delay_costs.<locals>.<lambda>(delay)
    272     print(print(f"An unexpected exception occurred: {e}"))
    274 finally:
--> 275     return lambda delay: maintenance_costs(delay) + crew_costs(delay) + passengers_costs(delay) + curfew_costs(
    276         delay)

NameError: free variable 'maintenance_costs' referenced before assignment in enclosing scope

Maybe a bug? Or something in input is wrong?

@L-B-C
Copy link
Owner

L-B-C commented Mar 12, 2024

Error in flight_phase_input, should be EN_ROUTE instead of EN-ROUTE (at the moment underscore syntax is used instead of dash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants