フィルターのクリア

Running CLP Solver (COIN-OR) from MATLAB

21 ビュー (過去 30 日間)
Dursun
Dursun 2011 年 4 月 27 日
回答済み: UDAYA PEDDIRAJU 2024 年 8 月 21 日 6:45
Hello everyone, I want to use the COIN-OR CLP linear program solver from MATLAB. Is it possible to create a function in matlab with inputs and outputs, which solves the LP using CLP solver? I'll appreciate any guidance. Best, Dursun
  2 件のコメント
Omid
Omid 2024 年 8 月 20 日 16:11
Umar
Umar 2024 年 8 月 21 日 6:18

Hi @Dursun,

Try clicking this link which will help resolve your problem.

https://www.mathworks.com/matlabcentral/fileexchange/25259-linear-mixed-integer-program-solver

You need to select sol==3 for CLP. Hope this helps.

サインインしてコメントする。

回答 (1 件)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024 年 8 月 21 日 6:45
Hi Dursun,
Your solution involves creating a MATLAB function that interfaces with the COIN-OR CLP solver to solve linear programming problems. Follow the below steps
  1. Install COIN-OR CLP: First, ensure that you have the COIN-OR CLP solver installed on your system.
  2. You'll need to use a MATLAB interface for CLP. One common approach is to use the mex function to call CLP from MATLAB.
  3. Create a MATLAB Function: Define a MATLAB function that takes the necessary inputs for your linear programming problem (such as the coefficients of the objective function, constraint matrices, and bounds) and outputs the solution.
function [x, fval, exitflag] = solveLPWithCLP(f, A, b, Aeq, beq, lb, ub)
% Add path to CLP solver binaries
% Set up options for CLP if needed
% Call the CLP solver using the mex function or appropriate interface
% Example: [x, fval, exitflag] = clp(f, A, b, Aeq, beq, lb, ub);
% Placeholder for actual call to CLP
[x, fval, exitflag] = deal([]); % Replace with actual solver call
end
This should give you a good starting point. As pointed by the Umar you can also refer to the page: https://www.mathworks.com/matlabcentral/fileexchange/25259-linear-mixed-integer-program-solver

カテゴリ

Help Center および File ExchangeSystems of Nonlinear Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by