⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pump.html

📁 acm大赛题
💻 HTML
字号:
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [zhcn] (Win95; I) [Netscape]">
   <TITLE>1996 ACM ProPgmr Context, Pump Drop Estimator</TITLE>
<!SGML "ISO 8879:1986">
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<HR NOSHADE>
<CENTER>
<H1>
The 1996 ACM Professional Programmers Contest</H1></CENTER>

<CENTER>
<H2>
Pump Drop Estimator</H2></CENTER>

<CENTER>
<H3>
Input file: pump.in</H3></CENTER>
The Coastal Rescue Society is working to improve its performance in the
delivery of rescue equipment to vessels in distress. The most common configuration
for delivery includes a rescue/salvage pump along with a rescue kit containing
plugging/patching supplies, life preservers, food, water and flares. The
society has recently acquired a system for delivery of this equipment that
is designed to be dropped from a small airplane.
<CENTER></CENTER>

<CENTER><IMG SRC="pump1.gif" ></CENTER>


<P>The new system consists of two soft-sided containers with attached drogue
parachutes connected by a variable length tether. The first soft-sided
container is designed to house the rescue/salvage pump; the rescue kit
is placed in the second. The tether is a floatable line that can be adjusted
in length from 100 to 400 feet with a targeting mark attached to its center.
When dropping the system to a vessel in distress, the intention is to drop
the containers on a course into the wind so that the first one drops on
one side of the vessel and the other drops on the opposite side, with the
center of the tether on the vessel. The figure to the right roughly depicts
the system (without the parachutes) when properly deployed.

<P>The trick to properly deploying the system is to accurately estimate
when to drop the initial container so that the entire system can be deployed
to straddle the vessel in distress without hitting it and causing further
damage. Once the tether is across the vessel, the people on board can haul
in the containers to retrieve the rescue equipment.

<P>Factors associated with estimating the drop parameters are:
<DL>
<DT>
aircraft speed and altitude</DT>

<DD>
these will not vary during the drop</DD>

<DT>
wind speed and direction</DT>

<DD>
these will not vary during the drop</DD>

<DT>
vertical acceleration rate</DT>

<DD>
determined by gravity, drogue selectio and weight of containers</DD>

<DT>
horizontal drag factor</DT>

<DD>
determined by drogue selection and weight of containers</DD>

<DT>
terminal (maximum) vertical velocity</DT>

<DD>
determined by drogue selection</DD>

<DT>
tether length</DT>
</DL>
The drop approach (aircraft direction) will be into the wind to minimize
offline drift due to the wind and to simplify the calculation of surface
speed.

<P>Your task is to develop a tool that can be used to estimate, based on
the given drop parameters, the time and distance from a distressed vessel
that the system must be dropped to ensure that the tether properly straddles
the vessel. In addition to its use as an estimating tool, the solution
will be designed to be used in training pilots to learn about drop operations.
This will be supported by an interactive graphical display that provides
a time stepped plot of the system throughout its deployment.
<H3>
Input</H3>
Your solution must accept multiple input data sets. Each data set represents
a different set of drop parameters to be evaluated for a single drop attempt.
Each set begins with a line containing the data set identification in quotes
followed by a single line containing nine numbers: plot interval (in seconds),
aircraft speed (in knots), aircraft altitude (in feet), wind direction
(in degrees clockwise from north), wind speed (in knots), vertical acceleration
rate (in feet/second2), horizontal deceleration factor (unitless), terminal
vertical speed (in feet/second), and tether length (in feet). The input
will be contained in a file named <TT>pumpdrop.in</TT> located in the current
directory.

