Skip to content

Commit 9ce9411

Browse files
committed
toolbox cleaned, works on linux, fmincon fails
1 parent 187fcc4 commit 9ce9411

12 files changed

+272
-23
lines changed

etc/FOSSEE_Optimization_Toolbox.start

+19-20
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,25 @@ elseif getos()=="Darwin" then
4646
link(thirdparty_lib_path);
4747
end
4848
else
49-
lib_path = root_tlbx + "/thirdparty/linux/lib/" + Version;
50-
link(lib_path + "/libgfortran.so");
51-
link(lib_path + "/libCoinUtils.so");
52-
link(lib_path + "/libClp.so");
53-
link(lib_path + "/libClpSolver.so");
54-
link(lib_path + "/libOsi.so");
55-
link(lib_path + "/libOsiCommonTests.so");
56-
link(lib_path + "/libOsiClp.so");
57-
link(lib_path + "/libCgl.so");
58-
link(lib_path + "/libSym.so");
59-
link(lib_path + "/libOsiSym.so");
60-
link(lib_path + "/libcoinblas.so");
61-
link(lib_path + "/libcoinlapack.so");
62-
link(lib_path + "/libcoinmumps.so");
63-
link(lib_path + "/libipopt.so");
64-
link(lib_path + "/libCbc.so");
65-
link(lib_path + '/libbonmin.so');
66-
link(lib_path + "/libecos.so");
67-
link(lib_path + "/libalgencan.so");
68-
49+
//lib_path = root_tlbx + "/thirdparty/linux/lib/" + Version;
50+
lib_path = root_tlbx + "/thirdparty/linux/lib/";
51+
//##############
52+
link(lib_path + "/libCoinUtils.so");
53+
link(lib_path + "/libClp.so");
54+
link(lib_path + "/libClpSolver.so");
55+
link(lib_path + "/libOsi.so");
56+
link(lib_path + "/libOsiCommonTests.so");
57+
link(lib_path + "/libOsiClp.so");
58+
link(lib_path + "/libCgl.so");
59+
link(lib_path + "/libCbc.so");
60+
link(lib_path + "/libCbcSolver.so");
61+
link(lib_path + "/libgfortran.so");
62+
link(lib_path + "/libcoinblas.so");
63+
link(lib_path + "/libcoinlapack.so");
64+
link(lib_path + "/libcoinmumps.so");
65+
link(lib_path + "/libipopt.so");
66+
link(lib_path + "/libbonmin.so");
67+
//##############
6968

7069
end
7170
exec(pathconvert(root_tlbx + filesep() + "sci_gateway" + filesep() + "loader_gateway.sce",%f));

