Skip to content

[Add] : Job Sequence program under GREEDY methods #10482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Oct 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2320d90
to add job seq program
kosuri-indu Oct 15, 2023
3b3f3a8
to add job seq program
kosuri-indu Oct 15, 2023
83394f4
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
8bc4629
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
4a20527
to add definitions in parameters
kosuri-indu Oct 15, 2023
9663d5d
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
f6c1223
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
3aacb09
to add definitions in parameters
kosuri-indu Oct 15, 2023
4f30ae4
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
7fe25bf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
c220965
to add definitions in parameters
kosuri-indu Oct 15, 2023
349c324
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
58856c9
changes as recommended
kosuri-indu Oct 15, 2023
a036fd6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
688fd27
type hint error resolved
kosuri-indu Oct 15, 2023
0a651e4
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
37ad111
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
82877b3
removed lambda
kosuri-indu Oct 15, 2023
4697ade
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
f2ed330
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 15, 2023
148a08d
import stmts order
kosuri-indu Oct 15, 2023
c261d83
Merge branch 'add/job_seq.py' of https://github.com/kosuri-indu/Pytho…
kosuri-indu Oct 15, 2023
20f0dd0
Update and rename job_sequence.py to job_sequence_with_deadline.py
cclauss Oct 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 15, 2023
commit f2ed330f8c1352b045989de63398bfad0943b4da
3 changes: 2 additions & 1 deletion greedy_methods/job_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from dataclasses import dataclass
from operator import attrgetter


@dataclass
class Task:
task_id: Any
Expand All @@ -42,7 +43,7 @@ def max_tasks(tasks_info: list[tuple[int, int]]) -> list:
"""
tasks = [Task(i, d, p) for i, (d, p) in enumerate(tasks_info)]

tasks.sort(key=attrgetter('reward'), reverse=True)
tasks.sort(key=attrgetter("reward"), reverse=True)

schedule = [
task.task_id
Expand Down