Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 60

ENG M 540

Introduction to Optimization and Algorithms

Project: Optimization of Cost for 3D


Printed Parts

Prepared By:

Gursimar Singh #1772107 

Submitted To: Roberto Gallardo Bobadilla

Date: April 14, 2023

Contents
Abstract.................................................................................................................................................3
Introduction...........................................................................................................................................4
Background........................................................................................................................................4
Objectives..........................................................................................................................................4
Scope of the study.............................................................................................................................4
Literature Review..................................................................................................................................5
Approach and Methodology..............................................................................................................6
Description of the variables, sets and parameters............................................................................7
Model Formulation............................................................................................................................8
Objective Function.........................................................................................................................8
Constraints....................................................................................................................................9
Model Implementation....................................................................................................................10
Sensitivity Analysis...........................................................................................................................11
Results and Discussion.....................................................................................................................11
References...........................................................................................................................................12
Abstract

This project aims to optimize the cost of printing parts using 3D printers by considering
various factors such as, part and machine specifications, including area, height, volume,
processing time and setup time. A mathematical model is formulated to represent the parts
assignment problem and optimize the job size for machines. The jobs are then scheduled on
machines for printing to further optimize costs. A sensitivity analysis is also performed to
evaluate the robustness of the model and the impact of changing different parameters.

The results of the study show that the mathematical model can effectively optimize the cost
of 3D printing by finding the optimal job size for machines and scheduling the jobs for
printing. The sensitivity analysis indicates that the model is robust and can handle changes
in parameters such as cost of printing, parts and machine specifications. The study provides
insights into the factors that affect the cost of 3D printing and how to optimize it to increase
efficiency and profitability.
Introduction
Background

The use of 3D printing technology has significantly increased in recent years. 3D printing is
used in various industries, such as automotive, aerospace, healthcare, and consumer goods.
However, 3D printing can be expensive due to the cost of equipment and setup time. To
optimize the cost of 3D printing, it is essential to consider various factors such as machines
and parts specifications, cost of printing and use mathematical modeling techniques to
represent and optimize the problem.

The motivation for this study is to optimize the cost of 3D printing parts by considering
various factors and constraints and using mathematical modeling techniques to represent
and optimize the problem. By optimizing the cost, the study aims to increase the efficiency
and profitability of the printing process, making it more accessible to various industries.
Additionally, optimizing the cost can help in reducing waste, increasing sustainability, and
promoting the use of 3D printing technology.

Objectives

The objectives of the project are:

● To develop a mathematical model to represent the parts assignment problem in 3D


printing and optimize the job size for machines.
● To schedule the jobs on machines for printing in a way that further optimizes costs,
taking into consideration constraints such as the specifications of parts and
machines, including height, area volume, build area, and processing times.
● To perform sensitivity analysis to evaluate the robustness of the model and the
impact of changing different parameters.
● To provide insights into the factors that affects the cost of 3D printing and how to
optimize it to increase efficiency and profitability.

Scope of the study


The scope of the study is to optimize the cost of 3D printing parts by considering various
constraints such as machines and part specifications, and due dates of the parts. The study
focuses on developing a mathematical model to represent the parts assignment problem
and optimizing the job size for machines. The model considers constraints such as height,
area, volume, and due dates of the parts and build capacity, processing times, and setup
time of the machines. The study also includes scheduling the jobs on machines for printing
in a way that further optimizes costs. Additionally, the study includes performing sensitivity
analysis to evaluate the robustness of the model and the impact of changing different
parameters. The mathematical model developed in the study can be applied to various
industries that use 3D printing technology, such as automotive, aerospace, healthcare, and
consumer goods. More specifically, this automated scheduling optimization problem can be
applied to the centralized 3D printing companies that offer 3D printing as a service such as
Shapeways Inc. 1, which is an online platform that receives 3D printing orders placed by
customers from different locations. Thus, given the volume of the printing orders received
by these platforms, it is crucial to optimize the part assignment as well as the job scheduling
based on certain constraints such as machines capacity and parts deadlines. Consequently,
the efficiency and profitability of such printing services can be maximized while reducing

waste and promoting sustainability.

Literature Review

3D printing has revolutionized the manufacturing industry by enabling the production of


complex parts with high precision and accuracy. However, the cost of 3D printing remains a
significant challenge for many companies, especially in the context of optimizing the printing
process. Therefore, this study aims to develop a mathematical model to optimize the cost of
3D printing parts and increase the efficiency and profitability of the printing process.
Previous research has focused on various aspects of 3D printing, such as material selection,
process optimization, and product design. However, few studies have focused on optimizing
the cost of 3D printing parts by considering various constraints and using mathematical
modeling techniques to optimize part assignment and job scheduling. Hodge et al. (2017) [1]

1 Accessible at: https://www.shapeways.com/


proposed a mathematical model for optimizing the design of additive manufacturing parts
while considering the cost of material, machine, and energy consumption. The study used a
multi-objective genetic algorithm to find optimal solutions for minimizing the cost and
weight of the parts. Zhao et al. (2020) [2] proposed a mathematical model for optimizing the
printing process by minimizing the total cost of printing and maximizing the utilization rate
of machines. Similarly, Alghamdy et al. (2022) proposed a study of minimizing production
time and deadline violation of 3D printed parts by grouping the parts into jobs and
scheduling the jobs to one machine.

In contrast, this study focuses on developing a mathematical model that considers various
constraints, such as part and machine specifications, setup time, processing times and
processing times, to optimize the cost of 3D printing parts. The study also includes
scheduling the jobs on machines for printing in a way that further optimizes costs.
Additionally, the study includes performing sensitivity analysis to evaluate the robustness of
the model and the impact of changing different parameters.

The proposed approach and methodology of this study involve a combination of


mathematical modeling, optimization techniques, coded algorithm, and sensitivity analysis
to develop effective strategies for optimizing the cost of 3D printing parts. The results of the
study provide insights into the factors that affect the cost of 3D printing and how to
optimize it to increase efficiency and profitability.

Approach and Methodology

In this section we will define assumptions and limitations for the model, the variables,
parameters, objective function and constraints for the part assignment and job scheduling.
The proposed mathematical model will be solved using gurobi solver in matlab. The
optimization techniques and sensitivity analysis helps to develop effective strategies for
optimizing the cost of 3D printing parts. The results of the study provide insights into the
factors that affect the cost of 3D printing and how to optimize it to increase efficiency and
profitability.

Assumptions and Limitations


Assumptions

 Each part should be scheduled once only


 Each job should include at least one part
 There is no disruption in the job printing once it started
 Neglect time required for the optimization software
 Cost of printing per unit time for any machine includes labour, capital and energy
cost
 Time units are considered as hours
 Length units are considered as centimetres
 Area units are considered as square centimetres
 Cost units are considered as USD

Limitations

 Deadline of parts are not considered


 Model will be infeasible if any part remains unassigned
 Model will be infeasible if any job remains unscheduled

Description of the variables, sets and parameters


Variables

