sebasanper / WINDOW2

Wind Farm Integrated Design and Optimisation Workflow
0 stars 1 forks source link

cable_cost_topology : list index out of range #3

Open ulyssepoline opened 6 years ago

ulyssepoline commented 6 years ago

Hi Sebasanper,

I am exploring your code and got this

File "/Users/ulysse/window/costs/investment_costs/BOS_cost/cable_cost/Cables_cost_topology.py", line 595, in savingsi for i in list(zip(*Wind_turbinesi))[0]:

IndexError: list index out of range

Did you also have this issue? thanks!

sebasanper commented 6 years ago

Hi Ulysse,

Yes, that module was implemented by someone who left our department a while ago, and definitely needs some reworking. I use the code as is and don't understand it entirely.

Nevertheless, that error you mention tends to happen (although I can't exactly explain why) in two scenarios. First, when the list of cable types (by capacity) is not in the right order, or contains only zeros. The cable capacities have to be given in ascending order, BUT the zeros have to be at the end. Second, it happens when the number of turbines is small compared to the number of offshore substation. This makes sense, because it might be that all the turbines are closest to the same substation, and then there are none left to be connected to other substations.

I suggest thus that you increase the number of turbines, or bring down the number of substations to 1, and double check the array with cable capacities.

Let me know if I can be of more help. My email address is s.sanchezperezmoreno@tudelft.nl

Best wishes,

Sebastian

sebasanper commented 6 years ago

Any luck?

ulyssepoline commented 5 years ago

Thank you so much for this explanation.

I will revert to you later as I will soon have time to dig into it.

Best,