help/en_US/master_help.xml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE book [
3+
<!--Begin Entities-->
4+
<!ENTITY ad086670b7b7eeb078c4f4dcc172d1c7a SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fgoalattain.xml">
5+
<!ENTITY ab50d1d942c3f3cc16d267e2f2eb37ba8 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fminbnd.xml">
6+
<!ENTITY a52b8d144d95cd0b00dee3b46498b5a3a SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fmincon.xml">
7+
<!ENTITY a138e81ed16a7c44b0081096161fc9631 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fminimax.xml">
8+
<!ENTITY acb2f06176ff156493d59d42b2769e9d9 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fminunc.xml">
9+
<!ENTITY adb6b0645469e1efd615c93b665bc17d0 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/fot_version.xml">
10+
<!ENTITY acc394f2e5d96414d354a0a0a9b2d6fdc SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intfminbnd.xml">
11+
<!ENTITY a2c65557cc787e046049d227cac755c32 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intfmincon.xml">
12+
<!ENTITY aeb7f5bd3d820826bf1d91181864641a6 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intfminimax.xml">
13+
<!ENTITY afe762a92a7f6b15684d6d1a011992a23 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intfminunc.xml">
14+
<!ENTITY a58d17e008e4755a00913fae0a91d6f53 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intlinprog.xml">
15+
<!ENTITY a4f4f742692ffa563eaf9c0ff8c2135b0 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/intquadprog.xml">
16+
<!ENTITY a1855274a445c58ab46d6ff9dd753623d SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/linprog.xml">
17+
<!ENTITY a28de40bbcfa8459746efa24300753f31 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/lsqlin.xml">
18+
<!ENTITY a2e72f716ec54a03f72c3258c929f66e0 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/lsqnonlin.xml">
19+
<!ENTITY a3e089e786a0e1baba3e6deb48992a1d6 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/lsqnonneg.xml">
20+
<!ENTITY abc211a684a06809b8ce9ddb0c8cc04cb SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/quadprog.xml">
21+
<!ENTITY a2593879c566e714b985f776f42947c4b SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/quadprogCLP.xml">
22+
<!ENTITY aa62ccda18b51ad6a91953bfca8589078 SYSTEM "/home/rupak19/FOT-official-cleanup/check1/FOSSEE-Optimization-toolbox/help/en_US/quadprogmat.xml">
23+
<!--End Entities-->
24+
]>
25+
<book version="5.0-subset Scilab" xml:lang="en_US"
26+
xmlns="http://docbook.org/ns/docbook"
27+
xmlns:xlink="http://www.w3.org/1999/xlink"
28+
xmlns:xi="http://www.w3.org/2001/XInclude"
29+
xmlns:svg="http://www.w3.org/2000/svg"
30+
xmlns:mml="http://www.w3.org/1998/Math/MathML"
31+
xmlns:html="http://www.w3.org/1999/xhtml"
32+
xmlns:db="http://docbook.org/ns/docbook">
33+
<info xml:id='fossee_optimization_toolbox_manual'>
34+
<title>FOSSEE_Optimization_Toolbox</title>
35+
</info>
36+
37+
<part xml:id='section_3fca9694ff4dbc2e0d3d472f65942ab7'>
38+
<title>FOSSEE_Optimization_Toolbox</title>
39+
&ad086670b7b7eeb078c4f4dcc172d1c7a;
40+
&ab50d1d942c3f3cc16d267e2f2eb37ba8;
41+
&a52b8d144d95cd0b00dee3b46498b5a3a;
42+
&a138e81ed16a7c44b0081096161fc9631;
43+
&acb2f06176ff156493d59d42b2769e9d9;
44+
&adb6b0645469e1efd615c93b665bc17d0;
45+
&acc394f2e5d96414d354a0a0a9b2d6fdc;
46+
&a2c65557cc787e046049d227cac755c32;
47+
&aeb7f5bd3d820826bf1d91181864641a6;
48+
&afe762a92a7f6b15684d6d1a011992a23;
49+
&a58d17e008e4755a00913fae0a91d6f53;
50+
&a4f4f742692ffa563eaf9c0ff8c2135b0;
51+
&a1855274a445c58ab46d6ff9dd753623d;
52+
&a28de40bbcfa8459746efa24300753f31;
53+
&a2e72f716ec54a03f72c3258c929f66e0;
54+
&a3e089e786a0e1baba3e6deb48992a1d6;
55+
&abc211a684a06809b8ce9ddb0c8cc04cb;
56+
&a2593879c566e714b985f776f42947c4b;
57+
&aa62ccda18b51ad6a91953bfca8589078;
58+
</part>
59+
</book>

jar/scilab_en_US_help.jar

441 KB
Binary file not shown.

