Supply Chain (PBS)
In this sample, a manufacturer wishes to minimize emissions in the transport of sub-parts to manufacturing of composite parts within it's supply-chain. The manufacturer has warehouses or manufacturing centers in various locations and there are known costs associated with moving different parts to different locations. In addition, a "Part Breakdown Structure" (PBS) describes which parts are components of other parts.
The atom array this case is a resource row for each part, a single time column and each atom state is a location.
Below is the PBS provided in the sample (in the pbs.csv
raw data file). Parts P2 and P3 are sub-parts of P1, and P4, P5, and P6 are considered "sibling" parts.
Therefore:
- The constraints involved include the PBS and rules around that structure.
- The objective is to minimize the emissions cost described in a table mapping parts to source and destination locations.
Please see the compliance section for a complete description of the problem, constraints and objectives in both mathematical and Amazolve forms. In addition, the pbs.md
file in the sample pbsProb
directory has the same information.
In the samples directory:
pbsDB
contains raw CSV data files that describe the PBS (pbs.csv
) and the cost table (costs.csv
). These would be generated by an upstream ERP system, for example.pbsProb
contains the problem definition (pbs.json
andpbs.md
) and a subdirectory calleddyndata
which contains the CSV data converted into arrays that are referred to by the problem definition.- In the Python sample tester (azopytest), the pbs directory contains the python code for converting the raw data files into the arrays.
Next is a sample run via azopytest.
Python sample tester (azopytest) command line parameters:
--run debug --itest pbs --tc 5 --st 20
Output:
** Problem Results **
---------------------
P1: S2
P2: S4
P5: S6
P6: S2
P7: S3
P3: S3
P8: S2
P4: S6
P9: S2
P10: S4
** Solver Results **
--------------------
Score : 8.389999389648438
Stop : 2
Time : 20.273
R Count: 10
T Count: 1
S Count: 7
Atoms:
[
[1],
[3],
[2],
[5],
[5],
[1],
[2],
[1],
[1],
[3]
]
Constraints:
C1: 0.0 (26 ms)
C2: 0.0 (316 ms)
C3: 0.0 (249 ms)
C: 8.389999389648438 (3433 ms)