Skip to content

Commit

Permalink
[Tests] Add fixture for example 2 job shop instance in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabloo22 committed Oct 9, 2024
1 parent 1a102f9 commit c5252c8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,30 @@ def example_job_shop_instance():
)
return instance

@pytest.fixture
def example_2_job_shop_instance():
# Cada máquina se representa con un id (empezando por 0)
m0 = 0
m1 = 1
m2 = 2

j0 = [
Operation(m0, duration=2),
Operation(m1, duration=2),
Operation(m2, duration=2),
]
j1 = [
Operation(m0, duration=1),
Operation(m1, duration=1),
Operation(m2, duration=1),
]
j2 = [
Operation(m0, duration=2),
Operation(m2, duration=3),
Operation(m1, duration=3),
]
return JobShopInstance([j0, j1, j2], name="Example 2")


@pytest.fixture
def irregular_job_shop_instance():
Expand Down

0 comments on commit c5252c8

Please sign in to comment.