loader.sce

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This file is released under the 3-clause BSD license. See COPYING-BSD.
2+
// Generated by builder.sce: Please, do not edit this file
3+
4+
oldmode = mode(); mode(-1);
5+
oldlines = lines()(2); lines(0);
6+
try
7+
exec(get_absolute_file_path("loader.sce")+"etc/"+"FOSSEE_Optimization_Toolbox.start");
8+
catch
9+
[errmsg, tmp, nline, func] = lasterror()
10+
msg = "%s: error on line #%d: ""%s""\n"
11+
msg = msprintf(msg, func, nline, errmsg)
12+
lines(oldlines)
13+
mode(oldmode);
14+
clear oldlines oldmode tmp nline func
15+
error(msg);
16+
end
17+
lines(oldlines);
18+
mode(oldmode);
19+
clear oldlines oldmode;
20+

sci_gateway/cleaner_gateway.sce

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This file is released under the 3-clause BSD license. See COPYING-BSD.
2+
// Generated by builder_gateway.sce: Please, do not edit this file
3+
4+
sci_gateway_dir = get_absolute_file_path("cleaner_gateway.sce");
5+
current_dir = pwd();
6+
7+
chdir(sci_gateway_dir);
8+
if ( isdir("cpp") ) then
9+
chdir("cpp");
10+
exec("cleaner.sce");
11+
mdelete("cleaner.sce");
12+
end
13+
14+
chdir(current_dir);
15+
clear sci_gateway_dir current_dir;

sci_gateway/cpp/builder_gateway_cpp.sce

+4-3
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,13 @@ elseif getos()=="Darwin" then
411411

412412
else
413413
third_dir = path_builder+filesep()+'..'+filesep()+'..'+filesep()+'thirdparty';
414-
lib_base_dir = third_dir + filesep() + 'linux' + filesep() + 'lib' + filesep() + Version + filesep();
415-
inc_base_dir = third_dir + filesep() + 'linux' + filesep() + 'include' + filesep() + 'coin';
414+
lib_base_dir = third_dir + filesep() + 'linux' + filesep() + 'lib' + filesep();
415+
inc_base_dir = third_dir + filesep() + 'linux' + filesep() + 'include' + filesep() + 'coin-or';
416416

417417
C_Flags=["-D__USE_DEPRECATED_STACK_FUNCTIONS__ -w -fpermissive -I"+path_builder+" -I"+inc_base_dir+" -Wl,-rpath="+lib_base_dir+" "+"-std=gnu++11"+" -fno-zero-initialized-in-bss"]
418418

419-
libs = ["-L"+lib_base_dir+"libSym"+" "+"-L"+lib_base_dir+"libipopt"+" "+"-L"+lib_base_dir+"libClp"+" "+"-L"+lib_base_dir+"libOsiClp"+" "+"-L"+lib_base_dir+"libCoinUtils" ]
419+
libs = ["-L"+lib_base_dir+"libipopt"+" "+"-L"+lib_base_dir+"libClp"+" "+"-L"+lib_base_dir+"libOsiClp"+" "+"-L"+lib_base_dir+"libCoinUtils" ]
420+
libs=[]
420421

421422
end
422423

sci_gateway/cpp/cleaner.sce

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This file is released under the 3-clause BSD license. See COPYING-BSD.
2+
// Generated by builder.sce : Please, do not edit this file
3+
// cleaner.sce
4+
// ------------------------------------------------------
5+
curdir = pwd();
6+
cleaner_path = get_file_path('cleaner.sce');
7+
chdir(cleaner_path);
8+
// ------------------------------------------------------
9+
if fileinfo('loader.sce') <> [] then
10+
mdelete('loader.sce');
11+
end
12+
// ------------------------------------------------------
13+
if fileinfo('libFOSSEE_Optimization_Toolbox.so') <> [] then
14+
mdelete('libFOSSEE_Optimization_Toolbox.so');
15+
end
16+
// ------------------------------------------------------
17+
if fileinfo('libFOSSEE_Optimization_Toolbox.cpp') <> [] then
18+
mdelete('libFOSSEE_Optimization_Toolbox.cpp');
19+
end
20+
// ------------------------------------------------------
21+
if fileinfo('libFOSSEE_Optimization_Toolbox.hxx') <> [] then
22+
mdelete('libFOSSEE_Optimization_Toolbox.hxx');
23+
end
24+
// ------------------------------------------------------
25+
if fileinfo('libFOSSEE_Optimization_Toolbox.h') <> [] then
26+
mdelete('libFOSSEE_Optimization_Toolbox.h');
27+
end
28+
// ------------------------------------------------------
29+
chdir(curdir);
30+
// ------------------------------------------------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include <wchar.h>
2+
#include "libFOSSEE_Optimization_Toolbox.hxx"
3+
extern "C"
4+
{
5+
#include "libFOSSEE_Optimization_Toolbox.h"
6+
#include "addfunction.h"
7+
}
8+
9+
#define MODULE_NAME L"libFOSSEE_Optimization_Toolbox"
10+
11+
int libFOSSEE_Optimization_Toolbox(wchar_t* _pwstFuncName)
12+
{
13+
if(wcscmp(_pwstFuncName, L"linearprog") == 0){ addCFunction(L"linearprog", &sci_linearprog, MODULE_NAME); }
14+
if(wcscmp(_pwstFuncName, L"rmps") == 0){ addCFunction(L"rmps", &sci_rmps, MODULE_NAME); }
15+
if(wcscmp(_pwstFuncName, L"quadprog_CLP") == 0){ addCFunction(L"quadprog_CLP", &sci_quadprog_CLP, MODULE_NAME); }
16+
if(wcscmp(_pwstFuncName, L"solveqp") == 0){ addCFunction(L"solveqp", &sci_solveqp, MODULE_NAME); }
17+
if(wcscmp(_pwstFuncName, L"solveminuncp") == 0){ addCFunction(L"solveminuncp", &sci_solveminuncp, MODULE_NAME); }
18+
if(wcscmp(_pwstFuncName, L"solveminbndp") == 0){ addCFunction(L"solveminbndp", &sci_solveminbndp, MODULE_NAME); }
19+
if(wcscmp(_pwstFuncName, L"solveminconp") == 0){ addCFunction(L"solveminconp", &sci_solveminconp, MODULE_NAME); }
20+
if(wcscmp(_pwstFuncName, L"matintlinprog") == 0){ addCFunction(L"matintlinprog", &sci_matintlinprog, MODULE_NAME); }
21+
if(wcscmp(_pwstFuncName, L"mpsintlinprog") == 0){ addCFunction(L"mpsintlinprog", &sci_mpsintlinprog, MODULE_NAME); }
22+
if(wcscmp(_pwstFuncName, L"solveintqp") == 0){ addCFunction(L"solveintqp", &sci_solveintqp, MODULE_NAME); }
23+
if(wcscmp(_pwstFuncName, L"inter_fminunc") == 0){ addCFunction(L"inter_fminunc", &cpp_intfminunc, MODULE_NAME); }
24+
if(wcscmp(_pwstFuncName, L"inter_fminbnd") == 0){ addCFunction(L"inter_fminbnd", &cpp_intfminbnd, MODULE_NAME); }
25+
if(wcscmp(_pwstFuncName, L"inter_fmincon") == 0){ addCFunction(L"inter_fmincon", &cpp_intfmincon, MODULE_NAME); }
26+
if(wcscmp(_pwstFuncName, L"fotversion") == 0){ addCFunction(L"fotversion", &sci_fotversion, MODULE_NAME); }
27+
28+
return 1;
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#ifndef __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_H__
2+
#define __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_H__
3+
4+
#include "c_gateway_prototype.h"
5+
6+
C_GATEWAY_PROTOTYPE(cpp_intfminbnd);
7+
C_GATEWAY_PROTOTYPE(cpp_intfmincon);
8+
C_GATEWAY_PROTOTYPE(cpp_intfminunc);
9+
C_GATEWAY_PROTOTYPE(sci_fotversion);
10+
C_GATEWAY_PROTOTYPE(sci_linearprog);
11+
C_GATEWAY_PROTOTYPE(sci_matintlinprog);
12+
C_GATEWAY_PROTOTYPE(sci_mpsintlinprog);
13+
C_GATEWAY_PROTOTYPE(sci_quadprog_CLP);
14+
C_GATEWAY_PROTOTYPE(sci_rmps);
15+
C_GATEWAY_PROTOTYPE(sci_solveintqp);
16+
C_GATEWAY_PROTOTYPE(sci_solveminbndp);
17+
C_GATEWAY_PROTOTYPE(sci_solveminconp);
18+
C_GATEWAY_PROTOTYPE(sci_solveminuncp);
19+
C_GATEWAY_PROTOTYPE(sci_solveqp);
20+
21+
#endif /* __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_H__ */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifndef __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_HXX__
2+
#define __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_HXX__
3+
4+
#ifdef _MSC_VER
5+
#ifdef LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_EXPORTS
6+
#define LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_IMPEXP __declspec(dllexport)
7+
#else
8+
#define LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_IMPEXP __declspec(dllimport)
9+
#endif
10+
#else
11+
#define LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_IMPEXP
12+
#endif
13+
14+
extern "C" LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_IMPEXP int libFOSSEE_Optimization_Toolbox(wchar_t* _pwstFuncName);
15+
16+
17+
18+
#endif /* __LIBFOSSEE_OPTIMIZATION_TOOLBOX_GW_HXX__ */

sci_gateway/cpp/loader.sce

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// This file is released under the 3-clause BSD license. See COPYING-BSD.
2+
// Generated by builder.sce : Please, do not edit this file
3+
// ----------------------------------------------------------------------------
4+
//
5+
libFOSSEE_Optimizat_path = get_absolute_file_path('loader.sce');
6+
//
7+
// ulink previous function with same name
8+
[bOK, ilib] = c_link('libFOSSEE_Optimization_Toolbox');
9+
if bOK then
10+
ulink(ilib);
11+
end
12+
//
13+
list_functions = [ 'linearprog';
14+
'rmps';
15+
'quadprog_CLP';
16+
'solveqp';
17+
'solveminuncp';
18+
'solveminbndp';
19+
'solveminconp';
20+
'matintlinprog';
21+
'mpsintlinprog';
22+
'solveintqp';
23+
'inter_fminunc';
24+
'inter_fminbnd';
25+
'inter_fmincon';
26+
'fotversion';
27+
];
28+
addinter(libFOSSEE_Optimizat_path + filesep() + 'libFOSSEE_Optimization_Toolbox' + getdynlibext(), 'libFOSSEE_Optimization_Toolbox', list_functions);
29+
// remove temp. variables on stack
30+
clear libFOSSEE_Optimizat_path;
31+
clear bOK;
32+
clear ilib;
33+
clear list_functions;
34+
// ----------------------------------------------------------------------------

unloader.sce

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This file is released under the 3-clause BSD license. See COPYING-BSD.
2+
// Generated by builder.sce: Please, do not edit this file
3+
4+
oldmode = mode(); mode(-1);
5+
oldlines = lines()(2); lines(0);
6+
try
7+
fileQuit = get_absolute_file_path("unloader.sce") + "etc/" + "FOSSEE_Optimization_Toolbox.quit";
8+
if isfile(fileQuit) then
9+
exec(fileQuit);
10+
end
11+
catch
12+
[errmsg, tmp, nline, func] = lasterror()
13+
msg = "%s: error on line #%d: ""%s""\n"
14+
msg = msprintf(msg, func, nline, errmsg)
15+
lines(oldlines)
16+
mode(oldmode);
17+
clear oldlines oldmode tmp nline func
18+
error(msg);
19+
end
20+
lines(oldlines);
21+
mode(oldmode);
22+
clear oldlines oldmode;
23+

0 commit comments

Comments
 (0)