Memuat
Memuat
Linear Programming (linprog) for Precision Agriculture
0 views
Optimise total production with Linear Programming (linprog) by selecting the best rice plot area and irrigation water volume. 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 total production with Linear Programming (linprog) by selecting the best rice plot area and irrigation water volume.
| Role | Variable | Unit |
|---|---|---|
| Main | Total production | ton |
| Supporting 1 | Rice plot area | ha |
| Supporting 2 | Irrigation water volume | m³ |
Linear programming gives a maximum Total production of 219.98 at Rice plot area=20.21 and Irrigation water volume=13.27; 2 constraints are binding, the shadow price of resource 1 is 2.076, and mean resource utilisation is 88%.
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);
rice_plot_area = x(1);
total_production = -fval;
fprintf('x1 = %.3f, x2 = %.3f, max profit = %.2f (exitflag %d)\n', x(1), x(2), total_production, 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$28
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$169
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 Precision Agriculture. 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$28, Package 2 (your data analysis and interpretation) US$75 and Package 3 (full guidance) US$169, 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