summaryrefslogtreecommitdiff
path: root/sci_gateway/cpp/builder_gateway_cpp.sce
blob: 225edd877c8e72d05a53bb423fcf2b4ac4b4881d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// Author: Keyur Joshi, Sai Kiran, Iswarya and 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

mode(-1)
lines(0)

toolbox_title = "FAMOS";

[a, opt] = getversion();
Version = opt(2);

path_builder = get_absolute_file_path('builder_gateway_cpp.sce');

tools_path  = path_builder + "../../thirdparty/linux/";

C_Flags=["-w -fpermissive -I"+tools_path+"include/coin -Wl,-rpath="+tools_path+"lib/"+Version+filesep()+" "]

Linker_Flag = ["-L"+tools_path+"lib/"+Version+filesep()+"libSym"+" "+"-L"+tools_path+"lib/"+Version+filesep()+"libipopt" ]


//Name of All the Functions
Function_Names = [
		//for opening/closing environment and checking if it is open/close
		"sym_open","sci_sym_open";
		"sym_close","sci_sym_close";
		"sym_isEnvActive","sci_sym_isEnvActive";
		
		//run time parameters
		"sym_resetParams","sci_sym_set_defaults";
		"sym_setIntParam","sci_sym_set_int_param";
		"sym_getIntParam","sci_sym_get_int_param";
		"sym_setDblParam","sci_sym_set_dbl_param";
		"sym_getDblParam","sci_sym_get_dbl_param";
		"sym_setStrParam","sci_sym_set_str_param";
		"sym_getStrParam","sci_sym_get_str_param";
		"sym_getInfinity","sci_sym_getInfinity";
		
		//problem loaders
		"sym_loadProblemBasic","sci_sym_loadProblemBasic";
		"sym_loadProblem","sci_sym_loadProblem";
		"sym_loadMPS","sci_sym_load_mps";
		
		//basic data
		"sym_getNumConstr","sci_sym_get_num_int";
		"sym_getNumVar","sci_sym_get_num_int";
		"sym_getNumElements","sci_sym_get_num_int";
		
		//variable and objective data
		"sym_isContinuous","sci_sym_isContinuous";
		"sym_isBinary","sci_sym_isBinary";
		"sym_isInteger","sci_sym_isInteger";
		"sym_setContinuous","sci_sym_set_continuous";
		"sym_setInteger","sci_sym_set_integer";
		"sym_getVarLower","sci_sym_get_dbl_arr";
		"sym_getVarUpper","sci_sym_get_dbl_arr";
		"sym_setVarLower","sci_sym_setVarBound";
		"sym_setVarUpper","sci_sym_setVarBound";
		"sym_getObjCoeff","sci_sym_get_dbl_arr";
		"sym_setObjCoeff","sci_sym_setObjCoeff";
		"sym_getObjSense","sci_sym_getObjSense";
		"sym_setObjSense","sci_sym_setObjSense";
		
		//constraint data
		"sym_getRhs","sci_sym_get_dbl_arr";
		"sym_getConstrRange","sci_sym_get_dbl_arr";
		"sym_getConstrLower","sci_sym_get_dbl_arr";
		"sym_getConstrUpper","sci_sym_get_dbl_arr";
		"sym_setConstrLower","sci_sym_setConstrBound";
		"sym_setConstrUpper","sci_sym_setConstrBound";
		"sym_setConstrType","sci_sym_setConstrType";
		"sym_getMatrix","sci_sym_get_matrix";
		"sym_getConstrSense","sci_sym_get_row_sense";
		
		//add/remove variables and constraints
		"sym_addConstr","sci_sym_addConstr";
		"sym_addVar","sci_sym_addVar";
		"sym_deleteVars","sci_sym_delete_cols";
		"sym_deleteConstrs","sci_sym_delete_rows";
		
		//primal bound
		"sym_getPrimalBound","sci_sym_getPrimalBound";
		"sym_setPrimalBound","sci_sym_setPrimalBound";
		
		//set preliminary solution
		"sym_setVarSoln","sci_sym_setColSoln";
		
		//solve
		"sym_solve","sci_sym_solve";
		
		//post solve functions
		"sym_getStatus","sci_sym_get_status";
		"sym_isOptimal","sci_sym_get_solver_status";
		"sym_isInfeasible","sci_sym_get_solver_status";
		"sym_isAbandoned","sci_sym_get_solver_status";
		"sym_isIterLimitReached","sci_sym_get_solver_status";
		"sym_isTimeLimitReached","sci_sym_get_solver_status";
		"sym_isTargetGapAchieved","sci_sym_get_solver_status";
		"sym_getVarSoln","sci_sym_getVarSoln";
		"sym_getObjVal","sci_sym_getObjVal";
		"sym_getIterCount","sci_sym_get_iteration_count";
		"sym_getConstrActivity","sci_sym_getRowActivity";

		//QP function
		"solveqp","sci_solveqp"
	];

//Name of all the files to be compiled
Files = [
		"globals.cpp",
		"sci_iofunc.hpp",
		"sci_iofunc.cpp",
		"sci_sym_openclose.cpp",
		"sci_solver_status_query_functions.cpp",
		"sci_sym_solve.cpp",
		"sci_sym_loadproblem.cpp",
		"sci_sym_isenvactive.cpp",
		"sci_sym_load_mps.cpp",
		"sci_vartype.cpp",
		"sci_sym_getinfinity.cpp",
		"sci_sym_solution.cpp",
		"sym_data_query_functions.cpp"
		"sci_sym_set_variables.cpp",
		"sci_sym_setobj.cpp",
		"sci_sym_varbounds.cpp",
		"sci_sym_rowmod.cpp",
		"sci_sym_set_indices.cpp",
		"sci_sym_addrowcol.cpp",
		"sci_sym_primalbound.cpp",
		"sci_sym_setcolsoln.cpp",
		"sci_sym_getrowact.cpp",
		"sci_sym_getobjsense.cpp",
		"sci_sym_remove.cpp",
		"sci_QuadNLP.cpp",
		"QuadNLP.hpp",
		"sci_ipopt.cpp"
				
	]

tbx_build_gateway(toolbox_title,Function_Names,Files,get_absolute_file_path("builder_gateway_cpp.sce"), [], Linker_Flag, C_Flags, [], "g++");

clear WITHOUT_AUTO_PUTLHSVAR toolbox_title Function_Names Files Linker_Flag C_Flags;