diff --git a/docs/api-reference/in-job/i-job.md b/docs/api-reference/in-job/i-job.md index b62f4e01c..c5287c39c 100644 --- a/docs/api-reference/in-job/i-job.md +++ b/docs/api-reference/in-job/i-job.md @@ -5,7 +5,7 @@ hide: # tilearn.show_mytime !!! info - For a more in-depth understanding of the concept, you can check [here](../../tutorial/single-machine/completion/index.md#the-total-weighted-completion-time--show_mytime). + For a more in-depth understanding of the concept, you can check [here](../../user-guide/single-machine/completion/index.md#the-total-weighted-completion-time--show_mytime). ## tilearn.show_mytime(*list, due date*) @@ -20,21 +20,83 @@ hide: It represents a specific date and time and is crucial for scheduling purposes. The function will use this date to determine whether each job can be completed on time or if adjustments need to be made to meet this deadline. The due date should be formatted correctly to ensure accurate comparisons and calculations within the function. ### Notes + +The list is a key function that displays your job data. + +See the example below for more details: +
- ![alt text](job_example.png#only-light){ width="400" } - ![alt text](job-example-white.png#only-dark){ width="400" } + ![alt text](job-light.png#only-dark){ width="400" } + ![alt text](job-dark.png#only-light){ width="400" }
List example.
Explanation: -| Column position | Meaning | -| :----------: | ---------- | -| The first column | Indicates the job name. | -| The second column | Displays the quantity required to complete each job. For example, Job 1 requires 12 units to be finished. The unit type is not crucial; it is up to your discretion and it simply serves as a value for determining how weighty the job is. (e.g. 12 *minutes*, 12 *pages* for reading,...) | -| The third column | Details the release time of each job. For example, Job 1 is released on day 0. | -| The fourth column | Specifies the due date of each job. For example, Job 1 is due on day 30. | -| The last column | Exhibits the job’s weight (representing job’s priority value, you can assign weight values from 1 to 3 or 1 to 10, based on your judgment), if all jobs have equal priority, their weights would be 1. For example, the priority of Job 1 is 2. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Column positionMeaning
The first columnIndicates the job name.
The second columnDisplays the quantity required to complete each job. For example, Job 1 requires 12 units to be finished. The unit type is not crucial; it is up to your discretion and it simply serves as a value for determining how weighty the job is. (e.g. 12 minutes, 12 pages for reading,...)
The third columnDetails the release time of each job. For example, Job 1 is released on day 0.
The fourth columnSpecifies the due date of each job. For example, Job 1 is due on day 30.
The last columnExhibits the job’s weight (representing job’s priority value, you can assign weight values from 1 to 3 or 1 to 10, based on your judgment). The higher the priority value, the more important it is, if all jobs have equal priority, their weights would be 1. For example, the priority of Job 1 is 2.
+ +### Examples +Code Implementation: + +```py +import tilearn as tl + +data = [['Job 1', 4, 0, 10, 1], ['Job 2', 9, 0, 10, 3], ['Job 3', 6, 0, 10, 2], ['Job 4', 7, 0, 10, 3], ['Job 5', 4, 0, 10, 2], ['Job 6', 5, 0, 10, 1], ['Job 7', 8, 0, 10, 3], ['Job 8', 3, 0, 10, 1], ['Job 9', 2, 0, 10, 1], ['Job 10', 6, 0, 10, 2]] + +print(tl.show_mytime(data, 10)) +``` +*Output:* +```output +[['Job 5', 4, 0, 10, 2, 0.7407407407407407, 2.7], ['Job 9', 2, 0, 10, 1, 0.37037037037037035, 2.7], ['Job 4', 7, 0, 10, 3, 1.2962962962962963, 2.3142857142857145], ['Job 7', 8, 0, 10, 3, 1.4814814814814814, 2.025], ['Job 2', 9, 0, 10, 3, 1.6666666666666667, 1.7999999999999998], ['Job 3', 6, 0, 10, 2, 1.1111111111111112, 1.7999999999999998], ['Job 8', 3, 0, 10, 1, 0.5555555555555556, 1.7999999999999998], ['Job 10', 6, 0, 10, 2, 1.1111111111111112, 1.7999999999999998], ['Job 1', 4, 0, 10, 1, 0.7407407407407407, 1.35], ['Job 6', 5, 0, 10, 1, 0.9259259259259259, 1.08]] +``` + +To make the output more readable, you can adjust your code as shown below: +```py +schedule = tl.show_mytime(data, 10) -### Examples \ No newline at end of file +for row in schedule: + print(row) +``` +*Output:* +```output +['Job 5', 4, 0, 10, 2, 0.7407407407407407, 2.7] +['Job 9', 2, 0, 10, 1, 0.37037037037037035, 2.7] +['Job 4', 7, 0, 10, 3, 1.2962962962962963, 2.3142857142857145] +['Job 7', 8, 0, 10, 3, 1.4814814814814814, 2.025] +['Job 2', 9, 0, 10, 3, 1.6666666666666667, 1.7999999999999998] +['Job 3', 6, 0, 10, 2, 1.1111111111111112, 1.7999999999999998] +['Job 8', 3, 0, 10, 1, 0.5555555555555556, 1.7999999999999998] +['Job 10', 6, 0, 10, 2, 1.1111111111111112, 1.7999999999999998] +['Job 1', 4, 0, 10, 1, 0.7407407407407407, 1.35] +['Job 6', 5, 0, 10, 1, 0.9259259259259259, 1.08] +``` \ No newline at end of file diff --git a/docs/api-reference/in-job/job-dark.png b/docs/api-reference/in-job/job-dark.png new file mode 100644 index 000000000..edfb690cb Binary files /dev/null and b/docs/api-reference/in-job/job-dark.png differ diff --git a/docs/api-reference/in-job/job-example-white.png b/docs/api-reference/in-job/job-example-white.png deleted file mode 100644 index 4d5a8260f..000000000 Binary files a/docs/api-reference/in-job/job-example-white.png and /dev/null differ diff --git a/docs/api-reference/in-job/job-light.png b/docs/api-reference/in-job/job-light.png new file mode 100644 index 000000000..8fc34380b Binary files /dev/null and b/docs/api-reference/in-job/job-light.png differ diff --git a/docs/api-reference/in-job/job_example.png b/docs/api-reference/in-job/job_example.png deleted file mode 100644 index 57666eced..000000000 Binary files a/docs/api-reference/in-job/job_example.png and /dev/null differ diff --git a/docs/api-reference/index.md b/docs/api-reference/index.md index 50dfc2e34..24e6fddeb 100644 --- a/docs/api-reference/index.md +++ b/docs/api-reference/index.md @@ -11,7 +11,7 @@ hide: This reference manual offers an extensive overview of the functions, modules, and objects available in TiLearn. Each section thoroughly explains the components, including their definitions, functionalities, and practical applications within the library. -By exploring this manual, users can gain a clear understanding of how to utilize these elements effectively in their projects. For a more in-depth exploration of the underlying concepts and advanced usage examples, please refer to the [full tutorial](../tutorial/index.md). +By exploring this manual, users can gain a clear understanding of how to utilize these elements effectively in their projects. For a more in-depth exploration of the underlying concepts and advanced usage examples, please refer to the [full tutorial](../user-guide/index.md). ## Python API - [The Total (Weighted) Completion Time](#python-api) @@ -21,4 +21,4 @@ By exploring this manual, users can gain a clear understanding of how to utilize Significant portions of this manual are based on foundational texts in the field, including "Single Machine Scheduling" by Le Minh Huy and "Scheduling: Theory, Algorithms, and Systems" by Michael Pinedo. These sources provide the theoretical background and algorithms that underpin many of the scheduling concepts presented here. -The reference documentation within this manual, detailing the various functions, modules, and objects available in TiLearn, has been meticulously developed by the contributors and developers of TiLearn. Each entry has been carefully written to provide [comprehensive explanations](../tutorial/index.md), practical examples, and insights into how to effectively utilize these components within scheduling and optimization projects. For more advanced topics and extended examples, users are encouraged to consult the [full references](../getting-started/index.md#references). \ No newline at end of file +The reference documentation within this manual, detailing the various functions, modules, and objects available in TiLearn, has been meticulously developed by the contributors and developers of TiLearn. Each entry has been carefully written to provide [comprehensive explanations](../user-guide/index.md), practical examples, and insights into how to effectively utilize these components within scheduling and optimization projects. For more advanced topics and extended examples, users are encouraged to consult the [full references](../getting-started/index.md#references). \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index a3166bfdf..de16aa07d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -30,7 +30,7 @@ hide:
  • - Tutorials
    + User Guide

    This document categorizes all the problems, detailing their foundational concepts, relevant materials, and solutions.


  • diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 8019d0ee8..321daeb0f 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -144,4 +144,12 @@ ol.circle-list.alternating-colors li:nth-child(even)::before { background: linear-gradient(to right, #4050b5, #448ba2); /* Blue to Cyan gradient */ margin: 45px auto; /* Space around the separator */ width: 100%; /* Full width */ +} + +pre { + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ } \ No newline at end of file diff --git a/docs/tutorial/index.md b/docs/user-guide/index.md similarity index 96% rename from docs/tutorial/index.md rename to docs/user-guide/index.md index be827afec..062372053 100644 --- a/docs/tutorial/index.md +++ b/docs/user-guide/index.md @@ -1,4 +1,4 @@ -# How it works +# User Guide - The Maximum Lateness $\big(L_{\max}\big)$ - Independence jobs $\big(1 \: | \: \: | \: L_{\max}\big)$ - Release jobs $\big(1 \: | \: r_j \: | \: L_{\max}\big)$ diff --git a/docs/tutorial/single-machine/completion/index.md b/docs/user-guide/single-machine/completion/index.md similarity index 100% rename from docs/tutorial/single-machine/completion/index.md rename to docs/user-guide/single-machine/completion/index.md diff --git a/docs/tutorial/single-machine/completion/release.md b/docs/user-guide/single-machine/completion/release.md similarity index 100% rename from docs/tutorial/single-machine/completion/release.md rename to docs/user-guide/single-machine/completion/release.md diff --git a/docs/tutorial/single-machine/completion/sequence.md b/docs/user-guide/single-machine/completion/sequence.md similarity index 100% rename from docs/tutorial/single-machine/completion/sequence.md rename to docs/user-guide/single-machine/completion/sequence.md diff --git a/docs/tutorial/single-machine/lateness/index.md b/docs/user-guide/single-machine/lateness/index.md similarity index 100% rename from docs/tutorial/single-machine/lateness/index.md rename to docs/user-guide/single-machine/lateness/index.md diff --git a/docs/tutorial/single-machine/lateness/release.md b/docs/user-guide/single-machine/lateness/release.md similarity index 100% rename from docs/tutorial/single-machine/lateness/release.md rename to docs/user-guide/single-machine/lateness/release.md diff --git a/mkdocs.yml b/mkdocs.yml index 3cbcea415..93cbb75bb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,18 +5,20 @@ site_author: Bancie nav: - Home: index.md - Getting started: getting-started/index.md - - Tutorials: - - tutorial/index.md + - User Guide: + - user-guide/index.md - Single Machine: - Maximum Lateness: - - tutorial/single-machine/lateness/index.md - - Release jobs: tutorial/single-machine/lateness/release.md + - user-guide/single-machine/lateness/index.md + - Release jobs: user-guide/single-machine/lateness/release.md - Total Completion Time: - - tutorial/single-machine/completion/index.md - - Sequence jobs: tutorial/single-machine/completion/sequence.md - - Release jobs: tutorial/single-machine/completion/release.md + - user-guide/single-machine/completion/index.md + - Sequence jobs: user-guide/single-machine/completion/sequence.md + - Release jobs: user-guide/single-machine/completion/release.md #- Building from source: run/index.md - - API reference: api-reference/index.md + - API reference: + - api-reference/index.md + - tilearn.show_mytime: api-reference/in-job/i-job.md - About: about.md plugins: diff --git a/venv/lib/python3.12/site-packages/pygments/__pycache__/unistring.cpython-312.pyc b/venv/lib/python3.12/site-packages/pygments/__pycache__/unistring.cpython-312.pyc index 7937e1310..e39ba61c7 100644 Binary files a/venv/lib/python3.12/site-packages/pygments/__pycache__/unistring.cpython-312.pyc and b/venv/lib/python3.12/site-packages/pygments/__pycache__/unistring.cpython-312.pyc differ diff --git a/venv/lib/python3.12/site-packages/pygments/lexers/__pycache__/python.cpython-312.pyc b/venv/lib/python3.12/site-packages/pygments/lexers/__pycache__/python.cpython-312.pyc index caec7f1a2..a646ce540 100644 Binary files a/venv/lib/python3.12/site-packages/pygments/lexers/__pycache__/python.cpython-312.pyc and b/venv/lib/python3.12/site-packages/pygments/lexers/__pycache__/python.cpython-312.pyc differ