Hi Din,
To solve this problem, we need to find the optimal number of excavators, reactors, and 3D printers that will complete the task in 3650 days while minimizing the total mass of the equipment. We can approach this by iterating over possible combinations of excavators, reactors, and printers and calculating the total mass and days required for each combination. Then, we select the combination that meets the time constraint and has the smallest mass.
Here's a MATLAB script that does this:
m_sheet = linspace(100, 10000, 200);
excav_cap_per_excavator = 6536;
prod_rate_react_per_reactor = 7 * 24;
deposition_rate_per_printer = 14.4;
optimal_combination = [];
days_excav = ceil(m_sheet ./ (n_excav * excav_cap_per_excavator));
days_react = ceil(m_sheet ./ (n_react * prod_rate_react_per_reactor));
days_print = ceil(m_sheet ./ (n_printer * deposition_rate_per_printer));
max_days = max([days_excav; days_react; days_print], [], 1);
if all(max_days <= days_req)
total_mass = n_excav * m_excav + n_react * m_react + n_printer * m_printer;
optimal_combination = [n_excav, n_react, n_printer];
fprintf('Optimal number of excavators: %d\n', optimal_combination(1));
fprintf('Optimal number of reactors: %d\n', optimal_combination(2));
fprintf('Optimal number of printers: %d\n', optimal_combination(3));
fprintf('Minimum total mass: %.2f kg\n', min_mass);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1755979/image.png)
Explanation for the above code:
- Iterate over combinations: We loop through possible numbers of excavators, reactors, and printers (from 1 to 200).
- Calculate days required: For each combination, calculate the number of days required for each process.
- Check feasibility: Ensure that the maximum number of days required for any sheet is within the allowed 3650 days.
- Calculate total mass: Compute the total mass for the current combination.
- Track optimal solution: Update the optimal solution if the current combination has a lower total mass.
This script should help you figure out the optimal