Skip to content

Commit

Permalink
doc upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
Bancie committed Aug 28, 2024
1 parent b61ed84 commit e24729c
Show file tree
Hide file tree
Showing 17 changed files with 95 additions and 23 deletions.
84 changes: 73 additions & 11 deletions docs/api-reference/in-job/i-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<span style="color:#ffde59;">show_mytime</span>(*list, due date*)

Expand All @@ -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:

<figure markdown="span">
![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" }
<figcaption>List example.</figcaption>
</figure>

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. |
<table>
<thead>
<tr>
<th style="width: 200px; text-align: center;">Column position</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">The first column</td>
<td>Indicates the job name.</td>
</tr>
<tr>
<td style="text-align: center;">The second column</td>
<td>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 <em>minutes</em>, 12 <em>pages</em> for reading,...)</td>
</tr>
<tr>
<td style="text-align: center;">The third column</td>
<td>Details the release time of each job. For example, Job 1 is released on day 0.</td>
</tr>
<tr>
<td style="text-align: center;">The fourth column</td>
<td>Specifies the due date of each job. For example, Job 1 is due on day 30.</td>
</tr>
<tr>
<td style="text-align: center;">The last column</td>
<td>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). 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.</td>
</tr>
</tbody>
</table>

### 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
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]
```
Binary file added docs/api-reference/in-job/job-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/api-reference/in-job/job-example-white.png
Binary file not shown.
Binary file added docs/api-reference/in-job/job-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/api-reference/in-job/job_example.png
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/api-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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).
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).
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ hide:
</li>
<br>
<li>
<strong><a href="tutorial/">Tutorials</a></strong><br>
<strong><a href="user-guide/">User Guide</a></strong><br>
<p class="list-item-content">This document categorizes all the problems, detailing their foundational concepts, relevant materials, and solutions.</p>
</li>
<br>
Expand Down
8 changes: 8 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
2 changes: 1 addition & 1 deletion docs/tutorial/index.md → docs/user-guide/index.md
Original file line number Diff line number Diff line change
@@ -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)$
Expand Down
18 changes: 10 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit e24729c

Please sign in to comment.