Memuat
Memuat
Linear Programming (linprog) for Robotics and Mechatronics
0 views
Optimise the products per hour with linprog by tuning the robot A work time and the robot B work time within realistic constraints. linprog solves linear programming problems: maximising or minimising a linear function under linear constraints. It is used for resource allocation, production mix, and transport or scheduling problems.

Optimise the products per hour with linprog by tuning the robot A work time and the robot B work time within realistic constraints.
| Role | Variable | Unit |
|---|---|---|
| Main | Products per hour | unit/jam |
| Supporting 1 | Robot A work time | menit |
| Supporting 2 | Robot B work time | menit |
Linear programming gives a maximum Products per hour of 159.76 at Robot A work time=23.01 and Robot B work time=11.80; 2 constraints are binding, the shadow price of resource 1 is 0.864, and mean resource utilisation is 86%.
Computed from illustrative synthetic data, not from a real study.
linprog solves linear programming problems: maximising or minimising a linear function under linear constraints. It is used for resource allocation, production mix, and transport or scheduling problems.
Report the optimal solution, objective value, and fully used resources. Explain shadow prices to show which resource is most valuable to expand.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
f = -[40; 30]; % maximise 40*x1 + 30*x2
A = [2 1; 1 2; 1 0]; % machine, labour, market limit
b = [100; 80; 40];
lb = [0; 0];
opts = optimoptions('linprog', 'Display', 'off');
[x, fval, exitflag, output, lambda] = linprog(f, A, b, [], [], lb, [], opts);
robot_a_work_time = x(1);
products_per_hour = -fval;
fprintf('x1 = %.3f, x2 = %.3f, max profit = %.2f (exitflag %d)\n', x(1), x(2), products_per_hour, exitflag);
fprintf('Slack: %s\n', mat2str(b - A*x, 4));
fprintf('Shadow prices: %s\n', mat2str(-lambda.ineqlin', 4));
xs = linspace(0, 60, 200);
figure; hold on;
plot(xs, 100 - 2*xs, xs, (80 - xs)/2);
xline(40, 'g');
plot(x(1), x(2), 'ro', 'MarkerSize', 9);
xlim([0 60]); ylim([0 60]); grid on;
xlabel('x_1'); ylabel('x_2'); legend('Machine', 'Labour', 'Market', 'Optimum');Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$25
excl. 11% VAT
Duration: 5 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$75
excl. 11% VAT
Duration: 9 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$166
excl. 11% VAT
Duration: 14-17 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Linear Programming (linprog) is commonly used at this level in Robotics and Mechatronics. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output MATLAB gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$25, Package 2 (your data analysis and interpretation) US$75 and Package 3 (full guidance) US$166, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. MATLAB is a trademark of The MathWorks, Inc.
Back to MATLAB portfolio