xij : Binary Variable representing value 1 if part i is assigned to job j, otherwise 0

y jm : Binary Variable representing value 1 if job j is scheduled on machine m , otherwise 0

Sets

Parts: i = 1, 2,..., I

Jobs: j = 1, 2,..., J

Machines: m = 1, 2,...,M

Parameters

c m : cost of printing per unit time on machine m

v i : volume of part i
a i : area of par t i

h i : height of par t i

P T jm : processing time of job j on machine m

Sm : setup time for each job on machine m

A m : build area of machine m

Hm : height of build area of machine m

VT m : time per unit volume of material for printing on machine m

HT m : time to move per unit height for printing on machine m

PPT m : Post processingtime on machine m

Model Formulation

A mathematical model of the problem represents the objective function of the minimizing
the cost of printing and considering two sub problems – one is parts assignment to jobs
based on the area, height, and volume of the parts and the other is scheduling that jobs to
the machines based on the machine specifications that includes constraints such build
capacity, processing and setup times.

Objective Function

The goal is to find the optimal cost for printing the parts by optimizing the processing time
of various jobs on different machines. It is defined as below:

M J
min z = ∑ ∑ c m PT jm y jm
m = 1 j =1

Processing time of job j on machine m can be calculated as below:

((∑ ) )
I
P T jm = Sm y jm z j + PPT m y jm z j + VTm v i x ij y jm + HT m ( ( max ( h i x ij ) ) y jm )
i =1

z j is binary variable that is equal to 1 if job j has at least one part, otherwise 0. This
processing time of job j on machine m indicating the sum of setup time of machine m if job j
is assigned to it, post processing time of machine m if job j assigned to it, time for printing
the total volume of job j assigned to machine m and vertical time travel of machine m during
printing job j if job j is assigned to machine m.

Volume of each part can be calculated as below:


v i=a i × h i

Constraints

The above objective function is subjected to following constraints:

Constraint 1: To ensure each part is assigned to exactly one job

∑ x ij = 1 ∀ i=1,2,……I
j=1

Constraint 2: To ensure each job is assigned to exactly one machine

∑ y jm = 1 ∀ j=1,2,……m
m=1

Constraint 3: To ensure z j is 1 if at least one part is there in job j

I
z j ≥max ( x ij ) i=1 ∀ j ∈J

Constraint 4: To ensure area of job j containing multiple parts should not be greater than
build area of machine m

(∑ )
I
a i x ij y jm ≤ Am ∀ j = 1,2,……J and m = 1,2,……..M
i=1

Constraint 5: To ensure height of part i assigned to job j should not be greater than build
height of machine k

( max ( h i x ij ) ) y jm ≤ H m ∀ j = 1,2,……J and m = 1,2,……..M

Constraint 6: To ensure that number of jobs are not greater than number of parts
J ≤I

Constraint 7: Non negativity and integer constraints

xij , y jm , z j ∈ {0 ,1 }∧areintegers ∀ i ∈ I , j∈ J ,m ∈ M

Model Implementation

We have implemented above model by considered 10 parts and 4 machines. The


specifications of machines and parts are given in Table 1 and Table 2 respectively.

Table 1: Machine Specifications

Parameters Machine 1 Machine 2 Machine 3 Machine 4


C m ,Cost per unit processing time
200 400 300 450
($/hour)
ST m , thetime consumption for
2 1 2 3
setting up a new job (hours)
H m ,the maximum height supported
32.5 40 55 50
(cm )
Am ,the maximum production area
50 150 250 350
supported (cm 2)
VT m , the time consumption to form
0.030864 0.030864 0.031 0.035
per unit volume (hours/cm 3)
HT m ,the time consumption to move
0.015062 0.01065 0.0095 0.0125
per unit printing height (hours/cm)
PPT m , post processing time for each
1 2 2 2
machine (hours)

Table 2: Part Specifications

Part (i) Height (hi ) in cm Area (a i) in cm 2


1 25 30
2 38 37
3 24 45
4 27 66
5 29 89
6 26 143
7 45 55
8 48 108
9 40 97
10 50 100

The formulated model is solved using MATLAB solver. After, implementing the above
formulation and data in MATLAB, we got the optimized combination of 10 parts in 4 jobs
and those 4 jobs are scheduled to 4 machines based on the restrictions and specifications.
We further achieved the optimized processing time of each job and optimized cost for
printing all the jobs.

MALTAB is used for model formulation and solving it with existing constraints and defined
objective function. According to the initial optimal solution of the problem, 10 parts are
assigned to four jobs and these four jobs are scheduled to four machines. Job 1 contains 5
parts, job 3 contains 1 part, job 4 contains 3 parts and job 6 contains 1 part. Each job has
maximum area and height restricted with build area and height of machine. The parts in
each job, processing time of each job, scheduling of job on each machine is given in Table 3.
The optimized cost of the model is $ 428,790.

Table 3: Optimized results of model implementation

Jobs Parts Machine Processing time


Job 1 1,4,5,7,9 Machine 4 406.6925
Job 3 3 Machine 1 36.6946
Job 4 2,8,10 Machine 3 362.5465
Job 6 6 Machine 2 146.9404

The model implementation and its solution in MATLAB are attached in Appendix A.

Sensitivity Analysis
In this section, we evaluated the robustness of the model and the impact of changing
different parameters. This analysis helps to identify the most critical parameters and how
they affect the cost of printing.

The sensitivity analysis is performed considering the below scenarios:

 Changing build area of machine 1


 Changing one of the machine printing time
 Changing one of the part area

Changing build area of machine 1

In this scenario, we assumed that build area of machine 1 increased from 50 sq. cm to 80 sq.
cm. By changing the build area, we have more build capacity in machine 1 and hence job
size for machine 1 is also increased. After implementing this change, we have observed
some changes from the initial model solution. The change in part assignment to jobs, job
scheduling to machines and processing times is given in Table 4.

Our Objective function value changed from $ 428,790 to $ 416,980.

Table 4: Comparison after changing build area of machine 1

Part Assignment Job Scheduling Processing time


Jobs
Initial New Initial New Initial New
Job 1 1,4,5,7,9 1,4,6,9 Machine 4 Machine 4 406.6925 359.86
Job 3 3 2,8 Machine 1 Machine 1 36.6946 206.75
Job 4 2,8,10 5,7,10 Machine 3 Machine 3 362.5465 314.99
Job 6 6 3 Machine 2 Machine 2 146.9404 45.00

Above table shows that part assignment into jobs has been changed after changing the build
area of machine 1. Parts 5 and 7 are now assigned to job 4 instead of job 1, parts 2 and 8
assigned to job 3 instead of job 4, part 3 assigned to job 6 and part 6 assigned to job 1. Job
scheduling on machine is same, however there is a change in the processing times and
shown in Table 4.

The detailed scenario is attached in Appendix B.


Changing printing time of machine 1

This scenario assumed that the time required per unit volume of material printing for
machine 1 changed from 0.030864 hrs to 0.010864 hrs. This change has decreased the
processing time of machine 1 and changes the part assignment to jobs to optimize the
processing time and printing cost. The changes are summarised in Table 5.

