程序代写代做代考 algorithm graph flex Java C A Simulation Task: (40 pts.)

A Simulation Task: (40 pts.)
Create a simulation that models the behavior of Delivery Drones, moving packages within a delivery map area.
Packages
• Each uniform package has a pick-up and drop-off location, plus a weight in
Kg.
• The package weight cannot exceed the cargo capacity of the drone.
• Each package has a pick-up (departure) location, and a destination
(arrival) location.
• Moving a package incurs cost (freight movement).
o Moving a 1 Kg to a neighboring horizontal or vertical cell incurs
a $1.00 cost
o Moving a 1 Kg diagonally to a neighboring cell incurs a $1.50
cost.
o Hovering in place incurs a $0.75 per Kg.
Drones
Delivery Map
• Each Drone can deliver one or more packages, with weight restrictions.
• A drone has a delivery weight limit that must not be exceeded in flight.
• Drone movement should be governed by a movement Rule class
• Assume that a drone’s actions can be controlled remotely
• Drones navigate via a two dimensional array of location cells.
• For safety, only one drone may occupy a cell location cell at a time.
• Start with a small 8×8 sized area for development testing. Expand the
array size later when you are confident in the simulation execution.
• Some cells may be “occupied” by fixed or moving entities that block
regular movement of your drone.
• A drone may stop at a fixed recharge station, and it does not incur any
cost to operate.
Simulation
• Create a run() method that starts your simulation loop. Your loop may end
after a fixed number of cycles, or if all packages have been delivered.

• Your simulation should have a list of packages and the status should be maintained (i.e. awaiting pick-up, in-transit, delivered).
• A time cycle in your simulation should move each delivery drone up to 1 cell (horizontally, vertically, or diagonally), based on a movement rule.
• A pick-up or drop-off action requires a 1-cycle of hover, but this does not incur a freight charge
• Your simulation should advance by a unit amount of time, and should be able to produce data (drone positions, cost, and package delivery status) on a periodic basis. Think about producing a stream of data that needs to be analyzed, rather than a final answer.
• Your simulation should support at least three movement rule options with differing movement algorithms. Multiple classes should be preferred over a single “do-all” class.
Simulation Questions
• Where should statistics be gathered? How can they be analyzed?
• What is the actual cost to deliver each package?
• How many drones can be used to increase the speed of delivery before
the airspace becomes too congested?
• Can each delivery path be recorded and/or scored for cost?
• What happens if other unrelated aircraft are moving through the delivery
space, occupying cells?
• How do you decide when to pick up a package and in what order they
should be retrieved?
• Can new packages be added to the delivery list during the simulation run?
Notes
• This is the first portion (part A) of a multi-part assignment. The simulation
should be mostly completed within two weeks. It may be further refined
and enhanced during the following couple of weeks. The ability to produce
good data is paramount. The initial due date is just a target completion
date for Part A, but the code will not be submitted until the entire project is
complete. The final due date will shift back two weeks as other parts are
discussed.
• Think about your design before writing any code. You can fix it later, but
it’s much easier to start with a good notional design.
• Identify areas where design flexibility is needed and use appropriate
classes (interfaces, inheritance, etc.) where needed.
• Wisely choose names for classes and variables. Would someone else be
able to take over and maintain your code?

• Ensure that your code is well documented (JavaDocs, comments, etc.), and has a clean and simple design.
Part B Diagram Task: (20 pts.)
• Generate 1-2 Use Cases that explains a significant user operation in your
DD application
• Draw a sequence diagrams for your DD application which corresponds to
your selected use case
o Choose an operation to diagram (startup, rule selection,
execution, early termination, etc.)
o Show User actions or triggers
o Show major classes or areas of responsibility (i.e. DD
Simulation, Rendering, etc.)
o Properly note concurrent operations
o Draw the diagram yourself. Don’t use an advanced software
tool.
Part C User Interface Task: (60 pts.)
• Extend from the DDApp abstract class and make your own User Interface
application (You may use the code provided in DDApp.jar as a starting
point)
• Add a ComboBox or other mechanism to select an available rule (have at
least three distinct rules)
• Add a start button to generate a full simulation, and a stop button for early
processing termination (add other options as desired)
• Display the progress/results of your DD simulation onto a graphical panel
display