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

max payload tweak + follow-ups #97

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/IO/read_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,16 @@
pax = readmis("pax")
exitlimit = readmis("exit_limit")
despax = pax[1] #Design number of passengers
if despax > maxpax
error("Design mission has higher payload weight than maximum aircraft payload!")
elseif despax > exitlimit
error("Design mission has higher # of passengers than the exit limit!")

if any(maxpax .< pax)
error("One or more missions have higher payload than prescribed maximum aircraft payload!:"*

Check warning on line 150 in src/IO/read_input.jl

View check run for this annotation

Codecov / codecov/patch

src/IO/read_input.jl#L150

Added line #L150 was not covered by tests
"\n Max Payload [in pax] = "*string(maxpax)*
"\n Payloads listed [in pax] = "*string(pax))
end
if any(exitlimit .< pax)
error("One or more missions have higher passenger counts than the prescribed exit limit!:"*

Check warning on line 155 in src/IO/read_input.jl

View check run for this annotation

Codecov / codecov/patch

src/IO/read_input.jl#L155

Added line #L155 was not covered by tests
"\n Exit limit [in pax] = "*string(exitlimit)*
"\n Payloads listed [in pax] = "*string(pax))
end

Wpax = Force(readmis("weight_per_pax"))
Expand Down
Loading