Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #2301

Closed
wants to merge 11 commits into from
Closed

Develop #2301

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/installation/compatMatrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Linux Ubuntu
~~~~~~~~~~~~

+-------------------+--------------------+--------------------+--------------------+--------------------+
| SolverName | R2021b | R2021a | R2020b | R2020a |
| SolverName | R2023b | R2021b | R2020b | R2020a |
+===================+====================+====================+====================+====================+
| IBM CPLEX 20.10 | |x| | |x| | |x| | |x| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -17,7 +17,7 @@ Linux Ubuntu
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -42,7 +42,7 @@ macOS 10.13+
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand All @@ -68,7 +68,7 @@ Windows 10
+-------------------+--------------------+--------------------+--------------------+--------------------+
| TOMLAB CPLEX 8.6 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| MOSEK 9.2 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
| MOSEK 10.1 | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
| GLPK | |white_check_mark| | |white_check_mark| | |white_check_mark| | |white_check_mark| |
+-------------------+--------------------+--------------------+--------------------+--------------------+
Expand Down
2 changes: 1 addition & 1 deletion external/visualization/MatGPT
Submodule MatGPT updated 36 files
+1 −0 .gitignore
+3 −0 .gitmodules
+ MatGPT.mlapp
+25 −11 README.md
+25 −33 contents/presets.csv
+35 −14 helpers/MsgHelper.m
+29 −0 helpers/imageGenGenerate.m
+1 −0 helpers/llms-with-matlab
+0 −153 helpers/llms-with-matlab/+llms/+internal/callOpenAIChatAPI.m
+0 −23 helpers/llms-with-matlab/+llms/+internal/getApiKeyFromNvpOrEnv.m
+0 −40 helpers/llms-with-matlab/+llms/+internal/sendRequest.m
+0 −51 helpers/llms-with-matlab/+llms/+stream/responseStreamer.m
+0 −56 helpers/llms-with-matlab/+llms/+utils/errorMessageCatalog.m
+0 −9 helpers/llms-with-matlab/+llms/+utils/isUnique.m
+0 −4 helpers/llms-with-matlab/+llms/+utils/mustBeNonzeroLengthTextScalar.m
+0 −10 helpers/llms-with-matlab/+llms/+utils/mustBeTextOrEmpty.m
+0 −340 helpers/llms-with-matlab/README.md
+0 −6 helpers/llms-with-matlab/SECURITY.md
+ helpers/llms-with-matlab/examples/ExampleChatBot.mlx
+ helpers/llms-with-matlab/examples/ExampleDALLE.mlx
+ helpers/llms-with-matlab/examples/ExampleFunctionCalling.mlx
+ helpers/llms-with-matlab/examples/ExampleGPT4Vision.mlx
+ helpers/llms-with-matlab/examples/ExampleJSONMode.mlx
+ helpers/llms-with-matlab/examples/ExampleParallelFunctionCalls.mlx
+ helpers/llms-with-matlab/examples/ExampleRetrievalAugmentedGeneration.mlx
+ helpers/llms-with-matlab/examples/ExampleStreaming.mlx
+ helpers/llms-with-matlab/examples/ExampleSummarization.mlx
+ helpers/llms-with-matlab/examples/images/bear.png
+ helpers/llms-with-matlab/examples/images/mask_bear.png
+0 −56 helpers/llms-with-matlab/extractOpenAIEmbeddings.m
+0 −7 helpers/llms-with-matlab/license.txt
+0 −387 helpers/llms-with-matlab/openAIChat.m
+0 −184 helpers/llms-with-matlab/openAIFunction.m
+0 −358 helpers/llms-with-matlab/openAIImages.m
+0 −323 helpers/llms-with-matlab/openAIMessages.m
+253 −0 helpers/openAIAudio.m
29 changes: 19 additions & 10 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function initCobraToolbox(updateToolbox)
global CBT_LP_SOLVER;
global CBT_QP_SOLVER;
global CBT_EP_SOLVER;
global CBT_CLP_SOLVER;
global CBT_MILP_SOLVER;
global CBT_MIQP_SOLVER;
global CBT_NLP_SOLVER;
Expand Down Expand Up @@ -358,6 +359,9 @@ function initCobraToolbox(updateToolbox)
% save the userpath
originalUserPath = path;

% requires the solver compatibility to be re-read at each initialisation
clear isCompatible

%These default tolerances are based on the default values for the Gurobi LP
%solver. Do not change them without first consulting with other developers.
%https://www.gurobi.com/documentation/9.0/refman/parameters.html
Expand Down Expand Up @@ -400,7 +404,7 @@ function initCobraToolbox(updateToolbox)
end

% define categories of solvers: LP, MILP, QP, MIQP, NLP
OPT_PROB_TYPES = {'LP', 'MILP', 'QP', 'MIQP', 'NLP','EP'};
OPT_PROB_TYPES = {'LP', 'MILP', 'QP', 'MIQP', 'NLP','EP','CLP'};

%Define a set of "use first" solvers, other supported solvers will also be added to the struct.
%This allows to assign them in any order but keep the most commonly used ones on top of the struct.
Expand All @@ -413,7 +417,7 @@ function initCobraToolbox(updateToolbox)