Our objective function value changed from $

Results and Discussion


The optimization results obtained from the analysis of the dataset in Table 2 and Table 4
offer important insights into the factors that influence the optimal cost constraint. The study
involved running 10 parts on 4 machines, which yielded an optimal cost value of
approximately $428,790. This optimal cost value was obtained after taking into account
various constraints and factors that have a direct impact on the overall cost of the printing
activity.

One of the most significant factors that affect the objective function is the number of parts.
The more the number of parts, the higher is the cost of the objective function. This
relationship is linear in nature. In addition, the distribution of the height of each part is also
an essential factor that affects the objective function. When the median value of the
distribution is dispersed away from the mean value, the processing time of the jobs assigned
to the machines increases. This makes it difficult to group parts of similar sizes together,
leading to an increase in the overall cost of the printing activity.

Apart from these factors, the area of each part also plays a crucial role in determining the
optimal objective function. Machines with larger areas but smaller part sizes can
accommodate more than one part at a time, reducing the setup time involved in the
printing process. This, in turn, reduces the overall cost of the printing activity.

Moreover, the cost coefficient is another important factor that influences the optimal cost
constraint. An increase in the cost coefficient is directly proportional to the size of the
machine, specifically the area and height of the machine. This means that machines with
larger areas tend to have a higher cost coefficient, making them more expensive to operate

In summary, the optimization results obtained from the analysis of the dataset presented in
Table 2 and Table 4 highlight the significance of various constraints and factors that
influence the optimal cost constraint. The study underscores the importance of considering
these factors while devising strategies to optimize the printing activity's cost.

For the following Optimization problem, we get the following results. Referring Appendix, A,
the following Graphical interpretation can we charted out the Distribution of the respective
parts of the jobs mentioned to their respective jobs is shown
Fig 5.1

The assignment's analysis reveals interesting and unique insights that can be derived from
the data. It has been observed that parts that are scheduled in a cohesive manner tend to
have a higher optimal function value. Specifically, jobs that are larger in size are usually
preferred earlier, leading to an increase in the profit formulation in the initial stages of the
printing activity. This implies that more profitable jobs are prioritized, resulting in increased
profits during the early stages of the printing activity.

This peculiarity can be attributed to the fact that larger jobs require more time to complete,
and if they are scheduled earlier, they can be completed in a shorter duration. This leads to
a reduction in the overall processing time of the machines, thereby resulting in a higher
optimal function value. Additionally, larger jobs may require specific machine
configurations, which could lead to more efficient usage of the machines.

Furthermore, prioritizing larger jobs earlier in the printing process can also help in
streamlining the entire printing activity. As larger jobs are completed earlier, it creates a
more organized flow of work, leading to an increase in productivity. This, in turn, leads to a
better utilization of resources, resulting in a higher overall profitability.

In conclusion, the analysis of the assignment's data highlights the importance of prioritizing
larger jobs earlier in the printing process. This helps in enhancing the optimal function value,
leading to an increase in profits in the early stages of the printing activity. Additionally, this
also helps in streamlining the printing activity, leading to better productivity and resource
utilization. These insights can be utilized to devise effective strategies to optimize the
printing activity's profitability.
Job and Machine Scatter plot
4

0
0 1 2 3 4 5 6 7

Machine Series4

Fig 5.2

Below Discussed is the Scatter Plot which refers to the assignment of Jobs to the respective
Machines. X axis which is the minor axis represents the jobs and the major axis represents
the Machines.

From Appendix A it can be clearly inferred that jobs which have higher density of parts are
assigned to machines which have bigger area and has a higher height. Hence reducing the
setup time. and optimizing the Cost proficiency

For example Job 1 had the maximum no of parts. hence it tends to go to machine 4 that is
the machine with the biggest area and height coefficient. which indeed tends to reduce the
post processing time as well.

This can be explained using the below shown diagram. As many jobs tend to cover the
machine area of the Machine M. So that maximum number of jobs can be added to it.
This can be explained using the following diagram

Fig 5.3

Figure 5.3 shows the even distribution of parts on the machine M in order to
increase the throughput of certain job

Processi
ng time of job j on machine m is discussed in the Bar graph below
Figure 5.4
It can be inferred that Job 1 takes the maximum processing time, as maximum number of jobs are
loaded into it and it has the greatest area and height. For job 4 which has a really less job load tends
to take a lesser processing time Eventually optimising the cost of the printing with the Said
Parameters.

Sensitivity Analysis
------------------------

For Sensitivity Analysis we take

3 Cases and the results of the formulation are mentioned in the Appendix B, Appendix C and
Appendix D Respectively.

CASE 1 -
 Changing one of machine area

Initially the area of the Machines was taken to be MA = [50,150,250,350].

For the Sensitivity Analysis to take place qualitatively, we increase the area of the machine
M1 from 50 units to 80 units. And we will analyse our results below.

For the following Optimization problem, we get the following results. Referring Appendix, B,

Fig 6.1

Figure 6.1 Represents the new Allocation of parts to jobs


As Compared to the base of this problem there is a significant change in the scheduling of
the problem, compared to the base case part 8, part 7, part 6, part 7, part 2, part 3, part 5
all get rescheduled to different jobs.

With the increase in area of the first machine that is 50 units to 80 units, the jobs which
cumulatively sum up to the area of the first the machine so that minimum space is left. jobs
are rescheduled in this particular manner. jobs with smaller heights tend to come together
in the job 1 while the jobs which posed a higher area tend to move towards job 3 hence
fulfilling its cumulative area requirements

The problem that is being discussed here is related to scheduling of jobs on machines, and
there has been a significant change in the scheduling compared to a base case. Specifically,
in this new scenario, several parts (part 8, part 7, part 6, part 7, part 2, part 3, part 5) have
been rescheduled to different jobs.

The reason for this change in scheduling is due to an increase in the area of the first
machine, from 50 units to 80 units. In order to make the best use of the available space on
the machine, the jobs have been rescheduled in a particular manner. Jobs with smaller
heights have been grouped together and assigned to job 1, while jobs with larger areas have
been assigned to job 3, in order to fulfil its cumulative area requirements.

This approach of rescheduling the jobs based on their area requirements ensures that the
available space on the machine is utilized in an optimal manner. By grouping jobs with
similar area requirements together, the machine can be used more efficiently, reducing idle
time and increasing productivity.

Overall, this change in scheduling highlights the importance of considering the available
space on the machine when scheduling jobs. By taking into account the area requirements
of each job, it is possible to schedule the jobs in a way that maximizes machine utilization
and improves overall efficiency.
Job and Machine Scatter plot
4

0
0 1 2 3 4 5 6 7

Machine Series4

Fig 6.2

The allocation of machine for the respective jobs remains unchanged to that of the Jobs and
machine allocations in the base of our Analysis.

Processing time and Job plot


400
350
300
250
200
150
100
50
0
1 2 3 4

