JSSP.data module¶
-
class
JSSP.data.
Data
¶ Bases:
abc.ABC
Base class for JSSP instance data.
-
static
convert_fjs_to_csv
(fjs_file, output_dir)¶ Converts a fjs file into three csv files, jobTasks.csv, machineRunSpeed.csv, and sequenceDependencyMatrix.csv, then it puts them in the output directory.
Parameters: - fjs_file (Path | str) – path to the fjs file containing a flexible job shop schedule problem instance
- output_dir (Path | str) – path to the directory to place the csv files into
Returns: None
-
get_job
(job_id)¶ Gets the Job with job id = job_id.
Parameters: job_id (int) – id of the Job to get Return type: Job Returns: Job with id = job_id
-
get_runtime
(job_id, task_id, machine)¶ Gets the run time for running (job_id, task_id) on machine.
Parameters: - job_id (int) – job id
- task_id (int) – task id
- machine (int) – id of machine
Return type: float
Returns: run time
-
get_setup_time
(job1_id, job1_task_id, job2_id, job2_task_id)¶ Gets the setup time for scheduling (job2_id, job2_task_id) after (job1_id, job1_task_id).
Parameters: - job1_id (int) – job id of job 1
- job1_task_id (int) – task id of job 1
- job2_id (int) – job id of job 2
- job2_task_id (int) – task id of job 2
Return type: int
Returns: setup time in minutes
-
job_task_index_matrix
= None¶ 2d nparray of (job, task): index mapping
-
jobs
= None¶ list of all Job instances
-
machine_speeds
= None¶ 1d nparray of machine speeds
-
sequence_dependency_matrix
= None¶ 2d nparray of sequence dependency matrix
-
task_processing_times_matrix
= None¶ 2d nparray of task processing times on machines
-
usable_machines_matrix
= None¶ 2d nparray of usable machines
-
static
-
class
JSSP.data.
FJSData
(input_file)¶ Bases:
JSSP.data.Data
JSSP instance data class for .fjs (Flexible Job Shop) data.
Parameters: input_file (Path | str) – path to the fjs file to read the data from Returns: None
-
class
JSSP.data.
Job
(job_id)¶ Bases:
object
Job ADT.
Parameters: job_id (int) – job ID of this Job -
get_job_id
()¶
-
get_max_sequence
()¶
-
get_number_of_tasks
()¶
-
get_task
(task_id)¶
-
get_tasks
()¶
-
set_max_sequence
(max_sequence)¶
-
-
class
JSSP.data.
SpreadsheetData
(seq_dep_matrix, machine_speeds, job_tasks)¶ Bases:
JSSP.data.Data
JSSP instance data class for spreadsheet data.
Parameters: - seq_dep_matrix (Path | str | Dataframe) – path to the csv or xlsx file or a Dataframe containing the sequence dependency setup times
- machine_speeds (Path | str | Dataframe) – path to the csv or xlsx file or a Dataframe containing all of the machine speeds
- job_tasks (Path | str | Dataframe) – path to the csv or xlsx file or a Dataframe containing all of the job-tasks
Returns: None
-
class
JSSP.data.
Task
(job_id, task_id, sequence, usable_machines, pieces)¶ Bases:
object
Task ADT.
Parameters: - job_id (int) – job ID of this Task
- task_id (int) – task ID of this Task
- sequence (int) – sequence number of this Task
- usable_machines (1d nparray) – usable machines that this Task can be processed on
- pieces (int) – number of pieces this Task has
-
get_job_id
()¶
-
get_pieces
()¶
-
get_sequence
()¶
-
get_task_id
()¶
-
get_usable_machines
()¶