Skip to content

Commit

Permalink
Fix tardy rate estimate for static JSP instances
Browse files Browse the repository at this point in the history
  • Loading branch information
yura-hb committed Mar 24, 2024
1 parent 265c91e commit 32637ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ task:
n_threads: 8
debug: False
store_run_statistics: False
output_dir: 'results/jsp/experiments/dqn_path/runs/marl_direct_global_decomposed_tardiness'
output_dir: 'results/jsp/experiments/dqn_path/runs/marl_direct/global_decomposed_tardiness'

tasks:
- kind: 'multi_value'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ parameters:
action_selector:
kind: 'epsilon_greedy'
parameters:
epsilon: 0.1
epsilon: 0.4
min_epsilon: 0.01
decay_factor: 0.99
decay_steps: 50


__encoder__: ''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ task:
parameters:
prefix: 'all'
path: 'results/jsp/experiments/dqn_path/runs/marl_direct_surrogate_tardiness/7'

# - kind: 'static'
# parameters:
# scheduling: 'all'
Expand Down
4 changes: 2 additions & 2 deletions diploma_thesis/dispatch/initial_job_assignment/jsp_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ def make_jobs(self, shop_floor: ShopFloor, sampler: JobSampler):
job.processing_times = torch.tensor(processing_times, dtype=torch.float32)
job.processing_times = torch.atleast_2d(job.processing_times).T

job.with_due_at(job.processing_times.sum() * self.due_ratio)
job.with_due_at(shop_floor.now + job.processing_times.sum() + self.due_ratio * job_count)

yield job

@staticmethod
def from_cli(parameters: Dict):
return JSPStatic(path=parameters['path'], due_ratio=parameters.get('due_ratio', 4))
return JSPStatic(path=parameters['path'], due_ratio=parameters.get('due_ratio', 50))

2 changes: 1 addition & 1 deletion diploma_thesis/dispatch/job_sampler/static/no.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def sample(self, job_id: int, initial_work_center_idx: int, moment: float) -> Jo
event = Job.Event(kind=Job.Event.Kind.creation, moment=moment)
job = job.with_event(event)

return job.with_due_at(100000)
return job.with_due_at(1)

def sample_next_arrival_time(self) -> float:
return 0.0
Expand Down

0 comments on commit 32637ec

Please sign in to comment.