Job Machine Processing Time

Fig 6.3
Comparing the two sets of data, we can see that there have been some changes in the
processing times for certain jobs.

In the first set of data, Job 1 on Machine 4 has a processing time of 359.86, which is lower
than the processing time of 406.69 in the second set of data.

This indicates that the processing time for Job 1 has increased in the second set of data.

On the other hand, the processing time for Job 3 on Machine 1 has decreased significantly
from 206.76 in the first set of data to 36.69 in the second set of data.

This indicates that the processing time for Job 3 has improved in the second set of data.

There is no change in the processing time for Job 4 on Machine 3 and Job 6 on Machine 2 in
the two sets of data.

Overall, these changes in the processing times for certain jobs could have an impact on the
overall scheduling of the jobs on the machines.

For instance, the increased processing time for Job 1 in the second set of data could lead to
longer lead times for other jobs waiting to be processed on the same machine, while the
decreased processing time for Job 3 could improve overall efficiency by reducing idle time
on the machine.

In the scheduling of jobs on machines, the objective function represents the total cost of the
production process. A lower value of the objective function indicates a more cost-efficient
production process. In this case, we can see that the total objective function has decreased
from the base case value of $428790 to $416980. This is a significant decrease, indicating
that the changes made to the scheduling have resulted in a more optimal cost structure for
the production process.

One possible reason for this decrease in the objective function is the increase in the area of
one of the machines. When a machine has a larger area, more optimal jobs can be fit in for
the same purpose. This can result in a reduction in idle time, as the machine does not need
to move the coordinates from a larger rapid feed area to the smaller workpiece area as
frequently. This can lead to a more efficient production process overall.

In addition to the increase in the area of the machine, other factors may have been
optimized to reduce the total cost of the production process. For example, changes in the
scheduling of jobs may have been made to reduce processing times, or to minimize the
number of machines required for a given set of jobs. These changes may have contributed
to the overall decrease in the objective function.

Case 2:

Changing one of the machine height printing time

Changing Vt from 0.030864 to 0.010864 units

Fig 7.1

As per Appendix C we get a completely new Scheduling plan for the Case 2 of Sensitivity
Analysis.

The statement suggests that machine 1 has experienced a reduction in printing time. This
indicates that some changes have been made in the production process that have resulted
in this improvement. According to the statement, it can be inferred that the changes made
involve the assignment of parts to specific machines based on their heights.

The statement indicates that parts with heights higher than the median have been assigned
to job 1, while parts with shorter heights have been scheduled to machines with longer
printing times. This strategy has been implemented to reduce the cost of production, as
parts with higher heights tend to have a larger processing cost. By doing these parts at the
fastest pace, the cost of production can be significantly reduced.

The statement also mentions that longer parts, specifically parts 5, 6, and 9, have been
moved to job 1. This suggests that job 1 is capable of handling parts with higher heights and
longer printing times. It is possible that job 1 has been modified or optimized to handle
these types of parts efficiently, resulting in the reduction of printing time for machine 1.
The strategy of assigning parts based on their heights can be an effective way to optimize
the production process and reduce costs. By grouping similar parts together, it becomes
easier to streamline the production process and allocate resources efficiently.

In conclusion, the reduction in printing time for machine 1 can be attributed to the
assignment of parts based on their heights. This strategy has been implemented to reduce
the cost of production by optimizing the production process and allocating resources
efficiently.

Job and Machine Scatter plot


4

0
0 1 2 3 4 5 6 7

Machine Series4

Fig 7.2

The allocation of machine for the respective jobs remains unchanged to that of the Jobs and
machine allocations in the base of our Analysis.
Chart Title

400
350
300
250
200
150
100
50
0
1 2 3 4

Job Machine Processing Time

Fig 7.3
Below Graph discusses the processing time of the following

In comparison to the base case, where the processing times were higher, the optimal
processing times have been achieved for four different jobs on four different machines.

For Job 1 on Machine 4, there has been a significant decrease in the processing time from
406.69 units to 361.57 units. This indicates that the processing time for this job has been
optimized, resulting in more efficient production.

Similarly, for Job 3 on Machine 1, the processing time has decreased from 36.69 units to
30.24 units. This suggests that the production process for this job has been streamlined,
resulting in faster processing times and more effective production.

In contrast, there has been no change in the processing time for Job 4 on Machine 3. This
suggests that the processing time for this job was already optimal in the base case and did
not require further optimization.

Lastly, for Job 6 on Machine 2, there has been a significant decrease in the processing time
from 146.94 units to 45 units. This indicates that the processing time for this job has been
optimized, resulting in more efficient production and a reduction in the overall production
cost.

The total objective function has a decrease in the value to that of $ 403758 from the original
base case value of $ 428790.

Hence increasing the Height processing time of Machine helps in the optimizing the Cost as
faster printing of larger materials take place hence it reduces the post processing time too,
as Jobs with higher height can be clubbed together realizing a smoother transition to next
parts scheduled in the job.

Case 3

Changing of the part area

There has been a change in the area of the parts used in the production process. The old
area, which consisted of 10 different parts, had dimensions specified as [30, 37, 45, 66, 89,
143, 55, 108, 97, 100]. The new area, however, has been modified, and the dimensions of
some of the parts have been altered. The new area has the following dimensions: [25, 32,
31, 66, 89, 143, 55, 108, 97, 100].

It is important to note that changes in the part area can have a significant impact on the
overall production process. Different part dimensions can affect the processing time
required for each job, as well as the efficiency and cost-effectiveness of the production
process. It is possible that the changes in the part area have been made in an effort to
optimize the production process further or to reduce the overall production costs.

As the area of the part is increased, we see an even distribution of parts happening among
our scheduled jobs this even distribution means that the post processing times will be
reduced, also the setup times will be of the same level hence making our process even more
efficient, since the normal distribution amongst the said parts have come closer to zero the
Cost of Printing the parts will certainly yield a reduced cost.

Further more this makes our process more efficient as compared to the base case where all
the parts were of different sizes and the normal distribution between the area of the parts
was scattered.
Fig 8.1
Job scheduling vs processing time graph

From inference parts 5, 6, 9 which of the same size tend to get scheduled to the Job
1 and Parts 2, 8, 10 moves towards job 4 as they too share a similar size in their
particular distribution, this helps in scheduling like jobs in a similar manner leading to
better outcome in our processing time

Job and Machine Scatter plot


4

0
0 1 2 3 4 5 6 7

Machine Series4

Fig 8.2

The allocation of machine for the respective jobs remains unchanged to that of the Jobs and
machine allocations in the base of our Analysis.

Figure below shows the processing times of the jobs mentioned


Chart Title

400
350
300
250
200
150
100
50
0
1 2 3 4

Job Machine Processing Time

Fig 8.3

The given statement is discussing the comparison between the optimal processing times
and the base case for different jobs on different machines. In the case of Job 1 on Machine
4, it is observed that the optimal processing time has decreased from 406.69 units to 361.57
units. This indicates that the job is now being processed in a more efficient manner,
resulting in a reduction in processing time.

