From f7c5cbc61d5b52c749824298cfa39a95db2d879c Mon Sep 17 00:00:00 2001 From: Harpreet Date: Fri, 29 Jan 2016 16:38:03 +0530 Subject: linprog general tests added --- etc/FOSSEE_Optimization_Toolbox.quit | 36 ++++++++++++++ etc/FOSSEE_Optimization_Toolbox.start | 87 +++++++++++++++++++++++++++++++++ etc/Symphony.quit | 36 -------------- etc/Symphony.start | 92 ----------------------------------- 4 files changed, 123 insertions(+), 128 deletions(-) create mode 100644 etc/FOSSEE_Optimization_Toolbox.quit create mode 100644 etc/FOSSEE_Optimization_Toolbox.start delete mode 100644 etc/Symphony.quit delete mode 100644 etc/Symphony.start (limited to 'etc') diff --git a/etc/FOSSEE_Optimization_Toolbox.quit b/etc/FOSSEE_Optimization_Toolbox.quit new file mode 100644 index 0000000..8e6aa18 --- /dev/null +++ b/etc/FOSSEE_Optimization_Toolbox.quit @@ -0,0 +1,36 @@ +// Copyright (C) 2015 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Harpreet Singh +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +function quitModule() + + etc_tlbx = get_absolute_file_path("FOSSEE_Optimization_Toolbox.quit"); + etc_tlbx = getshortpathname(etc_tlbx); + root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") ); + + //unlink libraries + [bOK, ilib] = c_link('FOSSEE_Optimization_Toolbox'); + if bOK then + ulink(ilib); + end + + // Remove Preferences GUI + // ============================================================================= + if getscilabmode() == "STD" then + removeModulePreferences(root_tlbx); + end + +endfunction + + +quitModule(); +clear quitModule; + diff --git a/etc/FOSSEE_Optimization_Toolbox.start b/etc/FOSSEE_Optimization_Toolbox.start new file mode 100644 index 0000000..894d577 --- /dev/null +++ b/etc/FOSSEE_Optimization_Toolbox.start @@ -0,0 +1,87 @@ +// Copyright (C) 2015 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Harpreet Singh +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +mprintf("Start FOSSEE Optimization Toolbox\n"); + +if ( isdef("sym_open") ) then + warning("Library is already loaded"); + return; +end + +etc_tlbx = get_absolute_file_path("FOSSEE_Optimization_Toolbox.start"); +etc_tlbx = getshortpathname(etc_tlbx); +root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") ); + +//Load functions library +// ============================================================================= +mprintf("\tLoad macros\n"); +pathmacros = pathconvert( root_tlbx ) + "macros" + filesep(); +symphony_lib = lib(pathmacros); +clear pathmacros; + +// load gateways +// ============================================================================= + +mprintf("\tLoad gateways\n"); +[a, opt] = getversion(); +Version = opt(2); +ilib_verbose(0); +if getos()=="Windows" then + error(msprintf(gettext("Module is not for Windows."))); +else + lib_path = root_tlbx + "/thirdparty/linux/lib/" + Version; + link(lib_path + "/libCoinUtils.so"); + link(lib_path + "/libClp.so"); + link(lib_path + "/libClpSolver.so"); + link(lib_path + "/libOsi.so"); + link(lib_path + "/libOsiCommonTests.so"); + link(lib_path + "/libOsiClp.so"); + link(lib_path + "/libCgl.so"); + link(lib_path + "/libSym.so"); + link(lib_path + "/libOsiSym.so"); + link(lib_path + "/libcoinblas.so"); + link(lib_path + "/libcoinlapack.so"); + link(lib_path + "/libcoinmumps.so"); + link(lib_path + "/libipopt.so"); +end +exec(pathconvert(root_tlbx + filesep() + "sci_gateway" + filesep() + "loader_gateway.sce",%f)); + +// Load and add help chapter +// ============================================================================= +if ( %t ) then +if or(getscilabmode() == ["NW";"STD"]) then + mprintf("\tLoad help\n"); + path_addchapter = pathconvert(root_tlbx+"/jar"); + if ( isdir(path_addchapter) <> [] ) then + add_help_chapter("FOSSEE_Optimization_Toolbox", path_addchapter, %F); + clear add_help_chapter; + end + clear path_addchapter; +end +end + +// add demos +// ============================================================================= + +if ( %t ) then +if or(getscilabmode() == ["NW";"STD"]) then + mprintf("\tLoad demos\n"); + pathdemos = pathconvert(root_tlbx+"/demos/sci_FOSSEE_Optimization_Toolbox.dem.gateway.sce",%f,%t); + add_demo("FOSSEE_Optimization_Toolbox",pathdemos); + clear pathdemos ; +end +end + +// ============================================================================= + +clear root_tlbx; +clear etc_tlbx; + diff --git a/etc/Symphony.quit b/etc/Symphony.quit deleted file mode 100644 index 1eabef8..0000000 --- a/etc/Symphony.quit +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2015 - IIT Bombay - FOSSEE -// -// Author: Harpreet Singh -// Organization: FOSSEE, IIT Bombay -// Email: harpreet.mertia@gmail.com -// This file must be used under the terms of the CeCILL. -// This source file is licensed as described in the file COPYING, which -// you should have received as part of this distribution. The terms -// are also available at -// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - - -function quitModule() - - etc_tlbx = get_absolute_file_path("Symphony.quit"); - etc_tlbx = getshortpathname(etc_tlbx); - root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") ); - - //unlink libraries - [bOK, ilib] = c_link('FAMOS'); - if bOK then - ulink(ilib); - end - - // Remove Preferences GUI - // ============================================================================= - if getscilabmode() == "STD" then - removeModulePreferences(root_tlbx); - end - -endfunction - - -quitModule(); -clear quitModule; - diff --git a/etc/Symphony.start b/etc/Symphony.start deleted file mode 100644 index 328357a..0000000 --- a/etc/Symphony.start +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2015 - IIT Bombay - FOSSEE -// -// Author: Harpreet Singh -// Organization: FOSSEE, IIT Bombay -// Email: harpreet.mertia@gmail.com -// This file must be used under the terms of the CeCILL. -// This source file is licensed as described in the file COPYING, which -// you should have received as part of this distribution. The terms -// are also available at -// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - -mprintf("Start FAMOS\n"); - -if ( isdef("sym_open") ) then - warning("Library is already loaded"); - return; -end - -etc_tlbx = get_absolute_file_path("Symphony.start"); -etc_tlbx = getshortpathname(etc_tlbx); -root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") ); - -//Load functions library -// ============================================================================= -mprintf("\tLoad macros\n"); -pathmacros = pathconvert( root_tlbx ) + "macros" + filesep(); -symphony_lib = lib(pathmacros); -clear pathmacros; - -// load gateways -// ============================================================================= - -mprintf("\tLoad gateways\n"); -[a, opt] = getversion(); -Version = opt(2); -ilib_verbose(0); -if getos()=="Windows" then - error(msprintf(gettext("Module is not for Windows."))); -else - lib_path = root_tlbx + "/thirdparty/linux/lib/" + Version; - link(lib_path + "/libCoinUtils.so"); - link(lib_path + "/libClp.so"); - link(lib_path + "/libClpSolver.so"); - link(lib_path + "/libOsi.so"); - link(lib_path + "/libOsiCommonTests.so"); - link(lib_path + "/libOsiClp.so"); - link(lib_path + "/libCgl.so"); - link(lib_path + "/libSym.so"); - link(lib_path + "/libOsiSym.so"); - link(lib_path + "/libcoinblas.so"); - link(lib_path + "/libcoinlapack.so"); - link(lib_path + "/libcoinmumps.so"); - link(lib_path + "/libipopt.so"); - - -end -exec(pathconvert(root_tlbx + filesep() + "sci_gateway" + filesep() + "loader_gateway.sce",%f)); - - - - -// Load and add help chapter -// ============================================================================= -if ( %t ) then -if or(getscilabmode() == ["NW";"STD"]) then - mprintf("\tLoad help\n"); - path_addchapter = pathconvert(root_tlbx+"/jar"); - if ( isdir(path_addchapter) <> [] ) then - add_help_chapter("Symphony", path_addchapter, %F); - clear add_help_chapter; - end - clear path_addchapter; -end -end - -// add demos -// ============================================================================= - -if ( %t ) then -if or(getscilabmode() == ["NW";"STD"]) then - mprintf("\tLoad demos\n"); - pathdemos = pathconvert(root_tlbx+"/demos/sci_symphony.dem.gateway.sce",%f,%t); - add_demo("Symphony",pathdemos); - clear pathdemos ; -end -end - -// ============================================================================= - -clear root_tlbx; -clear etc_tlbx; - -- cgit