<P>The end of input is denoted by a data set identification of <TT>"Done"</TT>
not followed by any data.
<H3>
Notes on Estimation</H3>
In estimating vertical container speed, note that the force on the container
is proportional to its current vertical speed-the faster it is dropping,
the greater the retarding force. In particular, if we assume the vertical
speed of a container is v0 at time t = 0, then its speed at time t is given
by
<CENTER><IMG SRC="pumpeqn1.gif" ></CENTER>
where k is the ratio of vertical acceleration to terminal vertical speed
and a is the vertical acceleration. Horizontal speed of a container (relative
to the surface) may eventually match that of the wind, but initially equals
the speed of the airplane minus the speed of the wind (since it is in the
opposite direction). In particular, the speed of the container at time
t is given by
<CENTER><IMG SRC="pumpeqn2.gif" ></CENTER>
where w is the wind speed, p is the aircraft speed, and d is the horizontal
drag factor. The position of the first container is to be estimated using
notes 1 and 2 above. The position of the second container is to be similarly
estimated. Then, if necessary, its position is to be adjusted so that the
distance between the containers is not greater than the length of the tether,
keeping the angle between the tether and the surface constant. The center
of the tether should always be estimated to be on a straight line halfway
between the two containers. The time when the first container is dropped
should be calculated so that it will land before the vessel at a distance
equal to half the length of the tether. A knot is a rate of one nautical
mile per hour, or approximately 1.688 feet per second.
<H3>
Sample Input</H3>

<PRE>"Case 1"
0.5 150 500 045 10 32.1 0.1 100 300
"Done"</PRE>
Line 1 of the sample input contains the data set identification for the
data set to be analyzed. Line 2 provides the data for the drop parameters.
They specify that the graphical plot will include displays at half-second
intervals, the aircraft has a velocity of 150 knots and an altitude of
500 feet during the drop, and the wind is from 45 degrees at 10 knots.
The containers will accelerate at 32.1 feet/second2 vertically and the
horizontal drag factor is 0.1. The maximum vertical velocity is 100 feet
per second and the tether has been adjusted to 300 feet in length. Line
3 of the sample input contains the end of input sentinel <TT>"Done"</TT>.
Output The output for your solution consists of lines in an output file
and an interactive graphical display of the simulated results for each
data set. File output will be placed in a file named <TT>pumpdrop.out</TT>
in the current directory. Desired output for the sample input is shown
below: The case identification information precedes the header which includes
the wind direction (no fractional digits), aircraft speed (in feet per
second; two fractional digits), the distance from the distressed vessel
at which the first container is dropped (one fractional digit), and the
time required for the first container to reach the surface (two fractional
digits). Each of the lines after the header includes the time (in seconds)
after the drop and pairs giving the horizontal and vertical distance from
the distressed vessel of the first container, middle of the tether, and
the second container. These values are to be displayed with one fractional
digit.
<H3>
Sample Output</H3>