In the case of Job 3 on Machine 1, it is seen that the optimal processing time has increased
from 36.69 units to 99.039 units. This implies that there has been a delay or inefficiency in
processing this job, resulting in an increase in processing time.

For Job 4 on Machine 3, there has been no change in the processing time between the base
case and optimal processing times. This indicates that the job is being processed in an
efficient manner in both cases.

Finally, for Job 6 on Machine 2, it is observed that the optimal processing time has
decreased from 146.94 units to 100.8815 units. This implies that the job is being processed
in a more efficient manner in the optimal case, resulting in a reduction in processing time.
The total objective function has a decrease in the value to that of $ 413758 from the
original base case value of $428790

Increasing the area of the part leads to an equal allocation of parts among scheduled jobs,
resulting in a reduction in post-processing times and consistent setup times. This efficient
process is further enhanced by the closer distribution of the parts towards zero, leading to a
reduction in the cost of printing the parts.
References

[1] Hodge, J. G., Das, S., & Raghunathan, S. (2017). A multi-objective optimization model for additive
manufacturing. International Journal of Production Economics, 183, 455-466.

[2] Zhao, H., Tan, J., & Lee, Y. H. (2020). A mathematical model for 3D printing process optimization.
International Journal of Production Research, 58(17), 5405-5425.

[3] Alghamdy, M., Almutairib, F. M., & Ahmad, R. (2021). Job-scheduling Model For an Autonomous
Additive Manufacturing: a Case of 3D Food Printing. IEEE Transactions on Automation Science
and Engineering, 18(4), 1654-1664. doi: 10.1109/TASE.2020.3039024.
Appendix A: Model Implementation in MATLAB Solver

clear all; clc

prompt = "Enter the number of parts: ";


I = input(prompt); % number of parts
prompt = "Enter the number of Machines: ";
M = input(prompt); % number of machines
hi = [25, 38, 24, 27, 29, 26, 45,48,40,50]; % height of each part
ai = [30, 37, 45, 66, 89, 143, 55, 108, 97,100]; % area of each
part
vi= hi.*ai;
J = I;
PT=0;
X=0; Y=0;

MA = [50,150,250,350];% productions area of the machine


HT = [0.015062,0.01065,0.0095,0.0125]; % time required for vertical
travel
MH = [32.5,40,55,50]; %Height of Machine
VT = [0.030864,0.03864,0.031,0.035]; % required time per unit
volume of material
SET = [2,1,2,3]; % machine's setup time
PPT=[1,2,1,2]; %post processing time
Ai=repmat(ai,J,1);

ops = sdpsettings('solver', 'gurobi', 'verbose', 2, 'debug', 1,


'showprogress', 1, 'cachesolvers', 1, 'usex0', 1);
H = repmat(hi,I,1);
V= repmat(vi,I,1);

X = binvar(I,J,'full');
Y = binvar(J,M, 'full');% binary variables indicating which job is
assigned to which machine
Z = binvar(J, 1, 'full');% binary variables indicating if a job has
at least one part
PT = sdpvar(J, M, 'full');

for j=1:J
for m=1:M
L = H.*X(:,:);
PT(j,m) = SET(m)*Z(j)*Y(j,m) +(VT(m)*(vi*X(:,j)*Y(j,m))) +
(HT(m)*(max(L(:,j))*Y(j,m))) + PPT(m)*Z(j)*Y(j,m);
end
end
CV=[200,400,300,450];
obj = 0;
for j = 1:M
for i = 1:I
obj = obj + (CV(m)* PT(i,j));
end
end

