{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Single Machine Sample" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We start by importing the corresponding jobshop problem module as following :" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "import pyscheduling.SMSP.riwiCi as smsp_ri" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can either import the instance from a text file or randomly generate it." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "instance = smsp_ri.riwiCi_Instance.generate_random(50,Wmax=10,Pmin=1, Pmax=50,Alpha=100)\n", "instance.to_txt(\"deleteMe.txt\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, we use one of the implemented methods which are found in either **Heuristics** or **Metaheuristics** classes as following :" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "solution = smsp_ri.Heuristics.WSECi(instance)\n", "print(solution)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.12 ('pyscheduling')", "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.9.12" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "fa7cdbb78ab82d427a6b02c171e3c48e0658c2b720f18feff16576a8f3200f32" } } }, "nbformat": 4, "nbformat_minor": 2 }