The program APS is the Reinforcement Learning based Model for Gantt Planning.
Time window scanner is used for solving scheduling problems.
This module requires the following modules:
- python=3.5(3.5.6)
- tensorflow-gpu==1.14.0 (install gpu version of tensorflow module)
- tensorflow==1.14.0 (install cpu version of tensorflow module)
- scipy==1.2.1
- pygame
- moviepy
- numpy==1.18.5
- pandas
- matplotlib
- PyCharm under version of 2020.1
In order to generate gif file, ImageMagik program is also required.
If you are using window OS ,
you should do some additional works follows...
In config_defaults.py , which has a directory :
C:\Users\user\Anaconda3\envs\'virtual_env_name'\Lib\site-packages\moviepy , change the code
IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect')
into
IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'C:\Program Files\ImageMagick-7.0.9-Q16\magick.exe')
ImageMagick-7.0.9-Q16
is the ImageMagik version you had installed.
You can either import schedule by target date or target projects
-
Setting target date
If you want to import training/test data by target date, you can simply send target_start_date and target_finish_date to work.py > import_schedule_by_target_date(filepath, target_start_date, target_finish_date)
import_schedule_by_target_date('../environment/data/191227_납기일 추가.xlsx', '20190201', '20190601')
-
Setting target projects
If you want to import training/test data by target projects, you can simply send target_projects to work.py > import_schedule_by_target_projects(filepath, target_projects)
import_schedule_by_target_projects('../environment/data/191227_납기일 추가.xlsx', [3095, 'R873'])
-
-
Time Window Size
In train.py > main function
window = (10, 40)
You can determine the size of Time Window which scans the total imported schedule
-
Learning Rate
In train.py > main function
trainer = tf.train.AdamOptimizer(learning_rate=1e-5)
A recommanded figure for learning rate is 1e-5
-
Discount Rate
In train.py > main function
gamma = .99 # discount rate for advantage estimation and reward discounting
A recommanded figure for discount rate is 0.99
-
Frequency of target model update(N-step bootstrapping)
In A3C Algorithm, each of Workers collects samples with its own environments. After a certain number of time-steps , target network(global network) is updated with that samples.
In train.py > Worker>work
if len(episode_buffer) == 30 and d != True and episode_step_count != max_episode_length-1: # in this case, frequency of target model update is 30 time-steps
-
Number of Threads
You can also set up number of threads by changing the number of Workers
In train.py > main function
num_workers = nultiprocessing.cpu.count() # Set workers to number of available CPU threads if num_workers > 8: num_workers = 8 workers = []
-