Q =sort(H, 'descend');
R=Q(1,:);
RR=repmat(R,J,1);
MHA=repmat(MH,J,1);
constraints = [sum(X, 2) == ones(I, 1), ... % Constraint 1
sum(Y, 2)== Z,...
((sum(Ai'.*X)*Y)) <= MA, ... % Constraint 2
(RR.*X)*Y<=MHA,
J <= I,...
Z>= max(X, [], 1)',...
Y>=0,...
Z>= 0, Z<=1,...
X >= 0, X <= 1]; % Constraint 6
optimize(constraints, obj,ops);

% Retrieve the optimal solution


X_opt = value(X)
Z_opt=value(Z)
Y_opt=value(Y)
PT_opt = value(PT)
obj_opt = value(obj)
has_non_zero = any(X_opt~= 0);
Number_of_jobs = sum(has_non_zero);
has_non_zero = any(Y_opt~= 0);
Number_of_machines = sum(has_non_zero)

Results

Enter the number of parts: 10


Enter the number of Machines: 4

Optimize a model with 1500 rows, 270 columns and 4030 nonzeros
Model fingerprint: 0x9493ec2f
Model has 480 quadratic objective terms
Model has 44 quadratic constraints
Variable types: 10 continuous, 260 integer (260 binary)
Coefficient statistics:
Matrix range [1e+00, 5e+01]
QMatrix range [2e+01, 1e+02]
Objective range [0e+00, 0e+00]
QObjective range [9e+00, 2e+05]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 5e+01]
QRHS range [3e+01, 4e+02]
Presolve removed 270 rows and 10 columns
Presolve time: 0.04s
Presolved: 1754 rows, 740 columns, 5990 nonzeros
Variable types: 0 continuous, 740 integer (690 binary)

Root relaxation: objective 1.163092e+03, 141 iterations, 0.01 seconds (0.00 work units)

Explored 7287 nodes (191218 simplex iterations) in 7.36 seconds (5.31 work units)
Thread count was 8 (of 8 available processors)

Solution count 8: 428793 428794 428794 ... 429996


Optimal solution found (tolerance 1.00e-04)
Best objective 4.287933126000e+05, best bound 4.287933126000e+05, gap 0.0000%

X_opt =

1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0

Z_opt =

1
0
1
1
0
1
0
0
0
0

Y_opt =

0 0 0 1
0 0 0 0
1 0 0 0
0 0 1 0
0 0 0 0
0 1 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

PT_opt =

0 0 0 406.6925
0 0 0 0
36.6946 0 0 0
0 0 362.5465 0
0 0 0 0
0 146.9404 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

obj_opt =

4.2879e+05

Number_of_machines =

Appendix B
clear all; clc

prompt = "Enter the number of parts: ";


I = input(prompt); % number of parts
prompt = "Enter the number of Machines: ";
M = input(prompt); % number of machines
hi = [25, 38, 24, 27, 29, 26, 45,48,40,50]; % height of each part
ai = [30, 37, 45, 66, 89, 143, 55, 108, 97,100]; % area of each part
vi= hi.*ai;
J = I;
PT=0;
X=0; Y=0;

MA = [80 ,150,250,350];% productions area of the machine


HT = [0.015062,0.01065,0.0095,0.0125]; % time required for vertical
travel
MH = [32.5,40,55,50]; %Height of Machine
VT = [0.030864,0.03864,0.031,0.035]; % required time per unit volume
of material
SET = [2,1,2,3]; % machine's setup time
PPT=[1,2,1,2]; %post processing time
Ai=repmat(ai,J,1);

ops = sdpsettings('solver', 'gurobi', 'verbose', 2, 'debug', 1,


'showprogress', 1, 'cachesolvers', 1, 'usex0', 1);
H = repmat(hi,I,1);
V= repmat(vi,I,1);

X = binvar(I,J,'full');
Y = binvar(J,M, 'full');% binary variables indicating which job is
assigned to which machine
Z = binvar(J, 1, 'full');% binary variables indicating if a job has
at least one part
PT = sdpvar(J, M, 'full');
for j=1:J
for m=1:M
L = H.*X(:,:);
PT(j,m) = SET(m)*Z(j)*Y(j,m) +(VT(m)*(vi*X(:,j)*Y(j,m))) +
(HT(m)*(max(L(:,j))*Y(j,m))) + PPT(m)*Z(j)*Y(j,m);
end
end
CV=[200,400,300,450];
obj = 0;
for j = 1:M
for i = 1:I
obj = obj + (CV(m)* PT(i,j));
end
end

Q =sort(H, 'descend');
R=Q(1,:);
RR=repmat(R,J,1);
MHA=repmat(MH,J,1);
constraints = [sum(X, 2) == ones(I, 1), ... % Constraint 1
sum(Y, 2)== Z,...

((sum(Ai'.*X)*Y)) <= MA, ... % Constraint 2


(RR.*X)*Y<=MHA,
J <= I,...
Z>= max(X, [], 1)',...
Y>=0,...
Z>= 0, Z<=1,...
X >= 0, X <= 1]; % Constraint 6
optimize(constraints, obj,ops);

% Retrieve the optimal solution


X_opt = value(X)
Z_opt=value(Z)
Y_opt=value(Y)
PT_opt = value(PT)
obj_opt = value(obj)
has_non_zero = any(X_opt~= 0);
Number_of_jobs = sum(has_non_zero);
has_non_zero = any(Y_opt~= 0);
Number_of_machines = sum(has_non_zero)
Result – Appendix B
Enter the number of parts: 10

Enter the number of Machines: 4

+ Solver chosen : GUROBI-NONCONVEX

+ Processing objective function

+ Processing constraints

+ Calling GUROBI

Set parameter Username

Set parameter NonConvex to value 2

Academic license - for non-commercial use only - expires 2024-04-08

Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (win64)

CPU model: Intel(R) Core(TM) i5-9300HF CPU @ 2.40GHz, instruction set [SSE2|AVX|AVX2]

Thread count: 4 physical cores, 8 logical processors, using up to 8 threads

Optimize a model with 1500 rows, 270 columns and 4030 nonzeros

Model fingerprint: 0x1052ade1

Model has 480 quadratic objective terms

Model has 44 quadratic constraints

Variable types: 10 continuous, 260 integer (260 binary)

Coefficient statistics:

Matrix range [1e+00, 5e+01]

QMatrix range [2e+01, 1e+02]

Objective range [0e+00, 0e+00]

QObjective range [9e+00, 2e+05]

Bounds range [1e+00, 1e+00]

RHS range [1e+00, 5e+01]


QRHS range [3e+01, 4e+02]

Presolve removed 270 rows and 10 columns

Presolve time: 0.01s

Presolved: 1754 rows, 740 columns, 5990 nonzeros

Variable types: 0 continuous, 740 integer (690 binary)

Root relaxation: objective 1.155870e+03, 125 iterations, 0.00 seconds (0.00 work units)

Nodes | Current Node | Objective Bounds | Work

Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

0 0 1155.87045 0 28 - 1155.87045 - - 0s

0 0 1167.44085 0 28 - 1167.44085 - - 0s

0 0 1177.16355 0 28 - 1177.16355 - - 0s

0 0 78798.2398 0 41 - 78798.2398 - - 0s

0 0 408377.491 0 54 - 408377.491 - - 0s

0 0 409965.425 0 80 - 409965.425 - - 0s

H 0 0 429597.54900 409965.425 4.57% - 0s

0 0 410103.558 0 80 429597.549 410103.558 4.54% - 0s

0 0 410103.558 0 77 429597.549 410103.558 4.54% - 0s

H 0 0 422909.34570 410206.158 3.00% - 0s

0 2 410206.158 0 76 422909.346 410206.158 3.00% - 0s

H 128 123 418690.11780 410441.128 1.97% 42.7 0s

H 135 123 416995.33410 410441.128 1.57% 43.2 0s

H 1313 676 416980.43910 413055.147 0.94% 41.9 4s

1568 716 416372.015 35 71 416980.439 413055.147 0.94% 43.6 5s

H 5980 2283 416978.77410 414280.116 0.65% 43.0 7s


9044 3581 416599.361 36 80 416978.774 414573.813 0.58% 42.9 10s

*15275 5557 45 416978.25660 414959.151 0.48% 41.1 13s

17793 6242 415443.184 36 87 416978.257 415107.428 0.45% 41.0 15s

26848 6636 416507.684 33 65 416978.257 415519.949 0.35% 39.6 20s

35493 5083 416541.172 23 84 416978.257 415978.896 0.24% 39.2 25s

Cutting planes:

Gomory: 16

Lift-and-project: 8

Cover: 30

Implied bound: 22

MIR: 92

StrongCG: 59

Flow cover: 384

GUB cover: 4

Inf proof: 13

Zero half: 59

RLT: 94

Relax-and-lift: 1

BQP: 6

Explored 46311 nodes (1676318 simplex iterations) in 29.59 seconds (22.59 work units)

Thread count was 8 (of 8 available processors)

Solution count 7: 416978 416979 416980 ... 429598

Optimal solution found (tolerance 1.00e-04)


Best objective 4.169782566000e+05, best bound 4.169782566000e+05, gap 0.0000%

X_opt =

1 0 0 0 0 0 0 0 0 0

0 0 1 0 0 0 0 0 0 0

0 0 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

0 0 1 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

Z_opt =

0
0

Y_opt =

0 0 0 1

0 0 0 0

1 0 0 0

0 0 1 0

0 0 0 0

0 1 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

PT_opt =

0 0 0 359.86

0 0 0 0

206.75 0 0 0

0 0 314.99 0

0 0 0 0

0 45.00 0 0

0 0 0 0

0 0 0 0
0 0 0 0

0 0 0 0

obj_opt =

4.1698e+05

Number_of_machines =

Appendix C
clear all; clc

prompt = "Enter the number of parts: ";


I = input(prompt); % number of parts
prompt = "Enter the number of Machines: ";
M = input(prompt); % number of machines
hi = [25, 38, 24, 27, 29, 26, 45,48,40,50]; % height of each part
ai = [30, 37, 45, 66, 89, 143, 55, 108, 97,100]; % area of each part
vi= hi.*ai;
J = I;
PT=0;
X=0; Y=0;

MA = [50,150,250,350];% productions area of the machine


HT = [0.015062,0.01065,0.0095,0.0125]; % time required for vertical
travel
MH = [32.5,40,55,50]; %Height of Machine
VT = [0.010864,0.03864,0.031,0.035]; % required time per unit volume of
material
SET = [2,1,2,3]; % machine's setup time
PPT=[1,2,1,2]; %post processing time
Ai=repmat(ai,J,1);

ops = sdpsettings('solver', 'gurobi', 'verbose', 2, 'debug', 1,


'showprogress', 1, 'cachesolvers', 1, 'usex0', 1);
H = repmat(hi,I,1);
V= repmat(vi,I,1);

X = binvar(I,J,'full');
Y = binvar(J,M, 'full');% binary variables indicating which job is
assigned to which machine
Z = binvar(J, 1, 'full');% binary variables indicating if a job has at
least one part
PT = sdpvar(J, M, 'full');

for j=1:J
for m=1:M
L = H.*X(:,:);
PT(j,m) = SET(m)*Z(j)*Y(j,m) +(VT(m)*(vi*X(:,j)*Y(j,m))) +
(HT(m)*(max(L(:,j))*Y(j,m))) + PPT(m)*Z(j)*Y(j,m);
end
end
CV=[200,400,300,450];
obj = 0;
for j = 1:M
for i = 1:I
obj = obj + (CV(m)* PT(i,j));
end
end

Q =sort(H, 'descend');
R=Q(1,:);
RR=repmat(R,J,1);
MHA=repmat(MH,J,1);
constraints = [sum(X, 2) == ones(I, 1), ... % Constraint 1
sum(Y, 2)== Z,...
((sum(Ai'.*X)*Y)) <= MA, ... % Constraint 2
(RR.*X)*Y<=MHA,
J <= I,...
Z>= max(X, [], 1)',...
Y>=0,...
Z>= 0, Z<=1,...
X >= 0, X <= 1]; % Constraint 6
optimize(constraints, obj,ops);

% Retrieve the optimal solution


X_opt = value(X)
Z_opt=value(Z)
Y_opt=value(Y)
PT_opt = value(PT)
obj_opt = value(obj)
has_non_zero = any(X_opt~= 0);
Number_of_jobs = sum(has_non_zero);
has_non_zero = any(Y_opt~= 0);
Number_of_machines = sum(has_non_zero)
RESULT for Appendix C

APPENDIX C

Enter the number of parts: 10

Enter the number of Machines: 4

+ Solver chosen: GUROBI-NONCONVEX

+ Processing objective function

+ Processing constraints

+ Calling GUROBI

Set parameter Username

Set parameter NonConvex to value 2

Academic license - for non-commercial use only - expires 2024-04-08

Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (win64)

CPU model: Intel(R) Core(TM) i5-9300HF CPU @ 2.40GHz, instruction set [SSE2|AVX|AVX2]

Thread count: 4 physical cores, 8 logical processors, using up to 8 threads

Optimize a model with 1500 rows, 270 columns and 4030 nonzeros

Model fingerprint: 0xee0f51b8

Model has 480 quadratic objective terms

Model has 44 quadratic constraints

Variable types: 10 continuous, 260 integer (260 binary)

Coefficient statistics:

Matrix range [1e+00, 5e+01]

QMatrix range [2e+01, 1e+02]

Objective range [0e+00, 0e+00]

QObjective range [9e+00, 2e+05]

Bounds range [1e+00, 1e+00]


RHS range [1e+00, 5e+01]

QRHS range [3e+01, 4e+02]

Presolve removed 270 rows and 10 columns

Presolve time: 0.01s

Presolved: 1754 rows, 740 columns, 5990 nonzeros

Variable types: 0 continuous, 740 integer (690 binary)

Root relaxation: objective 1.163092e+03, 130 iterations, 0.00 seconds (0.00 work units)

Nodes | Current Node | Objective Bounds | Work

Expl Unexpl | Obi Depth Intan | Incumbent Bested Gap | It/Node Time

0 0 1163.09250 0 28 - 1163.09250 - - 0s

0 0 1215.81000 0 28 - 1215.81000 - - 0s

0 0 1227.79125 0 28 - 1227.79125 - - 0s

0 0 81629.7584 0 42 - 81629.7584 - - 0s

0 0 396498.623 0 54 - 396498.623 - - 0s

0 0 397206.188 0 54 - 397206.188 - - 0s

H 0 0 406025.53560 397206.188 2.17% - 0s

0 0 397724.433 0 52 406025.536 397724.433 2.04% - 0s

0 0 397724.433 0 52 406025.536 397724.433 2.04% - 0s

0 2 397831.308 0 52 406025.536 397831.308 2.02% - 0s

H 32 40 403851.46140 398043.939 1.44% 50.3 0s

H 86 71 403771.32810 398043.939 1.42% 37.4 0s

H 129 89 403767.05310 398043.939 1.42% 32.2 0s

H 175 129 403761.74310 398050.441 1.41% 29.3 0s

H 334 199 403750.49310 398980.731 1.18% 25.0 0s


* 1839 729 36 403748.82810 401646.266 0.52% 28.4 3s

H 4530 1180 403748.31060 401783.283 0.49% 28.2 4s

5743 1303 403519.963 30 20 403748.311 401998.033 0.43% 28.5 5s

H 9389 1863 403748.30694 402474.017 0.32% 27.8 6s

Cutting planes:

Gomory: 11

Lift-and-project: 3

Cover: 15

Implied bound: 21

Clique: 1

MIR: 32

StrongCG: 23

Flow cover: 237

GUB cover: 2

Inf proof: 9

Zero half: 51

RLT: 102

BQP: 8

Explored 17931 nodes (450246 simplex iterations) in 9.25 seconds (7.54 work units)

Thread count was 8 (of 8 available processors)

Solution count 10: 403748 403748 403748 ... 406026

Optimal solution found (tolerance 1.00e-04)

Best objective 4.037483106000e+05, best bound 4.037483069391e+05, gap 0.0000%


X_opt =

0 0 0 0 0 1 0 0 0 0

0 0 0 1 0 0 0 0 0 0

0 0 0 0 0 1 0 0 0 0

0 0 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 1 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

Z_opt =

0
Y_opt =

0 0 0 1

0 0 0 0

1 0 0 0

0 0 1 0

0 0 0 0

0 1 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

PT_opt =

0 0 0 361.57

0 0 0 0

30.24 0 0 0

0 0 362.54 0

0 0 0 0

0 142.84 0 0

0 0 0 0

0 0 0 0

0 0 0 0
0 0 0 0

obj_opt =

4.0375e+05

Number_of_machines =

Appendix D

clear all; clc

prompt = "Enter the number of parts: ";


I = input(prompt); % number of parts
prompt = "Enter the number of Machines: ";
M = input(prompt); % number of machines
hi = [25, 38, 24, 27, 29, 26, 45,48,40,50]; % height of each part
ai = [25, 32, 31, 66, 89, 143, 55, 108, 97,100]; % area of each part
vi= hi.*ai;
J = I;
PT=0;
X=0; Y=0;

MA = [50,150,250,350];% productions area of the machine


HT = [0.015062,0.01065,0.0095,0.0125]; % time required for vertical
travel
MH = [32.5,40,55,50]; %Height of Machine
VT = [0.030864,0.03864,0.031,0.035]; % required time per unit volume of
material
SET = [2,1,2,3]; % machine's setup time
PPT=[1,2,1,2]; %post processing time
Ai=repmat(ai,J,1);
ops = sdpsettings('solver', 'gurobi', 'verbose', 2, 'debug', 1,
'showprogress', 1, 'cachesolvers', 1, 'usex0', 1);
H = repmat(hi,I,1);
V= repmat(vi,I,1);

X = binvar(I,J,'full');
Y = binvar(J,M, 'full');% binary variables indicating which job is
assigned to which machine
Z = binvar(J, 1, 'full');% binary variables indicating if a job has at
least one part
PT = sdpvar(J, M, 'full');

for j=1:J
for m=1:M
L = H.*X(:,:);
PT(j,m) = SET(m)*Z(j)*Y(j,m) +(VT(m)*(vi*X(:,j)*Y(j,m))) +
(HT(m)*(max(L(:,j))*Y(j,m))) + PPT(m)*Z(j)*Y(j,m);
end
end
CV=[200,400,300,450];
obj = 0;
for j = 1:M
for i = 1:I
obj = obj + (CV(m)* PT(i,j));
end
end

Q =sort(H, 'descend');
R=Q(1,:);
RR=repmat(R,J,1);
MHA=repmat(MH,J,1);
constraints = [sum(X, 2) == ones(I, 1), ... % Constraint 1
sum(Y, 2)== Z,...
((sum(Ai'.*X)*Y)) <= MA, ... % Constraint 2
(RR.*X)*Y<=MHA,
J <= I,...
Z>= max(X, [], 1)',...
Y>=0,...
Z>= 0, Z<=1,...
X >= 0, X <= 1]; % Constraint 6
optimize(constraints, obj,ops);

% Retrieve the optimal solution


X_opt = value(X)
Z_opt=value(Z)
Y_opt=value(Y)
PT_opt = value(PT)
obj_opt = value(obj)
has_non_zero = any(X_opt~= 0);
Number_of_jobs = sum(has_non_zero);
has_non_zero = any(Y_opt~= 0);
Number_of_machines = sum(has_non_zero)
Results for Appendix D

Enter the number of parts: 10

Enter the number of Machines: 4

+ Solver chosen : GUROBI-NONCONVEX

+ Processing objective function

+ Processing constraints

+ Calling GUROBI

Set parameter Username

Set parameter NonConvex to value 2

Academic license - for non-commercial use only - expires 2024-04-08

Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (win64)

CPU model: Intel(R) Core(TM) i5-9300HF CPU @ 2.40GHz, instruction set [SSE2|AVX|AVX2]

Thread count: 4 physical cores, 8 logical processors, using up to 8 threads

Optimize a model with 1500 rows, 270 columns and 4030 nonzeros

Model fingerprint: 0xf2860d20

Model has 480 quadratic objective terms

Model has 44 quadratic constraints

Variable types: 10 continuous, 260 integer (260 binary)

Coefficient statistics:

Matrix range [1e+00, 5e+01]

QMatrix range [2e+01, 1e+02]

Objective range [0e+00, 0e+00]

QObjective range [9e+00, 2e+05]


Bounds range [1e+00, 1e+00]

RHS range [1e+00, 5e+01]

QRHS range [3e+01, 4e+02]

Presolve removed 270 rows and 10 columns

Presolve time: 0.01s

Presolved: 1754 rows, 740 columns, 5990 nonzeros

Variable types: 0 continuous, 740 integer (690 binary)

Root relaxation: objective 1.163092e+03, 130 iterations, 0.00 seconds (0.00 work units)

Nodes | Current Node | Objective Bounds | Work

Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

0 0 1163.09250 0 28 - 1163.09250 - - 0s

0 0 1215.81000 0 30 - 1215.81000 - - 0s

0 0 1227.79125 0 32 - 1227.79125 - - 0s

0 0 96228.6061 0 43 - 96228.6061 - - 0s

0 0 405331.531 0 55 - 405331.531 - - 0s

H 0 0 413191.83960 405331.531 1.90% - 0s

0 0 405331.531 0 56 413191.840 405331.531 1.90% - 0s

0 0 406092.296 0 77 413191.840 406092.296 1.72% - 0s

0 0 406092.296 0 77 413191.840 406092.296 1.72% - 0s

0 0 406599.980 0 53 413191.840 406599.980 1.60% - 0s

0 0 406599.980 0 50 413191.840 406599.980 1.60% - 0s

0 2 406660.421 0 50 413191.840 406660.421 1.58% - 0s

H 159 108 413174.31300 406801.555 1.54% 27.0 0s

H 867 534 413171.61300 408282.064 1.18% 23.5 0s


H 3411 821 413171.09550 411048.234 0.51% 29.4 4s

3833 893 413045.454 36 9 413171.096 411181.214 0.48% 29.4 5s

H 3883 890 413169.94260 411215.436 0.47% 29.3 5s

Cutting planes:

Gomory: 3

Lift-and-project: 3

Cover: 4

Implied bound: 21

Clique: 1

MIR: 30

StrongCG: 15

Flow cover: 185

GUB cover: 4

Inf proof: 6

Zero half: 44

RLT: 108

BQP: 13

Explored 13215 nodes (312183 simplex iterations) in 8.42 seconds (6.17 work units)

Thread count was 8 (of 8 available processors)

Solution count 5: 413170 413171 413172 ... 413192

Optimal solution found (tolerance 1.00e-04)

Best objective 4.131699426000e+05, best bound 4.131699426000e+05, gap 0.0000%


X_opt =

0 0 1 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

0 0 0 0 0 1 0 0 0 0

0 0 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 1 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0

Z_opt =

0
0

Y_opt =

0 0 0 1

0 0 0 0

1 0 0 0

0 0 1 0

0 0 0 0

0 1 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

PT_opt =

0 0 0 361.5775

0 0 0 0

99.0399 0 0 0

0 0 356.6565 0

0 0 0 0

0 100.8815 0 0

0 0 0 0

0 0 0 0

0 0 0 0
0 0 0 0

obj_opt =

4.1317e+05

Number_of_machines = 4
Bounds range [1e+00, 1e+00]

RHS range [1e+00, 5e+01]

QRHS range [3e+01, 4e+02]

Presolve removed 270 rows and 10 columns

Presolve time: 0.04s

Presolved: 1754 rows, 740 columns, 5990 nonzeros

Variable types: 0 continuous, 740 integer (690 binary)

Root relaxation: objective 1.163092e+03, 141 iterations, 0.01 seconds (0.00 work units)

Nodes | Current Node | Objective Bounds | Work

Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

0 0 1163.09250 0 28 - 1163.09250 - - 0s

0 0 1215.81000 0 28 - 1215.81000 - - 0s

You might also like