% active support - supported solvers
SOLVERS.gurobi.type = {'LP', 'MILP', 'QP', 'MIQP'};
SOLVERS.mosek.type = {'LP', 'QP','EP'};
SOLVERS.mosek.type = {'LP', 'QP','EP','CLP'};
SOLVERS.glpk.type = {'LP', 'MILP'};
SOLVERS.pdco.type = {'LP', 'QP','EP'};
SOLVERS.quadMinos.type = {'LP'};
Expand Down Expand Up @@ -470,6 +474,7 @@ function initCobraToolbox(updateToolbox)
catSolverNames.MIQP = {};
catSolverNames.NLP = {};
catSolverNames.EP = {};
catSolverNames.CLP = {};
for i = 1:length(supportedSolversNames)
SOLVERS.(supportedSolversNames{i}).installed = false;
SOLVERS.(supportedSolversNames{i}).working = false;
Expand Down Expand Up @@ -511,6 +516,7 @@ function initCobraToolbox(updateToolbox)
changeCobraSolver('glpk', 'LP', 0);
changeCobraSolver('pdco', 'QP', 0);
changeCobraSolver('mosek', 'EP', 0);
changeCobraSolver('mosek', 'CLP', 0);
changeCobraSolver('matlab', 'NLP', 0);
for k = 1:length(OPT_PROB_TYPES)
varName = horzcat(['CBT_', OPT_PROB_TYPES{k}, '_SOLVER']);
Expand All @@ -526,8 +532,8 @@ function initCobraToolbox(updateToolbox)
types = SOLVERS.(supportedSolversNames{i}).type;
catList{i} = SOLVERS.(supportedSolversNames{i}).categ;
for j = 1:length(types)
if 0 %set to 1 to debug a new solver
if strcmp(supportedSolversNames{i},'mosek') && strcmp(types{j},'EP')
if 1 %set to 1 to debug a new solver
if strcmp(supportedSolversNames{i},'mosek') && strcmp(types{j},'CLP')
pause(0.1)
end
end
Expand All @@ -546,6 +552,9 @@ function initCobraToolbox(updateToolbox)
if strcmp(supportedSolversNames{i},'mosek') && strcmp(types{j},'EP')
changeCobraSolver(supportedSolversNames{i}, types{j}, 0);
end
if strcmp(supportedSolversNames{i},'mosek') && strcmp(types{j},'CLP')
changeCobraSolver(supportedSolversNames{i}, types{j}, 0);
end
else
solverStatus(i, k + 1) = 0;
end
Expand Down Expand Up @@ -605,21 +614,21 @@ function initCobraToolbox(updateToolbox)

% print out a summary table
if ENV_VARS.printLevel
colFormat = '\t%-12s \t%-13s \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
colFormat = '\t%-12s \t%-13s \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
sep = '\t------------------------------------------------------------------------------\n';
fprintf('\n > Summary of available solvers and solver interfaces\n\n');
if ispc
topLineFormat = '\t\t\t\t\tSupport %5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
topLineFormat = '\t\t\t\t\tSupport %5s \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
else
topLineFormat = '\t\t\tSupport \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
topLineFormat = '\t\t\tSupport \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s \t%5s\n';
end
fprintf(topLineFormat, OPT_PROB_TYPES{1}, OPT_PROB_TYPES{2}, OPT_PROB_TYPES{3}, OPT_PROB_TYPES{4}, OPT_PROB_TYPES{5}, OPT_PROB_TYPES{6})
fprintf(topLineFormat, OPT_PROB_TYPES{1}, OPT_PROB_TYPES{2}, OPT_PROB_TYPES{3}, OPT_PROB_TYPES{4}, OPT_PROB_TYPES{5}, OPT_PROB_TYPES{6}, OPT_PROB_TYPES{7})
fprintf(sep);
for i = 1:length(catList)-2
fprintf(colFormat, rowNames{i}, catList{i}, statusTable{1}{i}, statusTable{2}{i}, statusTable{3}{i}, statusTable{4}{i}, statusTable{5}{i}, statusTable{6}{i})
fprintf(colFormat, rowNames{i}, catList{i}, statusTable{1}{i}, statusTable{2}{i}, statusTable{3}{i}, statusTable{4}{i}, statusTable{5}{i}, statusTable{6}{i}, statusTable{7}{i})
end
fprintf(sep);
fprintf(colFormat, rowNames{end}, catList{end}, statusTable{1}{end}, statusTable{2}{end}, statusTable{3}{end}, statusTable{4}{end}, statusTable{5}{end}, statusTable{6}{end})
fprintf(colFormat, rowNames{end}, catList{end}, statusTable{1}{end}, statusTable{2}{end}, statusTable{3}{end}, statusTable{4}{end}, statusTable{5}{end}, statusTable{6}{end}, statusTable{7}{end})
fprintf('\n + Legend: - = not applicable, 0 = solver not compatible or not installed, 1 = solver installed.\n\n\n')
end

Expand Down
Loading
Loading