jsten07 / cms_routing

Ship Routing Algorithms for Just-In-Time and Energy Efficient Voyages. By using a genetic algorithm we strive the lowest possible fuel consumption while at the same time keeping the scheduled deadlines. Two different specifications of the algorithm are available, one with a constant engine power, one with an over the route changeable engine power.
21 stars 11 forks source link

some parameter in prediction.py #3

Open lee-liew opened 2 years ago

lee-liew commented 2 years ago

Hi, bro, I have some questions about some parameter in "prediction.py " at advanced_scripts folder. From line 188~197:

timeGridE = SOG_E
constE = 70 / np.power(timeGridE, 3)
timeGridE80 = np.cbrt(80 / constE)
timeGridE60 = np.cbrt(60 / constE)
timeGridE = timeGridE[AOI[2]:AOI[3], AOI[0]:AOI[1]]
timeGridE80 = timeGridE80[AOI[2]:AOI[3], AOI[0]:AOI[1]]
timeGridE60 = timeGridE60[AOI[2]:AOI[3], AOI[0]:AOI[1]]
timeGridE = np.where(timeGridE < 0, 10000, (kmGridEW * 1000) / (timeGridE * 30.87))
timeGridE80 = np.where(timeGridE80 < 0, 10000, (kmGridEW * 1000) / (timeGridE80 * 30.87))
timeGridE60 = np.where(timeGridE60 < 0, 10000, (kmGridEW * 1000) / (timeGridE60 * 30.87))

Q1. What is 70 in "constE = 70 / np.power(timeGridE, 3) ", 80 in "timeGridE80 = np.cbrt(80 / constE)", and 60 in "timeGridE60 = np.cbrt(60 / constE)"?

Q2. What is 30.87 in "timeGridE = np.where(timeGridE < 0, 10000, (kmGridEW 1000) / (timeGridE 30.87))"?

Thanks a lot!

miguelcositis commented 1 year ago

@tnier01 @jsten07 @PondiB @njakuschona can you give us a hand with these doubts? thanks in advance and amazing work

njakuschona commented 1 year ago

Hallo @lee-liew and @miguelcha20,

thank you very much for the interests in our work. A small note beforehand: This project was developed as part of a study project at the University of Münster. The goal here was rather a proof of concept for the method than to get accurate results. But I will gladly explain how we came up with these parameters.

In general, the first step for us was to model the speed over ground for different weather conditions. We created a model, calculating this SOG, by using different variables, like Wave Height, Wind direction, Salinity. We did this for all cardinal directions. The input SOG_E here in line 188 is this model for travelling in the east direction. During our research, we found out that the most container ships are not using 100% of their engine power. Mostly they use 70% to 85% (https://doi.org/10.3141/2549-05). To allow our algorithm to use different engine loads, we wanted to calculate different SOG for different engine loads. Herewith we assumed that our initial SOG used 70% EP. The Formulate to calculate SOG to Engine Power is: Engine Power = constant * SOG^3 (https://www.wingd.com/en/documents/general/papers/engine-selection-for-very-large-container-vessels.pdf/). So in line 189 we calculate these constant for every grid cell and then in the following lines the SOG for an engine power of 80% and 60%. Actually, we do not want to know the SOG for each cell, but how much time the boat needs to travel through this cell in minutes. Therefore, we divide the real world length of each cell in meters by the speed in meters per minutes. Since the SOG was given in knots, we converted it in meters per minute by multiplying it with 30.87.

I hope the explanation helps you. If you have any further questions, please do not hesitate to contact us. We have also written a report about the whole project, which we could share if you are interested.