|
955 | 955 | } |
956 | 956 | ] |
957 | 957 | }, |
| 958 | + { |
| 959 | + "cell_type": "markdown", |
| 960 | + "metadata": { |
| 961 | + "id": "nGw3JHBKp1_J", |
| 962 | + "colab_type": "text" |
| 963 | + }, |
| 964 | + "source": [ |
| 965 | + "### **Plotting the Final Result**\n", |
| 966 | + "\n", |
| 967 | + "This plot shows 3 import facts about the final solution. \n", |
| 968 | + "\n", |
| 969 | + "\n", |
| 970 | + "1. The Horizontal Line shows the 4,500MB benchmark line\n", |
| 971 | + "2. The Zig Zag plot shows the Fitness of the Final Population\n", |
| 972 | + "3. The Red Cross (+) shows the position of the Optimum solution Generated\n", |
| 973 | + "\n", |
| 974 | + "\n", |
| 975 | + "\n" |
| 976 | + ] |
| 977 | + }, |
958 | 978 | { |
959 | 979 | "cell_type": "code", |
960 | 980 | "metadata": { |
961 | 981 | "id": "4DYhr1UnHHC0", |
962 | 982 | "colab_type": "code", |
963 | | - "outputId": "92020dc7-0ee6-41e1-8eb3-dc4d959413e6", |
| 983 | + "outputId": "47f29ba3-ce9d-403a-ef0c-bae7d765e9ad", |
964 | 984 | "colab": { |
965 | 985 | "base_uri": "https://localhost:8080/", |
966 | 986 | "height": 286 |
967 | 987 | } |
968 | 988 | }, |
969 | 989 | "source": [ |
970 | 990 | "plt.plot([x for x in range(popSize)],[finalSize[x] for x in range(len(finalSize))])\n", |
971 | | - "plt.plot([finalDuration.index(max(finalDuration))],[finalSize[finalDuration.index(max(finalDuration))]],'r+')\n", |
| 991 | + "plt.plot([Best_Solution_id],[Best_Solution_Size],'r+')\n", |
972 | 992 | "plt.plot([x for x in range(popSize)],[4500 for x in range(len(finalSize))])" |
973 | 993 | ], |
974 | | - "execution_count": 21, |
| 994 | + "execution_count": 32, |
975 | 995 | "outputs": [ |
976 | 996 | { |
977 | 997 | "output_type": "execute_result", |
978 | 998 | "data": { |
979 | 999 | "text/plain": [ |
980 | | - "[<matplotlib.lines.Line2D at 0x7f3903cc7a20>]" |
| 1000 | + "[<matplotlib.lines.Line2D at 0x7f390110c358>]" |
981 | 1001 | ] |
982 | 1002 | }, |
983 | 1003 | "metadata": { |
984 | 1004 | "tags": [] |
985 | 1005 | }, |
986 | | - "execution_count": 21 |
| 1006 | + "execution_count": 32 |
987 | 1007 | }, |
988 | 1008 | { |
989 | 1009 | "output_type": "display_data", |
|
0 commit comments