Skip to content

Commit

Permalink
Final experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
yura-hb committed Apr 22, 2024
1 parent 9b2ccc5 commit 1890209
Show file tree
Hide file tree
Showing 97 changed files with 6,907 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ task:
- kind: 'surrogate_tardiness'
parameters:
winq_factor: 0.2
span: 64
span: 40
critical_level_factor: 128
- kind: 'global_decomposed_tardiness'
parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,352 @@
# Evaluate the effectivenes of basic DQNs on the JSP environment

template: &template 'baseline'
base_model: &base_model 'configuration/experiments/jsp/GRAPH-NN/machine.yml'
marl_model: &marl_model 'configuration/experiments/jsp/GRAPH-NN/marl_machine.yml'

graph: &graph
transition_model:
kind: 'base'
parameters:
forward:
kind: 'complete'

schedule:
kind: 'complete'

memory: 0
is_machine_set_in_work_center_connected: False
is_work_center_set_in_shop_floor_connected: False

default_mods: &default_mods []

###############################################################################################

dqn_1: &dqn_1
base_path: *base_model
template: *template
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- *default_mods

marl_dqn_2: &marl_dqn_2
base_path: *marl_model
template: *template
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'util/agent/multi_agent.yml'
- *default_mods


dqn_3: &dqn_3
base_path: *base_model
template: *template
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

marl_dqn_4: &marl_dqn_4
base_path: *marl_model
template: *template
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- 'util/agent/multi_agent.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

###############################################################################################

dqn_1_hierarchical: &dqn_1_hierarchical
base_path: *base_model
template: '1/hierarchical'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- *default_mods

marl_dqn_2_hierarchical: &marl_dqn_2_hierarchical
base_path: *marl_model
template: '1/hierarchical'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'util/agent/multi_agent.yml'
- *default_mods


dqn_3_hierarchical: &dqn_3_hierarchical
base_path: *base_model
template: '1/hierarchical'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

marl_dqn_4_hierarchical: &marl_dqn_4_hierarchical
base_path: *marl_model
template: '1/hierarchical'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- 'util/agent/multi_agent.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

###############################################################################################

dqn_1_vpt: &dqn_1_vpt
base_path: *base_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- *default_mods

marl_dqn_2_vpt: &marl_dqn_2_vpt
base_path: *marl_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'util/agent/multi_agent.yml'
- *default_mods


dqn_3_vpt: &dqn_3_vpt
base_path: *base_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

marl_dqn_4_vpt: &marl_dqn_4_vpt
base_path: *marl_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- 'util/agent/multi_agent.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

###############################################################################################

dqn_1_dj: &dqn_1_djsp
base_path: *base_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- *default_mods

marl_dqn_2_djsp: &marl_dqn_2_djsp
base_path: *marl_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'util/agent/multi_agent.yml'
- *default_mods


dqn_3_djsp: &dqn_3_djsp
base_path: *base_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- *default_mods
# - 'util/action_selector/sample.yml'

marl_dqn_4_djsp: &marl_dqn_4_djsp
base_path: *marl_model
template: '1/vpt'
mod_dirs:
- 'configuration/mods/machine/mods'
mods:
- 'agent/dqn/ddqn.yml'
- 'agent/dqn/prioritized.yml'
- 'agent/dqn/dueling.yml'
- 'util/agent/multi_agent.yml'
- *default_mods
# - 'util/action_selector/sample.yml'


###############################################################################################

reward: &reward
- kind: 'surrogate_tardiness'
parameters:
winq_factor: 0.2
span: 40
critical_level_factor: 128

##############################################################################################

# 8 runs

long_single_source_run: &long_single_source_run
parameters:
mods:
__inout_factory__:
- [ ['utilization/90.yml'] ]
nested:
parameters:
dispatch:
seed: [ [ 0 ] ]


###############################################################################################


task:
kind: 'multi_task'
n_workers: 4
n_threads: 10
debug: False
store_run_statistics: False
output_dir: 'results/jsp/experiments/2. GRAPH-NN/1. Graph State Encoding (DQN)/model/'

tasks:
- kind: 'multi_value'
parameters:
base:
name: 'model'
output_dir: '1'
log_stdout: False

machine_agent:
kind: 'mod'
parameters:
base_path: 'configuration/mods/machine_agent/model.yml'
mods: [ ]

work_center_agent:
kind: 'static'
parameters:
model:
kind: 'static'
parameters:
rule: 'et'
encoder:
kind: 'plain'

tape:
machine_reward:
kind: 'surrogate_tardiness'

work_center_reward:
kind: 'no'

simulator:
kind: 'td'
parameters:
memory: 4

graph:
*graph

run:
kind: 'mod'
parameters:
base_path: 'configuration/experiments/jsp/GRAPH-NN/run.yml'
mod_dirs:
- 'configuration/mods/run/mods'
mods:
- 'n_workers/1.yml'
nested:
parameters:
simulations:
- name: ''
kind: 'multi_value'
parameters:
base:
kind: 'mod'
parameters:
base_path: 'configuration/experiments/jsp/GRAPH-NN/simulation.yml'
mod_dirs:
- 'configuration/mods/simulation/mods'
mods: [ ]
values:
values:
__concat__:
- output_dir: 'Custom'
machine_agent:
parameters:
- *dqn_1
- *marl_dqn_2
- *dqn_3
- *marl_dqn_4
- output_dir: 'Hierarchical'
machine_agent:
parameters:
- *dqn_1_hierarchical
- *marl_dqn_2_hierarchical
- *dqn_3_hierarchical
- *marl_dqn_4_hierarchical
- output_dir: 'VPT'
machine_agent:
parameters:
- *dqn_1_vpt
- *marl_dqn_2_vpt
- *dqn_3_vpt
- *marl_dqn_4_vpt
- output_dir: 'DJSP'
machine_agent:
parameters:
- *dqn_1_djsp
- *marl_dqn_2_djsp
- *dqn_3_djsp
- *marl_dqn_4_djsp

tape:
machine_reward:
*reward

run:
parameters:
nested:
parameters:
simulations:
__0__:
parameters:
values:
__concat__:
- *long_single_source_run
Loading

0 comments on commit 1890209

Please sign in to comment.