Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
JobStep
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 calculateDuration
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * Jingga
4 *
5 * PHP Version 8.1
6 *
7 * @package   phpOMS\Scheduling\Dependency
8 * @copyright Dennis Eichhorn
9 * @license   OMS License 2.0
10 * @version   1.0.0
11 * @link      https://jingga.app
12 */
13declare(strict_types=1);
14
15namespace phpOMS\Scheduling\Dependency;
16
17/**
18 * Job step.
19 *
20 * @package phpOMS\Scheduling\Dependency
21 * @license OMS License 2.0
22 * @link    https://jingga.app
23 * @since   1.0.0
24 */
25class JobStep
26{
27    public int $id = 0;
28
29    public int $order = 0;
30
31    public int $l11n = 0;
32
33    public int $machineType = 0;
34
35    public bool $machineParallelization = false;
36
37    public array $machines = [];
38
39    public int $workerType = 0;
40
41    public array $workerQualifications = []; // qualifications needed
42
43    public bool $workerParallelization = false;
44
45    public array $workers = [];
46
47    public int $material = 0;
48
49    public int $materialQuantity = 0;
50
51    public int $duration = 0; // in seconds
52
53    public int $maxHoldTime = -1; // minutes it can be halted if necessary (-1 infinite, 0 not at all)
54
55    public int $maxHoldAfterCompletion = -1; // minutes the next processing step can be postponed (-1 infinite, 0 not at all)
56
57    private int $realDuration = 0;
58
59    // depending on job completions
60    private array $jobDependencies = [];
61
62    public bool $shouldBeParallel = false;
63
64    /**
65     * Duration
66     *  + machine type/machine specific times (e.g. setup time etc.)
67     *  + machine-job specific times (e.g. setup time for this job which could be different from the general machine setup time)
68     */
69    public function calculateDuration() : void
70    {
71        $this->realDuration = $this->duration;
72    }
73}