<PRE>==================================================
Case 1
==================================================
Drop Run 45 Degrees @ 236.29 fps
Estimated Drop Advance 1396.0 at time T - 7.87 secs
Time&nbsp;&nbsp; (Start X,Y)&nbsp;&nbsp;&nbsp;&nbsp; (Mid X,Y)&nbsp;&nbsp;&nbsp;&nbsp; (End X,Y)
==================================================
0.0&nbsp;&nbsp; (-1396.0,500.0)&nbsp;&nbsp;&nbsp; (-1396.0,500.0)&nbsp;&nbsp;&nbsp; (-1396.0,500.0)
0.5&nbsp;&nbsp; (-1280.9,496.2)&nbsp;&nbsp;&nbsp; (-1279.4,498.1)&nbsp;&nbsp;&nbsp; (-1277.8,500.0)
1.0&nbsp;&nbsp; (-1171.9,485.5)&nbsp;&nbsp;&nbsp; (-1165.8,492.8)&nbsp;&nbsp;&nbsp; (-1159.7,500.0)
1.5&nbsp;&nbsp; (-1068.6,469.0)&nbsp;&nbsp;&nbsp; (-1055.1,484.5)&nbsp;&nbsp;&nbsp; (-1041.5,500.0)
2.0&nbsp;&nbsp; (-970.8,447.6)&nbsp;&nbsp;&nbsp; (-947.1,473.8)&nbsp;&nbsp;&nbsp; (-923.4,500.0)
2.5&nbsp;&nbsp; (-878.1,421.9)&nbsp;&nbsp;&nbsp; (-841.7,460.9)&nbsp;&nbsp;&nbsp; (-805.2,500.0)
3.0&nbsp;&nbsp; (-790.4,392.6)&nbsp;&nbsp;&nbsp; (-738.7,446.3)&nbsp;&nbsp;&nbsp; (-687.1,500.0)
3.5&nbsp;&nbsp; (-707.4,360.2)&nbsp;&nbsp;&nbsp; (-638.2,430.1)&nbsp;&nbsp;&nbsp; (-568.9,500.0)
4.0&nbsp;&nbsp; (-628.8,325.3)&nbsp;&nbsp;&nbsp; (-539.8,412.6)&nbsp;&nbsp;&nbsp; (-450.8,500.0)
4.5&nbsp;&nbsp; (-554.5,288.0)&nbsp;&nbsp;&nbsp; (-446.0,391.6)&nbsp;&nbsp;&nbsp; (-337.5,495.2)
5.0&nbsp;&nbsp; (-484.2,248.9)&nbsp;&nbsp;&nbsp; (-374.2,350.9)&nbsp;&nbsp;&nbsp; (-264.1,452.8)
5.5&nbsp;&nbsp; (-417.7,208.2)&nbsp;&nbsp;&nbsp; (-306.0,308.3)&nbsp;&nbsp;&nbsp; (-194.3,408.4)
6.0&nbsp;&nbsp; (-354.9,166.1)&nbsp;&nbsp;&nbsp; (-241.5,264.3)&nbsp;&nbsp;&nbsp; (-128.0,362.4)
6.5&nbsp;&nbsp; (-295.6,122.9)&nbsp;&nbsp;&nbsp; (-180.5,219.0)&nbsp;&nbsp;&nbsp; (-65.4,315.2)
7.0&nbsp;&nbsp; (-239.6,78.6)&nbsp;&nbsp;&nbsp; (-122.9,172.8)&nbsp;&nbsp;&nbsp; (-6.1,266.9)
7.5&nbsp;&nbsp; (-186.7,33.5)&nbsp;&nbsp;&nbsp; (-68.4,125.7)&nbsp;&nbsp;&nbsp; (49.8,218.0)
8.0&nbsp;&nbsp; (-150.0,0.0)&nbsp;&nbsp;&nbsp; (-25.0,83.0)&nbsp;&nbsp;&nbsp; (99.9,165.9)
8.5&nbsp;&nbsp; (-150.0,0.0)&nbsp;&nbsp;&nbsp; (-9.8,53.3)&nbsp;&nbsp;&nbsp; (130.4,106.6)
9.0&nbsp;&nbsp; (-150.0,0.0)&nbsp;&nbsp;&nbsp; (-2.3,26.1)&nbsp;&nbsp;&nbsp; (145.4,52.2)
9.5&nbsp;&nbsp; (-150.0,0.0)&nbsp;&nbsp;&nbsp; (0.0,3.2)&nbsp;&nbsp;&nbsp; (149.9,6.3)
10.0&nbsp;&nbsp; (-150.0,0.0)&nbsp;&nbsp;&nbsp; (0.0,0.0)&nbsp;&nbsp;&nbsp; (150.0,0.0)
Drop Complete

==================================================
All Data Sets Complete
==================================================</PRE>

<H3>
Sample Interactive Graphical Display</H3>

<CENTER><IMG SRC="pump2.gif" ></CENTER>


<P>The interactive graphical display as shown to the right consists of
a form with three frames or designated areas on the screen. The Echo Input
area will include a scrollable list box which echoes the information from
the input file. The Echo Output area will include a scrollable list box
which echoes the information included in the output file. The Plot Area
contains a graphical depiction of the drop scenario scaled to (2000 feet
to +500 feet horizontally by +1500feet to (100 feet vertically with horizontal
and vertical axes plotted as shown.

<P>The plot for the deployed system shall clearly display the two containers,
the tether line, and its midpoint.

<P>You must include an INIT button to activate program setup and initialization
functions, a NEXT button to activate processing and display of the next
(or first) data set, and a DONE button to clean up program functions and
exit. The plot for each data set must remain visible until the NEXT or
DONE button is clicked.&nbsp;
<HR NOSHADE>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -