{ "cells": [ { "cell_type": "markdown", "id": "3ce77085-3338-46b2-8784-de1187f43f25", "metadata": {}, "source": [ "## Obstacle-Bypassing Esau-Williams (OBEW) example" ] }, { "cell_type": "markdown", "id": "10f37582-5d65-4a02-97c0-6d74eefe11e5", "metadata": {}, "source": [ "OBEW is a heuristic from *interarray* (*optiwindnet*'s predecessor). It takes in the raw location **L** and outputs the routeset **G**." ] }, { "cell_type": "code", "execution_count": 1, "id": "672c7061-abbf-4da0-9236-232dde141ac9", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.importer import load_repository\n", "from optiwindnet.svg import svgplot\n", "from optiwindnet.heuristics import OBEW\n", "from optiwindnet.interarraylib import calcload" ] }, { "cell_type": "markdown", "id": "92bfd6df-c545-48d2-b4d0-e69a1a6c473b", "metadata": {}, "source": [ "### Load Borkum Riffgrund 2" ] }, { "cell_type": "code", "execution_count": 2, "id": "51e1e821-a0ea-47c3-a197-4b625bbf3a3b", "metadata": {}, "outputs": [], "source": [ "locations = load_repository()" ] }, { "cell_type": "code", "execution_count": 3, "id": "41408572-c6d3-4e23-aab5-a8ae52c9a2d7", "metadata": {}, "outputs": [], "source": [ "L = locations.borkum2" ] }, { "cell_type": "code", "execution_count": 4, "id": "c3c0e36b-03b4-4640-b992-26c8dac8830a", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(L)" ] }, { "cell_type": "markdown", "id": "c7d1dd72-c13b-4454-8754-9098e2faf9a8", "metadata": {}, "source": [ "### Optimize Borkum Riffgrund 2" ] }, { "cell_type": "code", "execution_count": 5, "id": "3d594b43-7577-4f04-99d8-2d369dc95d30", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 58916.0 m(+1) OSS: 10κ = 6, T = 52" ], "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "G = OBEW(L, capacity=6, rootlust='0.6*cur_capacity/capacity')\n", "calcload(G)\n", "svgplot(G)" ] }, { "cell_type": "code", "execution_count": 6, "id": "b3122f33-df88-4357-9383-161c2db9f7aa", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 58275.0 m(+2) OSS: 11κ = 6, T = 52" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "G = OBEW(L, capacity=6)\n", "calcload(G)\n", "svgplot(G)" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }