( JAVA ) (ps: if I can get a quick reply, I will be veryhappy) There are a number of cities in the c

( JAVA ) (ps: if I can get a quick reply, I will be veryhappy) There are a number of cities in the country and each city isneighbor to one or more of the other cities. There is a map whichcontains the distances between each city. (If two cities are notneighbors, the distance is infinite.) You have a number of trucksto carry a number of cargos. A truck has a weight capacity and avolume capacity. A cargo contains some goods supposed to be takenfrom one city to another. Each cargo has a certain weight andvolume. Assume that your drivers are crazy and moving everyday fromone city to one of its neighbor cities randomly. If a truck arrivesat a city where there is a cargo to be delivered and the truck hasenough empty space (in terms of weight and volume) it takes thecargo. If a truck arrives at a city to where there is a cargo onthe truck to be delivered, the truck simply delivers the cargo andcollects the cargo charge. If two trucks arrive in the same city ona day, they can exchange their cargos in any way as long as thecapacity constraints are not violated. As the owner of the cargocompany, you want to simulate the system to collect somestatistical information. You want to collect the followingdata: ?The total number of cargos that has been deliveredsuccessfully. ?The average time of service ( time of service = the day thecargo is requested – the day it is delivered ) ?The average time of delivery(time of delivery = the day thecargo is taken- the day it is delivered) ?Total money spent for fuel. The money spent for fuel for each truck = LPK * MPL * d where dis the distance taken MPL is a constant denoting the money per liter of fuel and LPK =LPK0*(1+ W/1000) where W is the weight of the currently loadedcargo and LPK0 is a constant denoting liter per kilometer. ?Total money collected The money collected from a cargo = C0 + UCCw*W+ UCCv*V where C0 is constant charge per cargo, UCCw is constant chargeper weight, UCCv is constant charge per volume, W is the weight ofthe cargo and V is the volume of the cargo. ?Total distance taken ?Average money for fuel per kilometer (Total money/Totaldistance) ?The current city of each truck ?The current cargo load of each truck (# of cargo, Total weightand volume) ?Total distance taken by each truck ?Total money collected by each truck Model the system described above in an Object-Oriented way.Implement necessary classes. Assume that all of the trucks areidentical (The same capacity). Start simulation as each of thetrucks are empty and randomly placed at a different city. Youshould simulate the system day by day. Display all of theinformation during the simulation day by day. (You are free todisplay in any format. Try to make it as user-friendly as possible)You can implement any kind of exchange cargo policy (taking placewhen two trucks arrives in the same city on the same day) . Printout the final data after the simulation to a text file named ascargoOutput.txt. You are strongly encouraged to use interfaces and other possibletechniques to make the system as flexible and easy-to-maintain aspossible. Your simulation method (wherever it is) should take the name ofthe input file as parameter. Call the simulation method from themain() function of Main class. The format for the input file (a text file) containing the datanecessary for the simulation is as follows : [The # of cities] [Name s of the cities] . . [The # of neighborhoods] [The name of City 1] [The name of City2] [The distance betweenCity 1 and City 2] . . [Number of trucks] [Weight capacity of trucks] [Volume capacityof trucks] [LPK0] [MPL][C0][UCCw][UCCv] [The # of days to be simulated] [The # of cargo requests] [The time (day) of the cargo request] [From][To][Weight][Volume] . . See the example input file below: 5 Izmir Istanbul Ankara Trabzon Adana 7 Izmir Istanbul 600 Istanbul Ankara 400 Ankara Trabzon 600 Ankara Adana 500 Izmir Adana 800 Izmir Ankara 600 Istanbul Trabzon 1000 3 100 300 0.04 4.5 3 1.2 1.3 50 10 6 Istanbul Izmir 50 100 9 Izmir Ankara 30 50 15 Trabzon Adana 20 200 16 Adana Ankara 10 50 17 Ankara Adana 70 100 28 Istanbul Izmir 30 60 30 Ankara Izmir 50 50 35 Ankara Istanbul 40 30 40 Istanbul Trabzon 10 40 42 Adana Trabzon 30 20 ( JAVA ) . . .

 

"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"