Import a Export

It is important to import the following data tables
(This operation is usually carried out at the customer's customized software based on existing data).

Job list
TJOB (job_id, job_name, job_start, job_stop, job_prefer)
job_id – unique integer(1..n), job identification
job_name – the name of the job (max. 60 char)
job_start – the earliest start date for executing the job
job_stop – the closing date for the completion of order (deadline)
job_prefer – job percentage preference, default 100%
job_deadline – 0/1, 1-the deadline is compulsory , 0-the job_stop deadline is informative
job_disabled – 0/1, disabling job (1), the default value is 0

Network diagram
TNETWORK (net_id, nt_job_id, net_a_id, net_b_id)
net_id – a unique integer (integer 1..n)
net_job_id – the job id (TJOB.job_id)
net_a_id – identifier of the starting node of one section of the job (integer)
net_b_id – end node identifier of one section of the job (integer)

Individual sequence (sections) of job
TSEQUENCE (seq_id, seq_net_id, seq_name, seq_product)
seq_id – a unique integer (1..n)
seq_net_id – assigning the production sequence to the network diagram (TNETWORK.net_id)
seq_name – name of the production sequence (max. 60 char)
seq_product – product drawings or numbers (max. 60 char) data for information purposes


The example of the net defining:

planing


The picture shows the technological diagram implemented by an order. This order comprises two first parallel of the realized parts (Sequence 1, Sequence 2), for the production of the two components: A and B components. When these components are finished, assembled (OP1 / M6) and painted (op2 / M7) in the third part (Sequence 3).
Every strike sequenes (sections) must have a start and end node in the network.
Sequence 1: 10->11
Sequence 2: 12->11
Sequence 3: 11->13


TNETWORK
(net_id, net_job_id, net_a_id, net_b_id) VALUES
(1, 1, 10, 11 ),
(2, 1, 12, 11 ),
(3, 1, 11, 13 );
TSEQUENCE
(seq_id, seq_net_id, seq_name, seq_product) VALUES
(1, 1, ’Sequence1’, ’A’ ),
(2, 2, ’Sequence2’, ’B’ ),
(3, 3, ’Sequence3’, ’AB’ );

Operations related to sequences of job
TOPERATION (opr_id, opr_seq_id, opr_wkp_id, opr_ix, opr_td, opr_tij, opr_started)
opr_id – a unique integer(1..n)
opr_seq_id – in which sections include operations (TSEQUENCE.seq_id)
opr_wkp_id – in which the workplace for this operation (TWORKPLACE.wkp_id)
opr_ix – the number of operations in that sequence (integer: 1..n), the sequence of technology
opr_td – duration time of the operation in minutes
opr_tij – duration time operations along with time traffic, in minutes
opr_started – 0/1/-1, in the production operation has been started (1), or are not (0) , relized (-1)
opr_name – operation name (informative)
opr_pc – decimal number of pieces (informative)

Workplaces
TWORKPLACE (wkp_id, wkp_code, wkp_name, wkp_area)
wkp_id – unique integer (1..n)
wkp_code – short code of workplace (max. 60 char) data for information purposes
wkp_name – workplace name (max. 60 char)
wkp_area – area or category (max. 60 char), data for information purposes

Machines of workplaces
TMACHINE (ma_id, ma_wp, ma_code, ma_name, ma_area, ma_capacity,ma_day_start,ma_day_minutes,ma_workdays)
ma_id – unique integer (1..n)
ma_wp – wokplace (TWORKPLACE.wkp_id)
ma_code – short code of machine (max. 60 char) data for information purposes
ma_name – machine name (max. 60 char)
ma_area – area or category (max. 60 char), data for information purposes
ma_capacity – multiplier capacity of the machine (decimal)
ma_days - days types of the week and holiday by TDAYS table, example:'AAAAA000', which means that it works from Monday to Friday in the 'A' type schedule. Saturday, Sunday and holidays do not work.

Worktime intervals of days
TDAYS (wd_type, wd_name, wd_intervals)
wd_type -(char) a capital letter: A..Z
wd_name -(string) name of type
wd_intervals - (string) worktime intervals, example:'06:00-12:00, 12:30-18:00, 18:30-22:00, 22:00-04:00, 04:30-06:00'

Export

The recoverable from planing data, provide a chronological order of the operations to be performed on machines. These results are also shown graphically. Table m_sheduled (
`sh_id` INT(11) NOT NULL AUTO_INCREMENT,
`sh_wp` INT(11) NOT NULL DEFAULT '0' COMMENT 'workplace id',
`sh_wp_orign` INT(11) NOT NULL DEFAULT '0' COMMENT 'origin worklace id',,
`sh_ma` INT(11) NOT NULL DEFAULT '0' COMMENT 'machine id',
`sh_op` INT(11) NOT NULL DEFAULT '0' COMMENT 'operation id',
`sh_job` INT(11) NOT NULL DEFAULT '0' COMMENT 'job id',
`sh_nt` INT(11) NOT NULL DEFAULT '0' COMMENT 'network id',,
`sh_td` INT(11) NOT NULL DEFAULT '0' COMMENT 'operation duration time',
`sh_td_orign` INT(11) NOT NULL DEFAULT '0' COMMENT 'origin duration time',
`sh_tij` INT(11) NOT NULL DEFAULT '0' COMMENT 'duration and transport together',
`sh_tij_orign` INT(11) NOT NULL DEFAULT '0' COMMENT 'origin tij',,
`sh_ix` INT(11) NOT NULL DEFAULT '0' COMMENT 'internal order',
`sh_start` DATETIME NOT NULL DEFAULT '1901-01-01 00:00:00' COMMENT 'operation start datetime',
`sh_stopMa` DATETIME NOT NULL DEFAULT '1901-01-01 00:00:00' COMMENT 'operation finish datetime on workplace',
`sh_stop` DATETIME NOT NULL DEFAULT '1901-01-01 00:00:00' COMMENT 'operation finish datetime',
`sh_date` DATETIME NOT NULL DEFAULT '1901-01-01 00:00:00' COMMENT 'write datetime',
PRIMARY KEY (`sh_id`)
)