{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "id": "bqloRXem8OGK" }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "#import tensorflow as tf\n", "import numpy as np\n", "import pandas as pd\n", "from sklearn.preprocessing import MinMaxScaler\n", "import sys\n", "import numpy as np\n", "import cplex\n", "from docplex.mp.model import Model" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "XfukWXOl8OGL" }, "outputs": [], "source": [ "# Data\n", "\n", "Dataset = pd.read_csv('../../../../Downloads/data_5060.csv',engine='python', usecols=[1,2,3], sep=',')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "tZx_mIke8OGM", "outputId": "b5122641-1468-4e50-cec2-ff54ce361d79" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:8: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \n", "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:5: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \"\"\"\n" ] } ], "source": [ "Dataset['hour'] = Dataset['hour']\n", "for i in range (len(Dataset['BS'])):\n", " if(Dataset['internet'][i] > Dataset['BS'][i]): \n", "# print(\"ici\")\n", " Dataset['internet'][i] = Dataset['internet'][i] \n", " else: \n", "# print(\"else\")\n", " Dataset['internet'][i] = 0\n", " \n", "Dataset['Anomaly'] = Dataset['internet']\n", "Dataset['Alpha'] =0" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1464" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(Dataset['Anomaly'])" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ilLKy6Mo8OGN", "outputId": "2d18128a-aecd-421d-ef94-b5d8a4a02ddc" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:6: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \n", "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:7: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " import sys\n", "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:3: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " This is separate from the ipykernel package so we can avoid doing imports until\n", "c:\\users\\afifi\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\ipykernel_launcher.py:4: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " after removing the cwd from sys.path.\n" ] } ], "source": [ "\n", "for i in range(len(Dataset['BS'])):\n", " if(Dataset['Anomaly'] [i] != 0):\n", " Dataset['internet'] [i] = Dataset['Anomaly'] [i] - Dataset['BS'][i]\n", " Dataset['Alpha'][i]=1\n", " else:\n", " Dataset['internet'] [i] = 0\n", " Dataset['Alpha'][i]=0\n", "Dataset['Backhauling'] = Dataset['internet']" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "id": "xYXLxLit8OGP" }, "outputs": [], "source": [ "hour=Dataset['hour'].values\n", "A_t=Dataset['Anomaly'].values\n", "B_t=Dataset['Backhauling'].values\n", "C_t=Dataset['BS'].values\n", "alphas=Dataset['Alpha'].values" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "uS3GE2d38OGP", "outputId": "ea83b3d4-df25-410b-8966-ef1cdee5d77a" }, "outputs": [ { "data": { "text/plain": [ "1464" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(Dataset)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "id": "DCKGcJzs8OGQ" }, "outputs": [], "source": [ "data = {}\n", "data['Hour'] = [hour[i] for i in range(len(hour))]\n", "data['Anomaly'] = [A_t[i] for i in range(len(A_t))]\n", "data['Backhauling'] = [B_t[i] for i in range(len(B_t))]\n", "data['BS'] = [C_t[i] for i in range(len(C_t))]\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "zaOT6hYm8OGR", "outputId": "1ae2f269-49c5-4db4-853c-7999c08a9708" }, "outputs": [ { "data": { "text/plain": [ "[1118.1988643698362,\n", " 986.2258541717653,\n", " 868.2004461292923,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 0.0,\n", " 800.2203397508282,\n", " 978.1661561822484,\n", " 1106.7659876216892,\n", " 1240.7172910379195,\n", " 1251.5090958292576]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data['Anomaly'][1024:1048]" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "id": "aXMikkFr8OGS" }, "outputs": [ { "data": { "text/plain": [ "array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,\n", " 1, 1], dtype=int64)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "alphas[1024:1048]\n", "\n" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "S2PhBaSx8OGS", "outputId": "6a2fb4ba-a30e-4cd6-f3ad-d8a0ee5e44e4" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0 0 24 0 0 0\n", "1 1 25 0 0 0\n", "2 1 26 0 0 0\n", "3 0 27 0 0 0\n", "4 0 28 0 0 0\n", "5 0 29 0 0 0\n", "6 0 30 0 0 0\n", "7 0 31 0 0 0\n", "8 0 32 0 0 0\n", "9 0 33 0 0 0\n", "10 0 34 0 0 1\n", "11 0 35 1 0 1\n", "12 1 36 1 0 1\n", "13 1 37 1 1 1\n", "14 1 38 1 1 1\n", "15 1 39 1 1 1\n", "16 1 40 1 1 1\n", "17 1 41 1 1 1\n", "18 1 42 1 1 1\n", "19 0 43 1 0 1\n", "20 0 44 0 0 0\n", "21 0 45 0 0 0\n", "22 0 46 0 0 0\n", "23 0 47 0 0 0\n" ] } ], "source": [ "#print(alphas[0:24])\n", "data[\"Backhauling\"][22]=2\n", "data[\"Backhauling\"][23]=2\n", "for i in range(24):\n", " print(i, alphas[i],i+24,alphas[i+24],alphas[i+48],alphas[i+144])" ] }, { "cell_type": "markdown", "metadata": { "id": "OpsHtT5M8OGT" }, "source": [ "### CPLEX" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "id": "ahjOJeyx8OGU" }, "outputs": [], "source": [ "import cplex as cpx\n", "import random\n", "import docplex.mp.model as cpx\n", "from docplex.mp.model import Model\n", "opt_model = cpx.Model(name=\"Drone Model\")" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0\n", "1\n", "2\n", "3\n", "4\n", "5\n", "6\n", "7\n", "8\n", "9\n", "10\n", "11\n", "12\n", "13\n", "14\n", "15\n", "16\n", "17\n", "18\n", "19\n", "20\n", "21\n", "22\n", "23\n" ] } ], "source": [ " for i in range(24):\n", " print (i)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ZLqJA7JZ8OGU", "outputId": "ba0389ba-e533-454c-ac07-3184b470cae0" }, "outputs": [], "source": [ "%%capture cap --no-stderr\n", "D_t_Low = 10\n", "D_t_Send=2 \n", "D_t_High = 100\n", "E_t_offload=5\n", "set_J = set_Jone = range(24)\n", "set_Z = range(1,23)\n", "set_P = range(0,23)\n", "set_N = range(0,24)\n", " \n", "\n", " \n", "for y in range(60): \n", " set_J = set_Jone = range(y,y+24)\n", " set_Z = range(y+1,y+23)\n", " set_P = range(y+0,y+23)\n", " set_N = range(y+0,y+24)\n", " opt_model = Model('Drone Model')\n", "\n", " chargingstate = {(i): opt_model.binary_var( name=\"chargingstate_{0}\".format(i)) for i in set_N} # state O\n", "\n", "\n", " alpha = {(i): opt_model.binary_var( name=\"alpha_{0}\".format(i)) for i in set_J} # send\n", " beta = {(i): opt_model.binary_var( name=\"beta_{0}\".format(i)) for i in set_J} # backhaul\n", " #gamma = {(i): opt_model.binary_var( name=\"gamma_{0}\".format(i)) for i in set_J} # back to charge\n", " rho = {(i): opt_model.binary_var( name=\"rho_{0}\".format(i)) for i in set_N} # idle\n", " kappa = {(i): opt_model.binary_var( name=\"kappa_{0}\".format(i)) for i in set_J} # idle\n", " helper= {(i): opt_model.binary_var( name=\"epsilon_{0}\".format(i)) for i in set_J} # idle\n", "\n", "\n", " alphabeta = {(i): opt_model.binary_var( name=\"ab_{0}\".format(i)) for i in set_J}\n", " alpharho = {(i): opt_model.binary_var( name=\"ag_{0}\".format(i)) for i in set_J}\n", " rhokappa = {(i): opt_model.binary_var( name=\"rk_{0}\".format(i)) for i in set_J}\n", " alpharho = {(i): opt_model.binary_var( name=\"ar_{0}\".format(i)) for i in set_J}\n", " betakappa = {(i): opt_model.binary_var( name=\"bk_{0}\".format(i)) for i in set_J}\n", " betarho = {(i): opt_model.binary_var( name=\"br_{0}\".format(i)) for i in set_J}\n", " gammarho = {(i): opt_model.binary_var( name=\"gr_{0}\".format(i)) for i in set_J}\n", " alphakappa = {(i): opt_model.binary_var( name=\"ak_{0}\".format(i)) for i in set_J}\n", " rhoD={(i): opt_model.continuous_var(lb=0.0, ub= opt_model.infinity, name=\"rhoD{0}\".format(i)) for i in set_J\n", " }\n", " kappaD={(i): opt_model.continuous_var(lb=0.0, ub= opt_model.infinity, name=\"kappaD{0}\".format(i)) for i in set_N\n", " }\n", "\n", "# D_t={(i): opt_model.continuous_var( lb=-20.0, ub= opt_model.infinity, name=\"D_t{0}\".format(i)) for i in set_J }\n", "\n", " #ERR constraints = {opt_model.add_constraint(D_t[0] == D_t_High ,ctname=\"constraint_{0}\")}\n", "\n", " #ERR constraints = { opt_model.add_constraint(chargingstate[0] == 1,ctname=\"constraint6_{0}\")}\n", "\n", " constraints = {j : opt_model.add_constraint(\n", " alpha[j]+beta[j] +rho[j] +kappa[j] == 1,\n", " ctname=\"constraint_{0}\".format(j)) for j in set_J}\n", "\n", " #### alphabeta\n", "\n", " constraints = {j : opt_model.add_constraint(alphabeta[j]<= alpha[j] ,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphabeta[j] <= beta[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphabeta[j]>= alpha[j] + beta[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphabeta[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", "\n", " #### alpharho\n", " constraints = {j : opt_model.add_constraint(alpharho[j]<= alpha[j] ,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alpharho[j] <= rho[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alpharho[j]>= alpha[j] + rho[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alpharho[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", " #### alphakappa\n", " constraints = {j : opt_model.add_constraint(alphakappa[j]<= alpha[j] ,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphakappa[j] <= kappa[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphakappa[j]>= alpha[j] + kappa[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(alphakappa[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", " #### betarho\n", " constraints = {j : opt_model.add_constraint(betarho[j]<= beta[j] ,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(betarho[j] <= rho[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(betarho[j]>= beta[j] + rho[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(betarho[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", " #### betakappa\n", " constraints = {j : opt_model.add_constraint(betakappa[j]<= beta[j] ,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", " constraints = {j : opt_model.add_constraint(betakappa[j] <= kappa[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(betakappa[j]>= beta[j] + kappa[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(betakappa[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", " #### rhoappa\n", " constraints = {j : opt_model.add_constraint(rhokappa[j] <= kappa[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", "\n", " constraints = {j : opt_model.add_constraint(rhokappa[j] <= rho[j],ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", "\n", " constraints = {j : opt_model.add_constraint(rhokappa[j]>= rho[j] + kappa[j] - 1,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints\n", " constraints = {j : opt_model.add_constraint(rhokappa[j] >= 0,ctname=\"constraint_{0}\".format(j))\n", " for j in set_J}# >= constraints\n", "\n", " constraints = {j : opt_model.add_constraint( rhokappa[j] >=0 ,ctname=\"constraint_{0}\".format(j)) \n", " for j in set_J}# >= constraints 8\n", "\n", "\n", " # replace 2\n", "# constraints = {j : opt_model.add_constraint( rhoD[j] <= D_t[j] ,ctname=\"constraint_{0}\".format(j)) \n", "# for j in set_J}# >= constraints 7 \n", " # replace 3\n", "# constraints = {j : opt_model.add_constraint( rhoD[j] >= D_t[j] - D_t_High*(1- kappa[j]) ,ctname=\"constraint_{0}\".format(j)) \n", "# for j in set_J}# >= constraints 6\n", " # replace 4\n", "# constraints = {j : opt_model.add_constraint( rhoD[j] >= 0 ,ctname=\"constraint_{0}\".format(j)) \n", "# for j in set_J}# >= constraints 5\n", "\n", "\n", " #1 KAPPA IF IN CELL STATE AND NO DATA NEXT TIME SLOT : RETURN\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " (chargingstate[j]+alphas[j+1]==0),kappa[j+1]==1),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}#\n", " eps=1e-3\n", "\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " chargingstate[j]==1,kappa[j+1]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", "\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " (kappa[j]==1),chargingstate[j+1]==1),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", "\n", "\n", "\n", " #1 ALPHA IF IN CELL STATE AND NO DATA NEXT TIME SLOT: CANNOT DO AN ALPHA\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " (chargingstate[j]==0),alpha[j+1]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " alphas[j+1]+chargingstate[j]<=1,alpha[j]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", " #1 IF IN CELL STATE : CANNOT DO AN ALPHA\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " (chargingstate[j]==0),alpha[j]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " chargingstate[j]+alphas[j+1]>=2,alpha[j]==1),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_J}\n", "\n", " #1 IF IN CHARGING STATE : CANNOT MAKE A BETA\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " (chargingstate[j]==1),beta[j]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", " #1 BETA IF IN CELL STATE AND DATA TIME SLOT : SEND DATA\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( (alphas[j]-chargingstate[j]==1),beta[j]==1),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}#\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " chargingstate[j]-alphas[j+1]==1,beta[j+1]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", "\n", "\n", "\n", " #2 IF IN CHARGING STATE AND THERE IS DATA NEXT SLOT: SEND DRONE\n", "\n", "\n", "\n", " #2 IF IN CHARGING STATE AND THERE IS DATA NEXT SLOT: NEW STATE IS CELL STATE\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " chargingstate[j]+alphas[j+1]>=2,chargingstate[j+1]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", "\n", "\n", "\n", " #2 IF IN CHARGING STATE AND THERE IS NO DATA NEXT SLOT: DO NOTHIN\n", "\n", " constraints = {j : opt_model.add_constraint(opt_model.if_then( \n", " alphas[j+1]-chargingstate[j]==1,chargingstate[j+1]==0),\n", " ctname=\"constraint_{0}\".format(j)) for j in set_P}\n", "\n", " \n", " objective = opt_model.sum(((beta[j])*(data[\"Backhauling\"][j]) \n", " for j in set_J))\n", " opt_model.maximize(objective)\n", " msol=opt_model.solve()\n", " Solution=opt_model.print_solution(all)\n", " # opt_model.print_solution()\n", " with open('./output.txt', 'a') as f:\n", " f.write(cap.stdout)\n", " f.close()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "id": "OnuAXlgn8OGV" }, "outputs": [], "source": [ " f.close()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "vMg8uFmz8OGW" }, "outputs": [], "source": [ " " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "OGoFcavp8OGW", "outputId": "94350fb2-0f7a-40fd-d1cc-2094e83ca3a9" }, "outputs": [], "source": [ " " ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "N7WQFqpz8OGX", "outputId": "72d2791d-66ae-4fec-dc83-682f6fc0ed73", "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "objective: 1107.639\n", " \"chargingstate_59\"=1\n", " \"chargingstate_60\"=1\n", " \"chargingstate_67\"=1\n", " \"chargingstate_68\"=1\n", " \"chargingstate_69\"=1\n", " \"chargingstate_70\"=1\n", " \"chargingstate_71\"=1\n", " \"chargingstate_72\"=1\n", " \"chargingstate_73\"=1\n", " \"chargingstate_74\"=1\n", " \"chargingstate_75\"=1\n", " \"chargingstate_76\"=1\n", " \"chargingstate_77\"=1\n", " \"chargingstate_78\"=1\n", " \"chargingstate_79\"=1\n", " \"chargingstate_80\"=1\n", " \"chargingstate_81\"=1\n", " \"alpha_60\"=1\n", " \"alpha_81\"=1\n", " \"beta_61\"=1\n", " \"beta_62\"=1\n", " \"beta_63\"=1\n", " \"beta_64\"=1\n", " \"beta_65\"=1\n", " \"beta_66\"=1\n", " \"beta_82\"=1\n", " \"rho_59\"=1\n", " \"rho_68\"=1\n", " \"rho_69\"=1\n", " \"rho_70\"=1\n", " \"rho_71\"=1\n", " \"rho_72\"=1\n", " \"rho_73\"=1\n", " \"rho_74\"=1\n", " \"rho_75\"=1\n", " \"rho_76\"=1\n", " \"rho_77\"=1\n", " \"rho_78\"=1\n", " \"rho_79\"=1\n", " \"rho_80\"=1\n", " \"kappa_67\"=1\n" ] } ], "source": [ "opt_model.print_solution()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "colab": { "name": "ILPHAACADEM_new_new.ipynb", "provenance": [] }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" } }, "nbformat": 4, "nbformat_minor": 1 }