├── .gitignore ├── CMakeLists.txt ├── INSTALL.md ├── LICENSE ├── README.md ├── examples ├── Linear.java ├── Multiknapsack.java ├── Nonlinear.java ├── Quadratic.java └── Read.java ├── java └── jscip │ ├── Constraint.java │ ├── Expression.java │ ├── MessageHandler.java │ ├── ObjMessagehdlr.java │ ├── SCIPJNI.java │ ├── SCIPJNIJNI.java │ ├── SCIP_BoundType.java │ ├── SCIP_Objsense.java │ ├── SCIP_OrbitopeType.java │ ├── SCIP_ParamEmphasis.java │ ├── SCIP_Retcode.java │ ├── SCIP_Stage.java │ ├── SCIP_Status.java │ ├── SCIP_Vartype.java │ ├── SCIP_VerbLevel.java │ ├── SWIGTYPE_p_FILE.java │ ├── SWIGTYPE_p_SCIP.java │ ├── SWIGTYPE_p_SCIP_BoundType.java │ ├── SWIGTYPE_p_SCIP_CONS.java │ ├── SWIGTYPE_p_SCIP_EXPR.java │ ├── SWIGTYPE_p_SCIP_HEUR.java │ ├── SWIGTYPE_p_SCIP_Messagehdlr.java │ ├── SWIGTYPE_p_SCIP_SOL.java │ ├── SWIGTYPE_p_SCIP_VAR.java │ ├── SWIGTYPE_p_char.java │ ├── SWIGTYPE_p_double.java │ ├── SWIGTYPE_p_int.java │ ├── SWIGTYPE_p_long_long.java │ ├── SWIGTYPE_p_p_SCIP.java │ ├── SWIGTYPE_p_p_SCIP_CONS.java │ ├── SWIGTYPE_p_p_SCIP_EXPR.java │ ├── SWIGTYPE_p_p_SCIP_SOL.java │ ├── SWIGTYPE_p_p_SCIP_VAR.java │ ├── SWIGTYPE_p_p_char.java │ ├── SWIGTYPE_p_p_p_SCIP_VAR.java │ ├── SWIGTYPE_p_unsigned_int.java │ ├── Scip.java │ ├── Solution.java │ └── Variable.java ├── make ├── make.detecthost ├── make.mingw.x86.msvc.dbg ├── make.mingw.x86.msvc.opt ├── make.mingw.x86_64.msvc.dbg ├── make.mingw.x86_64.msvc.opt └── make.project └── src ├── scipjni.i ├── scipjni_wrap.cxx └── scipjni_wrap.h /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.class 3 | *.jar 4 | obj/* 5 | lib/* -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #@file CMakeLists.txt 2 | #@brief CMake file for Java interface for the SCIP Optimization Suite 3 | #@author Robert Gottwald, Benjamin Mueller 4 | 5 | cmake_minimum_required (VERSION 3.3) 6 | project (JSCIPOpt) 7 | 8 | # per default compile a release version 9 | if (NOT CMAKE_BUILD_TYPE) 10 | set (CMAKE_BUILD_TYPE "Release") 11 | endif() 12 | 13 | # 14 | # find JNI and java 15 | # 16 | find_package (JNI REQUIRED JVM) 17 | find_package (Java REQUIRED) 18 | include (UseJava) 19 | 20 | # 21 | # list of all java sources 22 | # 23 | set(SWIG_JAVA_SOURCES 24 | ${PROJECT_SOURCE_DIR}/java/jscip/ObjMessagehdlr.java 25 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIPJNI.java 26 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIPJNIJNI.java 27 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_Retcode.java 28 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_Vartype.java 29 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_BoundType.java 30 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_ParamEmphasis.java 31 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_Objsense.java 32 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_OrbitopeType.java 33 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_VerbLevel.java 34 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_Status.java 35 | ${PROJECT_SOURCE_DIR}/java/jscip/SCIP_Stage.java 36 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_char.java 37 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_double.java 38 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_int.java 39 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_long_long.java 40 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_unsigned_int.java 41 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_FILE.java 42 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_char.java 43 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_p_SCIP_VAR.java 44 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_SCIP.java 45 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_SCIP_CONS.java 46 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_SCIP_SOL.java 47 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_SCIP_VAR.java 48 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_p_SCIP_EXPR.java 49 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_CONS.java 50 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP.java 51 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_BoundType.java 52 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_SOL.java 53 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_VAR.java 54 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_EXPR.java 55 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_HEUR.java 56 | ${PROJECT_SOURCE_DIR}/java/jscip/SWIGTYPE_p_SCIP_Messagehdlr.java 57 | ) 58 | 59 | set(JAVA_SOURCES 60 | ${SWIG_JAVA_SOURCES} 61 | ${PROJECT_SOURCE_DIR}/java/jscip/Constraint.java 62 | ${PROJECT_SOURCE_DIR}/java/jscip/Scip.java 63 | ${PROJECT_SOURCE_DIR}/java/jscip/Variable.java 64 | ${PROJECT_SOURCE_DIR}/java/jscip/Expression.java 65 | ${PROJECT_SOURCE_DIR}/java/jscip/Constraint.java 66 | ${PROJECT_SOURCE_DIR}/java/jscip/Solution.java 67 | ${PROJECT_SOURCE_DIR}/java/jscip/MessageHandler.java 68 | ) 69 | 70 | # 71 | # find SWIG 72 | # 73 | find_package (SWIG) 74 | if (SWIG_FOUND) 75 | add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/scipjni_wrap.cxx ${SWIG_JAVA_SOURCES} 76 | COMMAND ${SWIG_EXECUTABLE} -package jscip -c++ -java -outdir ${PROJECT_SOURCE_DIR}/java/jscip/ ${PROJECT_SOURCE_DIR}/src/scipjni.i 77 | DEPENDS ${PROJECT_SOURCE_DIR}/src/scipjni.i) 78 | endif() 79 | 80 | # 81 | # find SCIP library and add include directories 82 | # 83 | if (SCIP_DIR) 84 | # The user explicitly passed a SCIP_DIR, so only look there and not in some 85 | # random other path that may contain a binary-incompatible version. 86 | find_package(SCIP REQUIRED CONFIG NO_DEFAULT_PATH PATHS ${SCIP_DIR}) 87 | else() 88 | find_package(SCIP REQUIRED CONFIG) 89 | endif() 90 | # Check the minimum SCIP version here. We cannot just pass it to find_package 91 | # because that will accept only the same major version. See #52 and scip#116. 92 | set (SCIP_MINIMUM_VERSION "8.0.0") 93 | if (SCIP_VERSION VERSION_LESS SCIP_MINIMUM_VERSION) 94 | message(FATAL_ERROR "SCIP too old. Found SCIP version ${SCIP_VERSION}, but at least SCIP ${SCIP_MINIMUM_VERSION} is required.") 95 | endif() 96 | include_directories (${JNI_INCLUDE_DIRS} ${SCIP_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src) 97 | 98 | # 99 | # check whether SCIP is a static library (in which case it is safe to use macros) 100 | # 101 | get_target_property(LIBSCIP_TARGET_TYPE libscip TYPE) 102 | message("libscip is a ${LIBSCIP_TARGET_TYPE}.") 103 | if (LIBSCIP_TARGET_TYPE STREQUAL STATIC_LIBRARY) 104 | add_definitions(-DHAVE_STATIC_LIBSCIP=1) 105 | endif() 106 | 107 | # 108 | # link directories 109 | # 110 | link_directories (${PROJECT_SOURCE_DIR}/lib) 111 | 112 | # 113 | # build JSCIPOpt library 114 | # 115 | add_library (jscip SHARED ${PROJECT_SOURCE_DIR}/src/scipjni_wrap.cxx) 116 | set_target_properties(jscip PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE}) 117 | 118 | # 119 | # add dependencies of other libraries 120 | # 121 | target_link_libraries (jscip ${SCIP_LIBRARIES}) 122 | 123 | # 124 | # generate jar 125 | # 126 | add_jar (scipjar 127 | SOURCES ${JAVA_SOURCES} 128 | OUTPUT_NAME scip 129 | OUTPUT_DIR ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE} 130 | ) 131 | 132 | # 133 | # generate jar containing all examples 134 | # 135 | FILE (GLOB example_sources ${PROJECT_SOURCE_DIR}/examples/*.java) 136 | 137 | add_jar (examples 138 | SOURCES ${example_sources} 139 | INCLUDE_JARS scipjar 140 | OUTPUT_DIR ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE} 141 | ) 142 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | Building JSCIPOpt on Linux 2 | ========================== 3 | 4 | You need to download the following software packages to use/extend the Java interface: 5 | 6 | - SCIP Optimization Suite 7 | - Java JDK 8 | - C compiler 9 | - CMake 10 | - SWIG (optional) 11 | 12 | The following steps need to be done before compiling the Java interface. 13 | 14 | 1) Create a shared library of the [SCIP Optimization Suite](http://scip.zib.de/#download) by executing 15 | 16 | ``` 17 | mkdir build 18 | cd build 19 | cmake .. 20 | make 21 | ``` 22 | 23 | in the SCIP Optimization Suite directory. This should have created all necessary libraries. 24 | 25 | 2a) Building JSCIPOpt on Linux. 26 | 27 | Compile the interface by executing the following commands: 28 | 29 | ``` 30 | mkdir build 31 | cd build 32 | cmake .. -DSCIP_DIR=/build 33 | make 34 | ``` 35 | 36 | Execute the examples via 37 | 38 | ``` 39 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. 40 | cd Release 41 | java -cp scip.jar:examples.jar <"Linear" or "Quadratic" or "Read" or "Multiknapsack"> 42 | ``` 43 | 44 | 2b) Building JSCIPOpt on Windows. 45 | 46 | Compile the interface by executing the following commands: 47 | 48 | ``` 49 | mkdir build 50 | cd build 51 | cmake .. -G "Visual Studio 14 2015 Win64" -DSCIP_DIR=/build 52 | cmake --build . --config <"Release" or "Debug"> 53 | ``` 54 | 55 | Execute the examples via 56 | 57 | ``` 58 | export PATH=$PATH:/build/bin/{Release,Debug} 59 | cd Release 60 | java -cp "scip.jar;examples.jar" <"Linear" or "Quadratic" or "Read" or "Multiknapsack"> 61 | ``` 62 | 63 | Please note that the first command makes sure that java is finding the scip.dll of the SCIP Optimization 64 | Suite. Alternatively, it would be possible to copy the scip.dll next to jscip.dll in the Release (or Debug) directory. 65 | 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Zuse Institute Berlin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This project provides an interface from the Java programming language to the [SCIP](http://scip.zib.de) solver software. 2 | 3 | How to build a model using JSCIPOpt 4 | =================================== 5 | 6 | There are several examples provided in the `examples` folder. These display some functionality of the interface and can 7 | serve as an entry point for writing more complex code. The following steps are always required when using the interface: 8 | 9 | 1) It is necessary to add 10 | 11 | `import jscip.*;` 12 | 13 | to the beginning of your Java file. This imports all needed classes to use the interfaces. 14 | 15 | 2) Create a solver instance and initialize the internal C data structures with 16 | 17 | ``` 18 | Scip scip = new SCIP(); 19 | scip.create("Example"); 20 | ``` 21 | 22 | This is the equivalent to calling `SCIPcreate(&scip)` and `SCIPcreateProbBasic(scip, "Example")` in C. 23 | 24 | 3) The most important classes are Scip.java, Variable.java, Constraint.java, and Solution.java. They represent the C 25 | data structs `SCIP`, `SCIP_VAR`, `SCIP_CONS`,`SCIP_SOL` and provide some basic functionality. Using the Java classes 26 | works similar to C , e.g., 27 | 28 | ``` 29 | Variable vars = new Variables[2]; 30 | vars[0] = scip.createVar("x", 1.0, 2.0, -1.0, SCIP_Vartype.SCIP_VARTYPE_INTEGER); 31 | vars[1] = scip.createVar("y", 3.0, 4.0, -2.0, SCIP_Vartype.SCIP_VARTYPE_CONTINUOUS); 32 | 33 | double[] vals = {1.0, -3.6}; 34 | Constraint lincons = scip.createConsLinear("lincons", vars, vals, -scip.infinity(), 10.0); 35 | scip.addCons(lincons); 36 | scip.releaseCons(lincons); 37 | 38 | scip.solve(); 39 | scip.free(); 40 | ``` 41 | 42 | which creates two variables, a linear constraint, adds it to SCIP, solves the problem and finally frees it. 43 | 44 | 45 | How to extend the interface 46 | =========================== 47 | 48 | The package already contains an interface to SCIP created with the Simplified Wrapper and Interface Generator 49 | [SWIG](http://www.swig.org/). Extending the interface requires to install SWIG. The following steps are necessary to add 50 | a new function to the interface: 51 | 52 | 1) Add the signature of an interface function to src/scipjni.i, e.g., 53 | 54 | `SCIP_Real SCIPfeastol(SCIP* scip);` 55 | 56 | 2) Implement the function, depending on its signature, in `java/jscip/{Scip,Variable,Constraint,Solution}.java`, e.g., 57 | 58 | ``` 59 | public class Scip 60 | { 61 | private SWIGTYPE_p_SCIP _scipptr; 62 | 63 | ... 64 | 65 | public double feastol() 66 | { 67 | return SCIPJNI.SCIPfeastol(_scipptr); 68 | } 69 | } 70 | ``` 71 | 72 | 3) Follow the steps in INSTALL.md to compile JSCIPOpt. 73 | 74 | Note that each of the four mentioned classes hold their own C pointer in a class generated by SWIG. The object of this 75 | class needs to be passed to the new implemented interface function. 76 | 77 | 78 | After all previous steps it is now possible to call the function via 79 | ``` 80 | double ftol = scip.feastol(); 81 | ``` 82 | -------------------------------------------------------------------------------- /examples/Linear.java: -------------------------------------------------------------------------------- 1 | import jscip.*; 2 | 3 | /** Example how to create a problem with linear constraints. */ 4 | public class Linear 5 | { 6 | public static void main(String args[]) 7 | { 8 | // load generated C-library 9 | System.loadLibrary("jscip"); 10 | 11 | Scip scip = new Scip(); 12 | 13 | // set up data structures of SCIP 14 | scip.create("LinearExample"); 15 | 16 | // create variables (also adds variables to SCIP) 17 | Variable x = scip.createVar("x", 2.0, 3.0, 1.0, SCIP_Vartype.SCIP_VARTYPE_CONTINUOUS); 18 | Variable y = scip.createVar("y", 0.0, scip.infinity(), -3.0, SCIP_Vartype.SCIP_VARTYPE_INTEGER); 19 | 20 | // alternatively, you can add obj later 21 | //Variable y = scip.createVar("y", 0.0, scip.infinity(), -3.0, SCIP_Vartype.SCIP_VARTYPE_INTEGER); 22 | //scip.changeVarObj(y, -3.0); 23 | 24 | // create a linear constraint 25 | Variable[] vars = {x, y}; 26 | double[] vals = {1.0, 2.0}; 27 | Constraint lincons = scip.createConsLinear("lincons", vars, vals, -scip.infinity(), 10.0); 28 | 29 | // add constraint to SCIP 30 | scip.addCons(lincons); 31 | 32 | // release constraint (if not needed anymore) 33 | scip.releaseCons(lincons); 34 | 35 | // set parameters 36 | scip.setRealParam("limits/time", 100.0); 37 | scip.setRealParam("limits/memory", 10000.0); 38 | scip.setLongintParam("limits/totalnodes", 1000); 39 | 40 | // solve problem 41 | scip.solve(); 42 | System.out.println("final gap = " + scip.getGap()); 43 | 44 | // print all solutions 45 | Solution[] allsols = scip.getSols(); 46 | 47 | for( int s = 0; allsols != null && s < allsols.length; ++s ) 48 | System.out.println("solution (x,y) = (" + scip.getSolVal(allsols[s], x) + ", " + scip.getSolVal(allsols[s], y) + ") with objective value " + scip.getSolOrigObj(allsols[s])); 49 | 50 | // release variables (if not needed anymore) 51 | scip.releaseVar(y); 52 | scip.releaseVar(x); 53 | 54 | // free SCIP 55 | scip.free(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /examples/Multiknapsack.java: -------------------------------------------------------------------------------- 1 | import java.util.Random; 2 | import jscip.*; 3 | 4 | /** Two ways two write simple multi-knapsack models with 10 articles and many knapsack constraints. 5 | * each article can be assigned at most once. The contribution on the Objective 6 | * Function and of weight of the articles of each article are assigned randomly 7 | * In the First model, each knapsack constraint is built manually. It includes 2 knapsacks. 8 | * In the Second model, each knapsack constraint is built with a for Cycle. It includes 20 knapsacks. 9 | * 10 | * @author Jose Miguel Quesada Perez (jose.quesada@uclouvain.be) 11 | * @version 1.1 12 | * @since 2018-10-12 13 | */ 14 | public class Multiknapsack 15 | { 16 | public static void main(String args[]) 17 | { 18 | // load generated C-library and set up structures of SCIP 19 | System.loadLibrary("jscip"); 20 | Scip scip = new Scip(); 21 | scip.create("multiKnapsack"); 22 | 23 | // FIRST WAY: Write multi-knapsack by writing each constraint manually 24 | // declare variables and varCoefficients 25 | System.out.print("\n*********** FIRST WAY *******************************\n"); 26 | System.out.print("\n*********** 2 knapsacks \n"); 27 | Variable[] vars1 = new Variable[10]; 28 | double[] coef1 = new double[10]; 29 | double[] coef2 = new double[10]; 30 | 31 | Random rand = new Random(); 32 | 33 | // create variables and coefficients 34 | for( int i = 0; i < vars1.length; i++ ) 35 | { 36 | // variable Xi = 1 if the article i is selected; 0 otherwise. Since SCIP minimizes by default, the value on 37 | // the OF is multiplied by -1, so we will maximize.Contribution in the OF random int between 0 and 50 38 | vars1[i] = scip.createVar("x" + i, 0.0, 1, -(rand.nextInt(50) + 1), SCIP_Vartype.SCIP_VARTYPE_BINARY); 39 | 40 | // oefficients of each article are random between 0 and 25 41 | coef1[i] = rand.nextDouble()*25; 42 | coef2[i] = rand.nextDouble()*25; 43 | } 44 | 45 | // create and add constraints to SCIP 46 | // knapsack capacity, random between 50 and 80 47 | Constraint knapsack1 = scip.createConsLinear("knapsack1", vars1, coef1, 0, 50+rand.nextDouble()*30); 48 | Constraint knapsack2 = scip.createConsLinear("knapsack2", vars1, coef2, 0, 50+rand.nextDouble()*30); 49 | scip.addCons(knapsack1); 50 | scip.addCons(knapsack2); 51 | 52 | // release constraint 53 | scip.releaseCons(knapsack1); 54 | scip.releaseCons(knapsack2); 55 | 56 | // set parameters 57 | scip.setRealParam("limits/time", 100.0); 58 | scip.setRealParam("limits/memory", 10000.0); 59 | scip.setLongintParam("limits/totalnodes", 1000); 60 | 61 | // solve problem and print solution 62 | scip.solve(); 63 | Solution sol = scip.getBestSol(); 64 | System.out.print("\nObjective value " + -scip.getSolOrigObj(sol)); 65 | if( sol != null ) 66 | { 67 | System.out.println("\nvarValues " ); 68 | for( int i = 0; i < vars1.length; i++ ) 69 | { 70 | System.out.print("\nx" + (i+1) + " " + scip.getSolVal(sol, vars1[i])); 71 | } 72 | } 73 | 74 | // release variables (if not needed anymore) and fee SCIP 75 | for( int i = 0; i < vars1.length; i++ ) 76 | { 77 | scip.releaseVar(vars1[i]); 78 | } 79 | 80 | scip.free(); 81 | 82 | // SECOND WAY: Using a cycle that writes each constraint 83 | System.out.print("\n*********** FIRST WAY *******************************\n"); 84 | System.out.print("\n*********** 20 knapsacks \n"); 85 | scip = new Scip(); 86 | scip.create("multiKnapsack2"); 87 | 88 | // declare and create variables and Coefficients 89 | Variable[] vars = new Variable[10]; 90 | double [] coefs = new double [10]; 91 | 92 | for( int i = 0; i < vars.length; i++ ) 93 | { 94 | vars[i] = scip.createVar("x" + i, 0.0, 1, -(rand.nextInt(50) + 1), SCIP_Vartype.SCIP_VARTYPE_BINARY); 95 | } 96 | 97 | // create, add, and release constraints 98 | int nrKnapsacks = 20; // increase this number to add more knapsacks 99 | for( int j = 1; j <= nrKnapsacks; j++ ) 100 | { 101 | for( int i = 0; i < coefs.length; i++ ) 102 | { 103 | coefs[i] = rand.nextDouble()*25 +1; 104 | Constraint knapsack = scip.createConsLinear("knapsack"+j, vars, coefs, 0, 50+rand.nextDouble()*30 +1); 105 | scip.addCons(knapsack); 106 | scip.releaseCons(knapsack); 107 | } 108 | } 109 | 110 | // solve problem and print solution 111 | scip.solve(); 112 | sol = scip.getBestSol(); 113 | System.out.print("\nObjective value " + -scip.getSolOrigObj(sol)); 114 | if( sol != null ) 115 | { 116 | System.out.println("\nvarValues " ); 117 | for( int i = 0; i < vars.length; i++ ) 118 | { 119 | System.out.print("\nx" + (i+1) + " " + scip.getSolVal(sol, vars[i])); 120 | } 121 | } 122 | 123 | // release variables (if not needed anymore) and fee SCIP 124 | for( int i = 0; i < vars1.length; i++ ) 125 | { 126 | scip.releaseVar(vars[i]); 127 | } 128 | 129 | scip.free(); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /examples/Nonlinear.java: -------------------------------------------------------------------------------- 1 | import jscip.*; 2 | 3 | /** Example how to create a problem with nonlinear constraints. 4 | Implements: https://www.minlplib.org/prob10.html */ 5 | public class Nonlinear 6 | { 7 | public static void main(String args[]) 8 | { 9 | // load generated C-library 10 | System.loadLibrary("jscip"); 11 | 12 | Scip scip = new Scip(); 13 | 14 | // set up data structures of SCIP 15 | scip.create("NonlinearExample"); 16 | 17 | // create variables (also adds variables to SCIP) 18 | Variable objvar = scip.createVar("objvar", -scip.infinity(), scip.infinity(), 1.0, SCIP_Vartype.SCIP_VARTYPE_CONTINUOUS); 19 | Variable x2 = scip.createVar("x2", 0.0, 10.0, 0.0, SCIP_Vartype.SCIP_VARTYPE_CONTINUOUS); 20 | Variable i3 = scip.createVar("i3", 0.0, 10.0, 0.0, SCIP_Vartype.SCIP_VARTYPE_INTEGER); 21 | 22 | // create linear constraints (also adds constraints to SCIP) 23 | Variable[] vars = {x2, i3}; 24 | // e1: 0.7*x2 + i3 <= 7 25 | double[] vals1 = {0.7, 1.0}; 26 | Constraint e1 = scip.createConsLinear("e1", vars, vals1, -scip.infinity(), 7.0); 27 | scip.addCons(e1); 28 | scip.releaseCons(e1); 29 | // e2: 2.5*x2 + i3 <= 19 30 | double[] vals2 = {2.5, 1.0}; 31 | Constraint e2 = scip.createConsLinear("e2", vars, vals2, -scip.infinity(), 19.0); 32 | scip.addCons(e2); 33 | scip.releaseCons(e2); 34 | 35 | // create nonlinear constraint (also adds constraint to SCIP) 36 | // e3: 1.1*((-10 + 2*x2)^2 + (-5 + i3)^2) + sin((-10 + 2*x2)^2 + (-5 + i3)^2) - objvar = 0 37 | Expression x2e = scip.createExprVar(x2); 38 | Expression i3e = scip.createExprVar(i3); 39 | Expression objvare = scip.createExprVar(objvar); 40 | Expression sum1 = scip.createExprSum(new Expression[]{x2e}, new double[]{2.0}, -10.0); 41 | Expression sqr1 = scip.createExprPow(sum1, 2.0); 42 | Expression sum2 = scip.createExprSum(new Expression[]{i3e}, null, -5.0); 43 | Expression sqr2 = scip.createExprPow(sum2, 2.0); 44 | Expression sum3 = scip.createExprSum(new Expression[]{sqr1, sqr2}, null, 0.0); 45 | Expression sinSum3 = scip.createExprSin(sum3); 46 | Expression e3e = scip.createExprSum(new Expression[]{sum3, sinSum3, objvare}, new double[]{1.1, 1.0, -1.0}, 0.0); 47 | Constraint e3 = scip.createConsNonlinear("e3", e3e, 0.0, 0.0); 48 | scip.releaseExpr(e3e); 49 | scip.releaseExpr(sinSum3); 50 | scip.releaseExpr(sum3); 51 | scip.releaseExpr(sqr2); 52 | scip.releaseExpr(sum2); 53 | scip.releaseExpr(sqr1); 54 | scip.releaseExpr(sum1); 55 | scip.releaseExpr(objvare); 56 | scip.releaseExpr(i3e); 57 | scip.releaseExpr(x2e); 58 | scip.addCons(e3); 59 | scip.releaseCons(e3); 60 | 61 | // set parameters 62 | scip.setRealParam("limits/time", 100.0); 63 | scip.setRealParam("limits/memory", 10000.0); 64 | scip.setLongintParam("limits/totalnodes", 1000); 65 | 66 | // solve problem 67 | scip.solve(); 68 | System.out.println("final gap = " + scip.getGap()); 69 | 70 | // print all solutions 71 | Solution[] allsols = scip.getSols(); 72 | 73 | for( int s = 0; allsols != null && s < allsols.length; ++s ) 74 | System.out.println("solution (x2,i3) = (" + scip.getSolVal(allsols[s], x2) + ", " + scip.getSolVal(allsols[s], i3) + ") with objective value " + scip.getSolOrigObj(allsols[s])); 75 | 76 | // release variables (if not needed anymore) 77 | scip.releaseVar(objvar); 78 | scip.releaseVar(i3); 79 | scip.releaseVar(x2); 80 | 81 | // free SCIP 82 | scip.free(); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /examples/Quadratic.java: -------------------------------------------------------------------------------- 1 | import jscip.*; 2 | 3 | /** Example how to create a problem with quadratic constraints. */ 4 | public class Quadratic 5 | { 6 | public static void main(String args[]) 7 | { 8 | // load generated C-library 9 | System.loadLibrary("jscip"); 10 | 11 | Scip scip = new Scip(); 12 | 13 | // set up data structures of SCIP 14 | scip.create("LinearExample"); 15 | 16 | // create variables (also adds variables to SCIP) 17 | Variable x = scip.createVar("x", 2.0, 3.0, 1.0, SCIP_Vartype.SCIP_VARTYPE_CONTINUOUS); 18 | Variable y = scip.createVar("y", 0.0, 1.0, -3.0, SCIP_Vartype.SCIP_VARTYPE_BINARY); 19 | 20 | // create quadratic constraint: x^2 + 2xy - y^2 + x + y <= 11 21 | Variable[] quadvars1 = {x, x, y}; 22 | Variable[] quadvars2 = {x, y, y}; 23 | double[] quadcoefs = {1.0, 2.0, -1.0}; 24 | Variable[] linvars = {x, y}; 25 | double[] lincoefs = {1.0, 1.0}; 26 | 27 | Constraint quadcons = scip.createConsQuadratic("quadcons", quadvars1, quadvars2, quadcoefs, linvars, lincoefs, -scip.infinity(), 11); 28 | 29 | // add constraint to SCIP 30 | scip.addCons(quadcons); 31 | 32 | // release constraint (if not needed anymore) 33 | scip.releaseCons(quadcons); 34 | 35 | // solve problem 36 | scip.solve(); 37 | 38 | // print the best solution 39 | Solution sol = scip.getBestSol(); 40 | 41 | if( sol != null ) 42 | { 43 | System.out.println("best solution (x,y) = (" + scip.getSolVal(sol, x) + ", " + scip.getSolVal(sol, y) + ") with objective value " + scip.getSolOrigObj(sol)); 44 | } 45 | 46 | // release variables (if not needed anymore) 47 | scip.releaseVar(y); 48 | scip.releaseVar(x); 49 | 50 | // free SCIP 51 | scip.free(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /examples/Read.java: -------------------------------------------------------------------------------- 1 | import jscip.*; 2 | 3 | /** Example how to read an instance and solve it with the SCIP Java interface. */ 4 | public class Read 5 | { 6 | public static void main(String args[]) 7 | { 8 | if( args.length == 0 || args.length > 2 ) 9 | { 10 | System.out.println("usage: java Read "); 11 | return; 12 | } 13 | 14 | // load generated C-library 15 | System.loadLibrary("jscip"); 16 | 17 | Scip scip = new Scip(); 18 | 19 | // set up data structures of SCIP 20 | scip.create(args[0]); 21 | 22 | // read problem 23 | scip.readProb(args[0]); 24 | 25 | // read settings 26 | if( args.length == 2 ) 27 | scip.readParams(args[1]); 28 | 29 | // solve problem 30 | scip.solve(); 31 | 32 | // print statistics and the best found solution (only non-zeros) 33 | scip.printStatistics(); 34 | scip.printBestSol(false); 35 | 36 | // free SCIP 37 | scip.free(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /java/jscip/Constraint.java: -------------------------------------------------------------------------------- 1 | package jscip; 2 | 3 | /** Class representing a single constraint (equivalent of SCIP_CONS).*/ 4 | public class Constraint 5 | { 6 | private SWIGTYPE_p_SCIP_CONS _consptr; /** pointer address class created by SWIG */ 7 | 8 | /** default constructor */ 9 | public Constraint(SWIGTYPE_p_SCIP_CONS consptr) 10 | { 11 | assert(consptr != null); 12 | _consptr = consptr; 13 | } 14 | 15 | /** returns SWIG object type representing a SCIP_CONS pointer */ 16 | public SWIGTYPE_p_SCIP_CONS getPtr() 17 | { 18 | return _consptr; 19 | } 20 | 21 | // @todo this function should not be public 22 | public void setPtr(SWIGTYPE_p_SCIP_CONS consptr) 23 | { 24 | _consptr = consptr; 25 | } 26 | 27 | /** wraps SCIPconsGetName() */ 28 | public String getName() 29 | { 30 | assert(_consptr != null); 31 | return SCIPJNI.SCIPconsGetName(_consptr); 32 | } 33 | 34 | /** returns a String representation */ 35 | public String toString() 36 | { 37 | return getName(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /java/jscip/Expression.java: -------------------------------------------------------------------------------- 1 | package jscip; 2 | 3 | /** Class representing a single expression (equivalent of SCIP_EXPR).*/ 4 | public class Expression 5 | { 6 | private SWIGTYPE_p_SCIP_EXPR _exprptr; /** pointer address class created by SWIG */ 7 | 8 | /** default constructor */ 9 | public Expression(SWIGTYPE_p_SCIP_EXPR exprptr) 10 | { 11 | assert(exprptr != null); 12 | _exprptr = exprptr; 13 | } 14 | 15 | /** returns SWIG object type representing a SCIP_EXPR pointer */ 16 | public SWIGTYPE_p_SCIP_EXPR getPtr() 17 | { 18 | return _exprptr; 19 | } 20 | 21 | // @todo this function should not be public 22 | public void setPtr(SWIGTYPE_p_SCIP_EXPR exprptr) 23 | { 24 | _exprptr = exprptr; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /java/jscip/MessageHandler.java: -------------------------------------------------------------------------------- 1 | package jscip; 2 | 3 | /** Class representing a message handler (equivalent of SCIP_Messagehdlr). */ 4 | public abstract class MessageHandler 5 | { 6 | private SWIGTYPE_p_SCIP_Messagehdlr _messagehdlrptr; /** pointer address class created by SWIG */ 7 | 8 | /** default constructor to construct a Java message handler */ 9 | protected MessageHandler() 10 | { 11 | ObjMessagehdlr objmessagehdlr = new ObjMessagehdlr(1) { 12 | @Override 13 | public void scip_error(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 14 | error(msg); 15 | } 16 | 17 | @Override 18 | public void scip_warning(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 19 | warning(msg); 20 | } 21 | 22 | @Override 23 | public void scip_dialog(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 24 | dialog(msg); 25 | } 26 | 27 | @Override 28 | public void scip_info(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 29 | info(msg); 30 | } 31 | 32 | @Override 33 | public SCIP_Retcode scip_free(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr) { 34 | try { 35 | close(); 36 | return SCIP_Retcode.SCIP_OKAY; 37 | } catch (Exception e) { 38 | return SCIP_Retcode.SCIP_ERROR; 39 | } 40 | } 41 | }; 42 | objmessagehdlr.swigReleaseOwnership(); 43 | _messagehdlrptr = SCIPJNI.createObjMessagehdlr(objmessagehdlr, 1); 44 | } 45 | 46 | /** constructor to wrap a native message handler 47 | * (must not be called directly, construct a Wrapper instead) */ 48 | private MessageHandler(SWIGTYPE_p_SCIP_Messagehdlr messagehdlrptr) 49 | { 50 | _messagehdlrptr = messagehdlrptr; 51 | } 52 | 53 | /** returns SWIG object type representing a SCIP_Messagehdlr pointer */ 54 | public SWIGTYPE_p_SCIP_Messagehdlr getPtr() 55 | { 56 | return _messagehdlrptr; 57 | } 58 | 59 | /** returns SWIG object type representing a SCIP_Messagehdlr pointer */ 60 | public static SWIGTYPE_p_SCIP_Messagehdlr getPtr(MessageHandler obj) { 61 | return obj != null ? obj.getPtr() : new SWIGTYPE_p_SCIP_Messagehdlr(); 62 | } 63 | 64 | protected abstract void error(String msg); 65 | 66 | protected abstract void warning(String msg); 67 | 68 | protected abstract void dialog(String msg); 69 | 70 | protected abstract void info(String msg); 71 | 72 | protected void close() throws Exception { 73 | // do nothing by default 74 | } 75 | 76 | /** returns a String representation */ 77 | public String toString() 78 | { 79 | return "message handler of type " + getClass().getName(); 80 | } 81 | 82 | /** Class wrapping an existing native SCIP_Messagehdlr. */ 83 | public static final class Wrapper extends MessageHandler { 84 | /** constructor from a native SCIP_Messagehdlr pointer */ 85 | public Wrapper(SWIGTYPE_p_SCIP_Messagehdlr messagehdlrptr) { 86 | super(messagehdlrptr); 87 | } 88 | 89 | @Override 90 | protected final void error(String msg) { 91 | // This method will never be reached from native C/C++ code. 92 | throw new UnsupportedOperationException( 93 | "MessageHandler.Wrapper.error should never be called"); 94 | } 95 | 96 | @Override 97 | protected final void warning(String msg) { 98 | // This method will never be reached from native C/C++ code. 99 | throw new UnsupportedOperationException( 100 | "MessageHandler.Wrapper.warning should never be called"); 101 | } 102 | 103 | @Override 104 | protected final void dialog(String msg) { 105 | // This method will never be reached from native C/C++ code. 106 | throw new UnsupportedOperationException( 107 | "MessageHandler.Wrapper.dialog should never be called"); 108 | } 109 | 110 | @Override 111 | protected final void info(String msg) { 112 | // This method will never be reached from native C/C++ code. 113 | throw new UnsupportedOperationException( 114 | "MessageHandler.Wrapper.info should never be called"); 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /java/jscip/ObjMessagehdlr.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class ObjMessagehdlr { 12 | private transient long swigCPtr; 13 | protected transient boolean swigCMemOwn; 14 | 15 | protected ObjMessagehdlr(long cPtr, boolean cMemoryOwn) { 16 | swigCMemOwn = cMemoryOwn; 17 | swigCPtr = cPtr; 18 | } 19 | 20 | protected static long getCPtr(ObjMessagehdlr obj) { 21 | return (obj == null) ? 0 : obj.swigCPtr; 22 | } 23 | 24 | @SuppressWarnings("deprecation") 25 | protected void finalize() { 26 | delete(); 27 | } 28 | 29 | public synchronized void delete() { 30 | if (swigCPtr != 0) { 31 | if (swigCMemOwn) { 32 | swigCMemOwn = false; 33 | SCIPJNIJNI.delete_ObjMessagehdlr(swigCPtr); 34 | } 35 | swigCPtr = 0; 36 | } 37 | } 38 | 39 | protected void swigDirectorDisconnect() { 40 | swigCMemOwn = false; 41 | delete(); 42 | } 43 | 44 | public void swigReleaseOwnership() { 45 | swigCMemOwn = false; 46 | SCIPJNIJNI.ObjMessagehdlr_change_ownership(this, swigCPtr, false); 47 | } 48 | 49 | public void swigTakeOwnership() { 50 | swigCMemOwn = true; 51 | SCIPJNIJNI.ObjMessagehdlr_change_ownership(this, swigCPtr, true); 52 | } 53 | 54 | public long getScip_bufferedoutput_() { 55 | return SCIPJNIJNI.ObjMessagehdlr_scip_bufferedoutput__get(swigCPtr, this); 56 | } 57 | 58 | public ObjMessagehdlr(long bufferedoutput) { 59 | this(SCIPJNIJNI.new_ObjMessagehdlr(bufferedoutput), true); 60 | SCIPJNIJNI.ObjMessagehdlr_director_connect(this, swigCPtr, true, true); 61 | } 62 | 63 | public void scip_error(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 64 | if (getClass() == ObjMessagehdlr.class) SCIPJNIJNI.ObjMessagehdlr_scip_error(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); else SCIPJNIJNI.ObjMessagehdlr_scip_errorSwigExplicitObjMessagehdlr(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); 65 | } 66 | 67 | public void scip_warning(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 68 | if (getClass() == ObjMessagehdlr.class) SCIPJNIJNI.ObjMessagehdlr_scip_warning(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); else SCIPJNIJNI.ObjMessagehdlr_scip_warningSwigExplicitObjMessagehdlr(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); 69 | } 70 | 71 | public void scip_dialog(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 72 | if (getClass() == ObjMessagehdlr.class) SCIPJNIJNI.ObjMessagehdlr_scip_dialog(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); else SCIPJNIJNI.ObjMessagehdlr_scip_dialogSwigExplicitObjMessagehdlr(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); 73 | } 74 | 75 | public void scip_info(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr, SWIGTYPE_p_FILE file, String msg) { 76 | if (getClass() == ObjMessagehdlr.class) SCIPJNIJNI.ObjMessagehdlr_scip_info(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); else SCIPJNIJNI.ObjMessagehdlr_scip_infoSwigExplicitObjMessagehdlr(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr), SWIGTYPE_p_FILE.getCPtr(file), msg); 77 | } 78 | 79 | public SCIP_Retcode scip_free(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr) { 80 | return SCIP_Retcode.swigToEnum((getClass() == ObjMessagehdlr.class) ? SCIPJNIJNI.ObjMessagehdlr_scip_free(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr)) : SCIPJNIJNI.ObjMessagehdlr_scip_freeSwigExplicitObjMessagehdlr(swigCPtr, this, SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr))); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /java/jscip/SCIPJNI.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SCIPJNI { 12 | public static SWIGTYPE_p_char new_char_array(int nelements) { 13 | long cPtr = SCIPJNIJNI.new_char_array(nelements); 14 | return (cPtr == 0) ? null : new SWIGTYPE_p_char(cPtr, false); 15 | } 16 | 17 | public static void delete_char_array(SWIGTYPE_p_char ary) { 18 | SCIPJNIJNI.delete_char_array(SWIGTYPE_p_char.getCPtr(ary)); 19 | } 20 | 21 | public static char char_array_getitem(SWIGTYPE_p_char ary, int index) { 22 | return SCIPJNIJNI.char_array_getitem(SWIGTYPE_p_char.getCPtr(ary), index); 23 | } 24 | 25 | public static void char_array_setitem(SWIGTYPE_p_char ary, int index, char value) { 26 | SCIPJNIJNI.char_array_setitem(SWIGTYPE_p_char.getCPtr(ary), index, value); 27 | } 28 | 29 | public static SWIGTYPE_p_double new_double_array(int nelements) { 30 | long cPtr = SCIPJNIJNI.new_double_array(nelements); 31 | return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false); 32 | } 33 | 34 | public static void delete_double_array(SWIGTYPE_p_double ary) { 35 | SCIPJNIJNI.delete_double_array(SWIGTYPE_p_double.getCPtr(ary)); 36 | } 37 | 38 | public static double double_array_getitem(SWIGTYPE_p_double ary, int index) { 39 | return SCIPJNIJNI.double_array_getitem(SWIGTYPE_p_double.getCPtr(ary), index); 40 | } 41 | 42 | public static void double_array_setitem(SWIGTYPE_p_double ary, int index, double value) { 43 | SCIPJNIJNI.double_array_setitem(SWIGTYPE_p_double.getCPtr(ary), index, value); 44 | } 45 | 46 | public static SWIGTYPE_p_int new_int_array(int nelements) { 47 | long cPtr = SCIPJNIJNI.new_int_array(nelements); 48 | return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false); 49 | } 50 | 51 | public static void delete_int_array(SWIGTYPE_p_int ary) { 52 | SCIPJNIJNI.delete_int_array(SWIGTYPE_p_int.getCPtr(ary)); 53 | } 54 | 55 | public static int int_array_getitem(SWIGTYPE_p_int ary, int index) { 56 | return SCIPJNIJNI.int_array_getitem(SWIGTYPE_p_int.getCPtr(ary), index); 57 | } 58 | 59 | public static void int_array_setitem(SWIGTYPE_p_int ary, int index, int value) { 60 | SCIPJNIJNI.int_array_setitem(SWIGTYPE_p_int.getCPtr(ary), index, value); 61 | } 62 | 63 | public static SWIGTYPE_p_long_long new_long_long_array(int nelements) { 64 | long cPtr = SCIPJNIJNI.new_long_long_array(nelements); 65 | return (cPtr == 0) ? null : new SWIGTYPE_p_long_long(cPtr, false); 66 | } 67 | 68 | public static void delete_long_long_array(SWIGTYPE_p_long_long ary) { 69 | SCIPJNIJNI.delete_long_long_array(SWIGTYPE_p_long_long.getCPtr(ary)); 70 | } 71 | 72 | public static long long_long_array_getitem(SWIGTYPE_p_long_long ary, int index) { 73 | return SCIPJNIJNI.long_long_array_getitem(SWIGTYPE_p_long_long.getCPtr(ary), index); 74 | } 75 | 76 | public static void long_long_array_setitem(SWIGTYPE_p_long_long ary, int index, long value) { 77 | SCIPJNIJNI.long_long_array_setitem(SWIGTYPE_p_long_long.getCPtr(ary), index, value); 78 | } 79 | 80 | public static SWIGTYPE_p_unsigned_int new_unsigned_int_array(int nelements) { 81 | long cPtr = SCIPJNIJNI.new_unsigned_int_array(nelements); 82 | return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false); 83 | } 84 | 85 | public static void delete_unsigned_int_array(SWIGTYPE_p_unsigned_int ary) { 86 | SCIPJNIJNI.delete_unsigned_int_array(SWIGTYPE_p_unsigned_int.getCPtr(ary)); 87 | } 88 | 89 | public static long unsigned_int_array_getitem(SWIGTYPE_p_unsigned_int ary, int index) { 90 | return SCIPJNIJNI.unsigned_int_array_getitem(SWIGTYPE_p_unsigned_int.getCPtr(ary), index); 91 | } 92 | 93 | public static void unsigned_int_array_setitem(SWIGTYPE_p_unsigned_int ary, int index, long value) { 94 | SCIPJNIJNI.unsigned_int_array_setitem(SWIGTYPE_p_unsigned_int.getCPtr(ary), index, value); 95 | } 96 | 97 | public static SWIGTYPE_p_SCIP_BoundType new_SCIP_BoundType_array(int nelements) { 98 | long cPtr = SCIPJNIJNI.new_SCIP_BoundType_array(nelements); 99 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_BoundType(cPtr, false); 100 | } 101 | 102 | public static void delete_SCIP_BoundType_array(SWIGTYPE_p_SCIP_BoundType ary) { 103 | SCIPJNIJNI.delete_SCIP_BoundType_array(SWIGTYPE_p_SCIP_BoundType.getCPtr(ary)); 104 | } 105 | 106 | public static SCIP_BoundType SCIP_BoundType_array_getitem(SWIGTYPE_p_SCIP_BoundType ary, int index) { 107 | return SCIP_BoundType.swigToEnum(SCIPJNIJNI.SCIP_BoundType_array_getitem(SWIGTYPE_p_SCIP_BoundType.getCPtr(ary), index)); 108 | } 109 | 110 | public static void SCIP_BoundType_array_setitem(SWIGTYPE_p_SCIP_BoundType ary, int index, SCIP_BoundType value) { 111 | SCIPJNIJNI.SCIP_BoundType_array_setitem(SWIGTYPE_p_SCIP_BoundType.getCPtr(ary), index, value.swigValue()); 112 | } 113 | 114 | public static SWIGTYPE_p_p_char new_String_array(int nelements) { 115 | long cPtr = SCIPJNIJNI.new_String_array(nelements); 116 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_char(cPtr, false); 117 | } 118 | 119 | public static void delete_String_array(SWIGTYPE_p_p_char ary) { 120 | SCIPJNIJNI.delete_String_array(SWIGTYPE_p_p_char.getCPtr(ary)); 121 | } 122 | 123 | public static String String_array_getitem(SWIGTYPE_p_p_char ary, int index) { 124 | return SCIPJNIJNI.String_array_getitem(SWIGTYPE_p_p_char.getCPtr(ary), index); 125 | } 126 | 127 | public static void String_array_setitem(SWIGTYPE_p_p_char ary, int index, String value) { 128 | SCIPJNIJNI.String_array_setitem(SWIGTYPE_p_p_char.getCPtr(ary), index, value); 129 | } 130 | 131 | public static SWIGTYPE_p_p_SCIP_VAR new_SCIP_VAR_array(int nelements) { 132 | long cPtr = SCIPJNIJNI.new_SCIP_VAR_array(nelements); 133 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_VAR(cPtr, false); 134 | } 135 | 136 | public static void delete_SCIP_VAR_array(SWIGTYPE_p_p_SCIP_VAR ary) { 137 | SCIPJNIJNI.delete_SCIP_VAR_array(SWIGTYPE_p_p_SCIP_VAR.getCPtr(ary)); 138 | } 139 | 140 | public static SWIGTYPE_p_SCIP_VAR SCIP_VAR_array_getitem(SWIGTYPE_p_p_SCIP_VAR ary, int index) { 141 | long cPtr = SCIPJNIJNI.SCIP_VAR_array_getitem(SWIGTYPE_p_p_SCIP_VAR.getCPtr(ary), index); 142 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_VAR(cPtr, false); 143 | } 144 | 145 | public static void SCIP_VAR_array_setitem(SWIGTYPE_p_p_SCIP_VAR ary, int index, SWIGTYPE_p_SCIP_VAR value) { 146 | SCIPJNIJNI.SCIP_VAR_array_setitem(SWIGTYPE_p_p_SCIP_VAR.getCPtr(ary), index, SWIGTYPE_p_SCIP_VAR.getCPtr(value)); 147 | } 148 | 149 | public static SWIGTYPE_p_p_SCIP_EXPR new_SCIP_EXPR_array(int nelements) { 150 | long cPtr = SCIPJNIJNI.new_SCIP_EXPR_array(nelements); 151 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_EXPR(cPtr, false); 152 | } 153 | 154 | public static void delete_SCIP_EXPR_array(SWIGTYPE_p_p_SCIP_EXPR ary) { 155 | SCIPJNIJNI.delete_SCIP_EXPR_array(SWIGTYPE_p_p_SCIP_EXPR.getCPtr(ary)); 156 | } 157 | 158 | public static SWIGTYPE_p_SCIP_EXPR SCIP_EXPR_array_getitem(SWIGTYPE_p_p_SCIP_EXPR ary, int index) { 159 | long cPtr = SCIPJNIJNI.SCIP_EXPR_array_getitem(SWIGTYPE_p_p_SCIP_EXPR.getCPtr(ary), index); 160 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 161 | } 162 | 163 | public static void SCIP_EXPR_array_setitem(SWIGTYPE_p_p_SCIP_EXPR ary, int index, SWIGTYPE_p_SCIP_EXPR value) { 164 | SCIPJNIJNI.SCIP_EXPR_array_setitem(SWIGTYPE_p_p_SCIP_EXPR.getCPtr(ary), index, SWIGTYPE_p_SCIP_EXPR.getCPtr(value)); 165 | } 166 | 167 | public static SWIGTYPE_p_p_SCIP_CONS new_SCIP_CONS_array(int nelements) { 168 | long cPtr = SCIPJNIJNI.new_SCIP_CONS_array(nelements); 169 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_CONS(cPtr, false); 170 | } 171 | 172 | public static void delete_SCIP_CONS_array(SWIGTYPE_p_p_SCIP_CONS ary) { 173 | SCIPJNIJNI.delete_SCIP_CONS_array(SWIGTYPE_p_p_SCIP_CONS.getCPtr(ary)); 174 | } 175 | 176 | public static SWIGTYPE_p_SCIP_CONS SCIP_CONS_array_getitem(SWIGTYPE_p_p_SCIP_CONS ary, int index) { 177 | long cPtr = SCIPJNIJNI.SCIP_CONS_array_getitem(SWIGTYPE_p_p_SCIP_CONS.getCPtr(ary), index); 178 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 179 | } 180 | 181 | public static void SCIP_CONS_array_setitem(SWIGTYPE_p_p_SCIP_CONS ary, int index, SWIGTYPE_p_SCIP_CONS value) { 182 | SCIPJNIJNI.SCIP_CONS_array_setitem(SWIGTYPE_p_p_SCIP_CONS.getCPtr(ary), index, SWIGTYPE_p_SCIP_CONS.getCPtr(value)); 183 | } 184 | 185 | public static SWIGTYPE_p_p_SCIP_SOL new_SCIP_SOL_array(int nelements) { 186 | long cPtr = SCIPJNIJNI.new_SCIP_SOL_array(nelements); 187 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_SOL(cPtr, false); 188 | } 189 | 190 | public static void delete_SCIP_SOL_array(SWIGTYPE_p_p_SCIP_SOL ary) { 191 | SCIPJNIJNI.delete_SCIP_SOL_array(SWIGTYPE_p_p_SCIP_SOL.getCPtr(ary)); 192 | } 193 | 194 | public static SWIGTYPE_p_SCIP_SOL SCIP_SOL_array_getitem(SWIGTYPE_p_p_SCIP_SOL ary, int index) { 195 | long cPtr = SCIPJNIJNI.SCIP_SOL_array_getitem(SWIGTYPE_p_p_SCIP_SOL.getCPtr(ary), index); 196 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_SOL(cPtr, false); 197 | } 198 | 199 | public static void SCIP_SOL_array_setitem(SWIGTYPE_p_p_SCIP_SOL ary, int index, SWIGTYPE_p_SCIP_SOL value) { 200 | SCIPJNIJNI.SCIP_SOL_array_setitem(SWIGTYPE_p_p_SCIP_SOL.getCPtr(ary), index, SWIGTYPE_p_SCIP_SOL.getCPtr(value)); 201 | } 202 | 203 | public static SWIGTYPE_p_p_p_SCIP_VAR new_SCIP_VAR_array_array(int nelements) { 204 | long cPtr = SCIPJNIJNI.new_SCIP_VAR_array_array(nelements); 205 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_p_SCIP_VAR(cPtr, false); 206 | } 207 | 208 | public static void delete_SCIP_VAR_array_array(SWIGTYPE_p_p_p_SCIP_VAR ary) { 209 | SCIPJNIJNI.delete_SCIP_VAR_array_array(SWIGTYPE_p_p_p_SCIP_VAR.getCPtr(ary)); 210 | } 211 | 212 | public static SWIGTYPE_p_p_SCIP_VAR SCIP_VAR_array_array_getitem(SWIGTYPE_p_p_p_SCIP_VAR ary, int index) { 213 | long cPtr = SCIPJNIJNI.SCIP_VAR_array_array_getitem(SWIGTYPE_p_p_p_SCIP_VAR.getCPtr(ary), index); 214 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_VAR(cPtr, false); 215 | } 216 | 217 | public static void SCIP_VAR_array_array_setitem(SWIGTYPE_p_p_p_SCIP_VAR ary, int index, SWIGTYPE_p_p_SCIP_VAR value) { 218 | SCIPJNIJNI.SCIP_VAR_array_array_setitem(SWIGTYPE_p_p_p_SCIP_VAR.getCPtr(ary), index, SWIGTYPE_p_p_SCIP_VAR.getCPtr(value)); 219 | } 220 | 221 | public static double SCIPcalcMachineEpsilon() { 222 | return SCIPJNIJNI.SCIPcalcMachineEpsilon(); 223 | } 224 | 225 | public static SCIP_Retcode SCIPcreate(SWIGTYPE_p_p_SCIP scip) { 226 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPcreate(SWIGTYPE_p_p_SCIP.getCPtr(scip))); 227 | } 228 | 229 | public static SCIP_Retcode SCIPreadProb(SWIGTYPE_p_SCIP scip, String filename, String extension) { 230 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPreadProb(SWIGTYPE_p_SCIP.getCPtr(scip), filename, extension)); 231 | } 232 | 233 | public static SCIP_Retcode SCIPreadParams(SWIGTYPE_p_SCIP scip, String filename) { 234 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPreadParams(SWIGTYPE_p_SCIP.getCPtr(scip), filename)); 235 | } 236 | 237 | public static SCIP_Retcode SCIPcreateProbBasic(SWIGTYPE_p_SCIP scip, String probname) { 238 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPcreateProbBasic(SWIGTYPE_p_SCIP.getCPtr(scip), probname)); 239 | } 240 | 241 | public static SCIP_Retcode SCIPincludeDefaultPlugins(SWIGTYPE_p_SCIP scip) { 242 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPincludeDefaultPlugins(SWIGTYPE_p_SCIP.getCPtr(scip))); 243 | } 244 | 245 | public static SCIP_Retcode SCIPsolve(SWIGTYPE_p_SCIP scip) { 246 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsolve(SWIGTYPE_p_SCIP.getCPtr(scip))); 247 | } 248 | 249 | public static SCIP_Retcode SCIPsolveConcurrent(SWIGTYPE_p_SCIP scip) { 250 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsolveConcurrent(SWIGTYPE_p_SCIP.getCPtr(scip))); 251 | } 252 | 253 | public static SCIP_Retcode SCIPinterruptSolve(SWIGTYPE_p_SCIP scip) { 254 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPinterruptSolve(SWIGTYPE_p_SCIP.getCPtr(scip))); 255 | } 256 | 257 | public static long SCIPisSolveInterrupted(SWIGTYPE_p_SCIP scip) { 258 | return SCIPJNIJNI.SCIPisSolveInterrupted(SWIGTYPE_p_SCIP.getCPtr(scip)); 259 | } 260 | 261 | public static SCIP_Retcode SCIPaddVar(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_VAR var) { 262 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPaddVar(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_VAR.getCPtr(var))); 263 | } 264 | 265 | public static int SCIPgetNVars(SWIGTYPE_p_SCIP scip) { 266 | return SCIPJNIJNI.SCIPgetNVars(SWIGTYPE_p_SCIP.getCPtr(scip)); 267 | } 268 | 269 | public static SWIGTYPE_p_p_SCIP_VAR SCIPgetVars(SWIGTYPE_p_SCIP scip) { 270 | long cPtr = SCIPJNIJNI.SCIPgetVars(SWIGTYPE_p_SCIP.getCPtr(scip)); 271 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_VAR(cPtr, false); 272 | } 273 | 274 | public static int SCIPgetNOrigVars(SWIGTYPE_p_SCIP scip) { 275 | return SCIPJNIJNI.SCIPgetNOrigVars(SWIGTYPE_p_SCIP.getCPtr(scip)); 276 | } 277 | 278 | public static SWIGTYPE_p_p_SCIP_VAR SCIPgetOrigVars(SWIGTYPE_p_SCIP scip) { 279 | long cPtr = SCIPJNIJNI.SCIPgetOrigVars(SWIGTYPE_p_SCIP.getCPtr(scip)); 280 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_VAR(cPtr, false); 281 | } 282 | 283 | public static SCIP_Retcode SCIPaddCons(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_CONS cons) { 284 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPaddCons(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_CONS.getCPtr(cons))); 285 | } 286 | 287 | public static SCIP_Retcode SCIPwriteOrigProblem(SWIGTYPE_p_SCIP scip, String filename, String extension, long genericnames) { 288 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPwriteOrigProblem(SWIGTYPE_p_SCIP.getCPtr(scip), filename, extension, genericnames)); 289 | } 290 | 291 | public static SCIP_Retcode SCIPwriteTransProblem(SWIGTYPE_p_SCIP scip, String filename, String extension, long genericnames) { 292 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPwriteTransProblem(SWIGTYPE_p_SCIP.getCPtr(scip), filename, extension, genericnames)); 293 | } 294 | 295 | public static SCIP_Retcode SCIPprintStatistics(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_FILE file) { 296 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPprintStatistics(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_FILE.getCPtr(file))); 297 | } 298 | 299 | public static SCIP_Retcode SCIPprintBestSol(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_FILE file, long printzeros) { 300 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPprintBestSol(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_FILE.getCPtr(file), printzeros)); 301 | } 302 | 303 | public static void SCIPsetMessagehdlrQuiet(SWIGTYPE_p_SCIP scip, long quite) { 304 | SCIPJNIJNI.SCIPsetMessagehdlrQuiet(SWIGTYPE_p_SCIP.getCPtr(scip), quite); 305 | } 306 | 307 | public static SCIP_Status SCIPgetStatus(SWIGTYPE_p_SCIP scip) { 308 | return SCIP_Status.swigToEnum(SCIPJNIJNI.SCIPgetStatus(SWIGTYPE_p_SCIP.getCPtr(scip))); 309 | } 310 | 311 | public static SCIP_Stage SCIPgetStage(SWIGTYPE_p_SCIP scip) { 312 | return SCIP_Stage.swigToEnum(SCIPJNIJNI.SCIPgetStage(SWIGTYPE_p_SCIP.getCPtr(scip))); 313 | } 314 | 315 | public static SWIGTYPE_p_p_SCIP_SOL SCIPgetSols(SWIGTYPE_p_SCIP scip) { 316 | long cPtr = SCIPJNIJNI.SCIPgetSols(SWIGTYPE_p_SCIP.getCPtr(scip)); 317 | return (cPtr == 0) ? null : new SWIGTYPE_p_p_SCIP_SOL(cPtr, false); 318 | } 319 | 320 | public static int SCIPgetNSols(SWIGTYPE_p_SCIP scip) { 321 | return SCIPJNIJNI.SCIPgetNSols(SWIGTYPE_p_SCIP.getCPtr(scip)); 322 | } 323 | 324 | public static SWIGTYPE_p_SCIP_SOL SCIPgetBestSol(SWIGTYPE_p_SCIP scip) { 325 | long cPtr = SCIPJNIJNI.SCIPgetBestSol(SWIGTYPE_p_SCIP.getCPtr(scip)); 326 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_SOL(cPtr, false); 327 | } 328 | 329 | public static double SCIPgetSolVal(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_SOL sol, SWIGTYPE_p_SCIP_VAR var) { 330 | return SCIPJNIJNI.SCIPgetSolVal(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_SOL.getCPtr(sol), SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 331 | } 332 | 333 | public static double SCIPgetSolOrigObj(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_SOL sol) { 334 | return SCIPJNIJNI.SCIPgetSolOrigObj(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_SOL.getCPtr(sol)); 335 | } 336 | 337 | public static double SCIPinfinity(SWIGTYPE_p_SCIP scip) { 338 | return SCIPJNIJNI.SCIPinfinity(SWIGTYPE_p_SCIP.getCPtr(scip)); 339 | } 340 | 341 | public static double SCIPepsilon(SWIGTYPE_p_SCIP scip) { 342 | return SCIPJNIJNI.SCIPepsilon(SWIGTYPE_p_SCIP.getCPtr(scip)); 343 | } 344 | 345 | public static double SCIPfeastol(SWIGTYPE_p_SCIP scip) { 346 | return SCIPJNIJNI.SCIPfeastol(SWIGTYPE_p_SCIP.getCPtr(scip)); 347 | } 348 | 349 | public static SCIP_Retcode SCIPgetBoolParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_unsigned_int p_value) { 350 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetBoolParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_unsigned_int.getCPtr(p_value))); 351 | } 352 | 353 | public static SCIP_Retcode SCIPgetIntParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_int p_value) { 354 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetIntParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_int.getCPtr(p_value))); 355 | } 356 | 357 | public static SCIP_Retcode SCIPgetLongintParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_long_long p_value) { 358 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetLongintParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_long_long.getCPtr(p_value))); 359 | } 360 | 361 | public static SCIP_Retcode SCIPgetRealParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_double p_value) { 362 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetRealParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_double.getCPtr(p_value))); 363 | } 364 | 365 | public static SCIP_Retcode SCIPgetCharParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_char p_value) { 366 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetCharParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_char.getCPtr(p_value))); 367 | } 368 | 369 | public static SCIP_Retcode SCIPgetStringParam(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_p_char p_value) { 370 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPgetStringParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_p_char.getCPtr(p_value))); 371 | } 372 | 373 | public static SCIP_Retcode SCIPsetBoolParam(SWIGTYPE_p_SCIP scip, String name, long value) { 374 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetBoolParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 375 | } 376 | 377 | public static SCIP_Retcode SCIPsetIntParam(SWIGTYPE_p_SCIP scip, String name, int value) { 378 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetIntParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 379 | } 380 | 381 | public static SCIP_Retcode SCIPsetLongintParam(SWIGTYPE_p_SCIP scip, String name, long value) { 382 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetLongintParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 383 | } 384 | 385 | public static SCIP_Retcode SCIPsetRealParam(SWIGTYPE_p_SCIP scip, String name, double value) { 386 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetRealParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 387 | } 388 | 389 | public static SCIP_Retcode SCIPsetCharParam(SWIGTYPE_p_SCIP scip, String name, char value) { 390 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetCharParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 391 | } 392 | 393 | public static SCIP_Retcode SCIPsetStringParam(SWIGTYPE_p_SCIP scip, String name, String value) { 394 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetStringParam(SWIGTYPE_p_SCIP.getCPtr(scip), name, value)); 395 | } 396 | 397 | public static SCIP_Retcode SCIPsetEmphasis(SWIGTYPE_p_SCIP scip, SCIP_ParamEmphasis paramemphasis, long quiet) { 398 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetEmphasis(SWIGTYPE_p_SCIP.getCPtr(scip), paramemphasis.swigValue(), quiet)); 399 | } 400 | 401 | public static SCIP_Retcode SCIPsetObjsense(SWIGTYPE_p_SCIP scip, SCIP_Objsense objsense) { 402 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetObjsense(SWIGTYPE_p_SCIP.getCPtr(scip), objsense.swigValue())); 403 | } 404 | 405 | public static SCIP_Objsense SCIPgetObjsense(SWIGTYPE_p_SCIP scip) { 406 | return SCIP_Objsense.swigToEnum(SCIPJNIJNI.SCIPgetObjsense(SWIGTYPE_p_SCIP.getCPtr(scip))); 407 | } 408 | 409 | public static double SCIPgetGap(SWIGTYPE_p_SCIP scip) { 410 | return SCIPJNIJNI.SCIPgetGap(SWIGTYPE_p_SCIP.getCPtr(scip)); 411 | } 412 | 413 | public static SCIP_Retcode SCIPchgVarObj(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_VAR var, double obj) { 414 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPchgVarObj(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_VAR.getCPtr(var), obj)); 415 | } 416 | 417 | public static SCIP_Retcode SCIPchgVarBranchPriority(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_VAR var, int branchpriority) { 418 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPchgVarBranchPriority(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_VAR.getCPtr(var), branchpriority)); 419 | } 420 | 421 | public static SCIP_Retcode SCIPcreateSol(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_p_SCIP_SOL sol, SWIGTYPE_p_SCIP_HEUR heur) { 422 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPcreateSol(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_p_SCIP_SOL.getCPtr(sol), SWIGTYPE_p_SCIP_HEUR.getCPtr(heur))); 423 | } 424 | 425 | public static SCIP_Retcode SCIPcreatePartialSol(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_p_SCIP_SOL sol, SWIGTYPE_p_SCIP_HEUR heur) { 426 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPcreatePartialSol(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_p_SCIP_SOL.getCPtr(sol), SWIGTYPE_p_SCIP_HEUR.getCPtr(heur))); 427 | } 428 | 429 | public static SCIP_Retcode SCIPsetSolVal(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_SOL sol, SWIGTYPE_p_SCIP_VAR var, double val) { 430 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetSolVal(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_SOL.getCPtr(sol), SWIGTYPE_p_SCIP_VAR.getCPtr(var), val)); 431 | } 432 | 433 | public static SCIP_Retcode SCIPsetSolVals(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_SOL sol, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double val) { 434 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetSolVals(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_SOL.getCPtr(sol), nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(val))); 435 | } 436 | 437 | public static SCIP_Retcode SCIPaddSolFree(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_p_SCIP_SOL sol, SWIGTYPE_p_unsigned_int stored) { 438 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPaddSolFree(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_p_SCIP_SOL.getCPtr(sol), SWIGTYPE_p_unsigned_int.getCPtr(stored))); 439 | } 440 | 441 | public static double SCIPgetPrimalbound(SWIGTYPE_p_SCIP scip) { 442 | return SCIPJNIJNI.SCIPgetPrimalbound(SWIGTYPE_p_SCIP.getCPtr(scip)); 443 | } 444 | 445 | public static double SCIPgetDualbound(SWIGTYPE_p_SCIP scip) { 446 | return SCIPJNIJNI.SCIPgetDualbound(SWIGTYPE_p_SCIP.getCPtr(scip)); 447 | } 448 | 449 | public static double SCIPgetSolvingTime(SWIGTYPE_p_SCIP scip) { 450 | return SCIPJNIJNI.SCIPgetSolvingTime(SWIGTYPE_p_SCIP.getCPtr(scip)); 451 | } 452 | 453 | public static void BMScheckEmptyMemory() { 454 | SCIPJNIJNI.BMScheckEmptyMemory(); 455 | } 456 | 457 | public static long BMSgetMemoryUsed() { 458 | return SCIPJNIJNI.BMSgetMemoryUsed(); 459 | } 460 | 461 | public static String SCIPvarGetName(SWIGTYPE_p_SCIP_VAR var) { 462 | return SCIPJNIJNI.SCIPvarGetName(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 463 | } 464 | 465 | public static SCIP_Vartype SCIPvarGetType(SWIGTYPE_p_SCIP_VAR var) { 466 | return SCIP_Vartype.swigToEnum(SCIPJNIJNI.SCIPvarGetType(SWIGTYPE_p_SCIP_VAR.getCPtr(var))); 467 | } 468 | 469 | public static double SCIPvarGetLbLocal(SWIGTYPE_p_SCIP_VAR var) { 470 | return SCIPJNIJNI.SCIPvarGetLbLocal(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 471 | } 472 | 473 | public static double SCIPvarGetUbLocal(SWIGTYPE_p_SCIP_VAR var) { 474 | return SCIPJNIJNI.SCIPvarGetUbLocal(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 475 | } 476 | 477 | public static double SCIPvarGetLbGlobal(SWIGTYPE_p_SCIP_VAR var) { 478 | return SCIPJNIJNI.SCIPvarGetLbGlobal(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 479 | } 480 | 481 | public static double SCIPvarGetUbGlobal(SWIGTYPE_p_SCIP_VAR var) { 482 | return SCIPJNIJNI.SCIPvarGetUbGlobal(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 483 | } 484 | 485 | public static double SCIPvarGetObj(SWIGTYPE_p_SCIP_VAR var) { 486 | return SCIPJNIJNI.SCIPvarGetObj(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 487 | } 488 | 489 | public static int SCIPvarGetBranchPriority(SWIGTYPE_p_SCIP_VAR var) { 490 | return SCIPJNIJNI.SCIPvarGetBranchPriority(SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 491 | } 492 | 493 | public static int SCIPsolGetDepth(SWIGTYPE_p_SCIP_SOL sol) { 494 | return SCIPJNIJNI.SCIPsolGetDepth(SWIGTYPE_p_SCIP_SOL.getCPtr(sol)); 495 | } 496 | 497 | public static int SCIPsolGetIndex(SWIGTYPE_p_SCIP_SOL sol) { 498 | return SCIPJNIJNI.SCIPsolGetIndex(SWIGTYPE_p_SCIP_SOL.getCPtr(sol)); 499 | } 500 | 501 | public static String SCIPconsGetName(SWIGTYPE_p_SCIP_CONS cons) { 502 | return SCIPJNIJNI.SCIPconsGetName(SWIGTYPE_p_SCIP_CONS.getCPtr(cons)); 503 | } 504 | 505 | public static ObjMessagehdlr SCIPgetObjMessagehdlr(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr) { 506 | long cPtr = SCIPJNIJNI.SCIPgetObjMessagehdlr(SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr)); 507 | return (cPtr == 0) ? null : new ObjMessagehdlr(cPtr, false); 508 | } 509 | 510 | public static void SCIPsetStaticErrorPrintingMessagehdlr(SWIGTYPE_p_SCIP_Messagehdlr messagehdlr) { 511 | SCIPJNIJNI.SCIPsetStaticErrorPrintingMessagehdlr(SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr)); 512 | } 513 | 514 | public static SCIP_Retcode SCIPsetMessagehdlr(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_Messagehdlr messagehdlr) { 515 | return SCIP_Retcode.swigToEnum(SCIPJNIJNI.SCIPsetMessagehdlr(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_Messagehdlr.getCPtr(messagehdlr))); 516 | } 517 | 518 | public static SWIGTYPE_p_SCIP_Messagehdlr SCIPgetMessagehdlr(SWIGTYPE_p_SCIP scip) { 519 | long cPtr = SCIPJNIJNI.SCIPgetMessagehdlr(SWIGTYPE_p_SCIP.getCPtr(scip)); 520 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(cPtr, false); 521 | } 522 | 523 | public static void SCIPsetMessagehdlrLogfile(SWIGTYPE_p_SCIP scip, String filename) { 524 | SCIPJNIJNI.SCIPsetMessagehdlrLogfile(SWIGTYPE_p_SCIP.getCPtr(scip), filename); 525 | } 526 | 527 | public static SCIP_VerbLevel SCIPgetVerbLevel(SWIGTYPE_p_SCIP scip) { 528 | return SCIP_VerbLevel.swigToEnum(SCIPJNIJNI.SCIPgetVerbLevel(SWIGTYPE_p_SCIP.getCPtr(scip))); 529 | } 530 | 531 | public static SWIGTYPE_p_SCIP createSCIP() { 532 | long cPtr = SCIPJNIJNI.createSCIP(); 533 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP(cPtr, false); 534 | } 535 | 536 | public static void freeSCIP(SWIGTYPE_p_SCIP scip) { 537 | SCIPJNIJNI.freeSCIP(SWIGTYPE_p_SCIP.getCPtr(scip)); 538 | } 539 | 540 | public static SWIGTYPE_p_SCIP_VAR createVar(SWIGTYPE_p_SCIP scip, String name, double lb, double ub, double obj, SCIP_Vartype vartype) { 541 | long cPtr = SCIPJNIJNI.createVar(SWIGTYPE_p_SCIP.getCPtr(scip), name, lb, ub, obj, vartype.swigValue()); 542 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_VAR(cPtr, false); 543 | } 544 | 545 | public static void releaseVar(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_VAR var) { 546 | SCIPJNIJNI.releaseVar(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 547 | } 548 | 549 | public static SWIGTYPE_p_SCIP_EXPR createExprAbs(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 550 | long cPtr = SCIPJNIJNI.createExprAbs(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 551 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 552 | } 553 | 554 | public static SWIGTYPE_p_SCIP_EXPR createExprEntropy(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 555 | long cPtr = SCIPJNIJNI.createExprEntropy(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 556 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 557 | } 558 | 559 | public static SWIGTYPE_p_SCIP_EXPR createExprExp(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 560 | long cPtr = SCIPJNIJNI.createExprExp(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 561 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 562 | } 563 | 564 | public static SWIGTYPE_p_SCIP_EXPR createExprLog(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 565 | long cPtr = SCIPJNIJNI.createExprLog(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 566 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 567 | } 568 | 569 | public static SWIGTYPE_p_SCIP_EXPR createExprPow(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child, double exponent) { 570 | long cPtr = SCIPJNIJNI.createExprPow(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child), exponent); 571 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 572 | } 573 | 574 | public static SWIGTYPE_p_SCIP_EXPR createExprSignpower(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child, double exponent) { 575 | long cPtr = SCIPJNIJNI.createExprSignpower(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child), exponent); 576 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 577 | } 578 | 579 | public static SWIGTYPE_p_SCIP_EXPR createExprProduct(SWIGTYPE_p_SCIP scip, int nchildren, SWIGTYPE_p_p_SCIP_EXPR children, double coefficient) { 580 | long cPtr = SCIPJNIJNI.createExprProduct(SWIGTYPE_p_SCIP.getCPtr(scip), nchildren, SWIGTYPE_p_p_SCIP_EXPR.getCPtr(children), coefficient); 581 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 582 | } 583 | 584 | public static SWIGTYPE_p_SCIP_EXPR createExprSum(SWIGTYPE_p_SCIP scip, int nchildren, SWIGTYPE_p_p_SCIP_EXPR children, SWIGTYPE_p_double coefficients, double constant) { 585 | long cPtr = SCIPJNIJNI.createExprSum(SWIGTYPE_p_SCIP.getCPtr(scip), nchildren, SWIGTYPE_p_p_SCIP_EXPR.getCPtr(children), SWIGTYPE_p_double.getCPtr(coefficients), constant); 586 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 587 | } 588 | 589 | public static SWIGTYPE_p_SCIP_EXPR createExprSin(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 590 | long cPtr = SCIPJNIJNI.createExprSin(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 591 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 592 | } 593 | 594 | public static SWIGTYPE_p_SCIP_EXPR createExprCos(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR child) { 595 | long cPtr = SCIPJNIJNI.createExprCos(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(child)); 596 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 597 | } 598 | 599 | public static SWIGTYPE_p_SCIP_EXPR createExprValue(SWIGTYPE_p_SCIP scip, double value) { 600 | long cPtr = SCIPJNIJNI.createExprValue(SWIGTYPE_p_SCIP.getCPtr(scip), value); 601 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 602 | } 603 | 604 | public static SWIGTYPE_p_SCIP_EXPR createExprVar(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_VAR var) { 605 | long cPtr = SCIPJNIJNI.createExprVar(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_VAR.getCPtr(var)); 606 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_EXPR(cPtr, false); 607 | } 608 | 609 | public static void releaseExpr(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_EXPR expr) { 610 | SCIPJNIJNI.releaseExpr(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_EXPR.getCPtr(expr)); 611 | } 612 | 613 | public static SWIGTYPE_p_SCIP_CONS createConsBasicLinear(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double vals, double lhs, double rhs) { 614 | long cPtr = SCIPJNIJNI.createConsBasicLinear(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(vals), lhs, rhs); 615 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 616 | } 617 | 618 | public static SWIGTYPE_p_SCIP_CONS createConsBasicQuadratic(SWIGTYPE_p_SCIP scip, String name, int nlinvars, SWIGTYPE_p_p_SCIP_VAR linvars, SWIGTYPE_p_double lincoefs, int nquadvars, SWIGTYPE_p_p_SCIP_VAR quadvars1, SWIGTYPE_p_p_SCIP_VAR quadvars2, SWIGTYPE_p_double quadcoefs, double lhs, double rhs) { 619 | long cPtr = SCIPJNIJNI.createConsBasicQuadratic(SWIGTYPE_p_SCIP.getCPtr(scip), name, nlinvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(linvars), SWIGTYPE_p_double.getCPtr(lincoefs), nquadvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(quadvars1), SWIGTYPE_p_p_SCIP_VAR.getCPtr(quadvars2), SWIGTYPE_p_double.getCPtr(quadcoefs), lhs, rhs); 620 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 621 | } 622 | 623 | public static SWIGTYPE_p_SCIP_CONS createConsBasicNonlinear(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_EXPR expr, double lhs, double rhs) { 624 | long cPtr = SCIPJNIJNI.createConsBasicNonlinear(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_EXPR.getCPtr(expr), lhs, rhs); 625 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 626 | } 627 | 628 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSuperindicator(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR binvar, SWIGTYPE_p_SCIP_CONS slackcons) { 629 | long cPtr = SCIPJNIJNI.createConsBasicSuperindicator(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(binvar), SWIGTYPE_p_SCIP_CONS.getCPtr(slackcons)); 630 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 631 | } 632 | 633 | public static SWIGTYPE_p_SCIP_CONS createConsBasicPseudoboolean(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_p_SCIP_VAR linvars, int nlinvars, SWIGTYPE_p_double linvals, SWIGTYPE_p_p_p_SCIP_VAR terms, int nterms, SWIGTYPE_p_int ntermvars, SWIGTYPE_p_double termvals, SWIGTYPE_p_SCIP_VAR indvar, double weight, long issoftcons, SWIGTYPE_p_SCIP_VAR intvar, double lhs, double rhs) { 634 | long cPtr = SCIPJNIJNI.createConsBasicPseudoboolean(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_p_SCIP_VAR.getCPtr(linvars), nlinvars, SWIGTYPE_p_double.getCPtr(linvals), SWIGTYPE_p_p_p_SCIP_VAR.getCPtr(terms), nterms, SWIGTYPE_p_int.getCPtr(ntermvars), SWIGTYPE_p_double.getCPtr(termvals), SWIGTYPE_p_SCIP_VAR.getCPtr(indvar), weight, issoftcons, SWIGTYPE_p_SCIP_VAR.getCPtr(intvar), lhs, rhs); 635 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 636 | } 637 | 638 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSetpart(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 639 | long cPtr = SCIPJNIJNI.createConsBasicSetpart(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 640 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 641 | } 642 | 643 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSetpack(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 644 | long cPtr = SCIPJNIJNI.createConsBasicSetpack(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 645 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 646 | } 647 | 648 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSetcover(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 649 | long cPtr = SCIPJNIJNI.createConsBasicSetcover(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 650 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 651 | } 652 | 653 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSOC(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double coefs, SWIGTYPE_p_double offsets, double constant, SWIGTYPE_p_SCIP_VAR rhsvar, double rhscoeff, double rhsoffset) { 654 | long cPtr = SCIPJNIJNI.createConsBasicSOC(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(coefs), SWIGTYPE_p_double.getCPtr(offsets), constant, SWIGTYPE_p_SCIP_VAR.getCPtr(rhsvar), rhscoeff, rhsoffset); 655 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 656 | } 657 | 658 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSignpower(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR x, SWIGTYPE_p_SCIP_VAR z, double exponent, double xoffset, double zcoef, double lhs, double rhs) { 659 | long cPtr = SCIPJNIJNI.createConsBasicSignpower(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(x), SWIGTYPE_p_SCIP_VAR.getCPtr(z), exponent, xoffset, zcoef, lhs, rhs); 660 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 661 | } 662 | 663 | public static SWIGTYPE_p_SCIP_CONS createConsBasicAnd(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR resvar, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 664 | long cPtr = SCIPJNIJNI.createConsBasicAnd(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(resvar), nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 665 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 666 | } 667 | 668 | public static SWIGTYPE_p_SCIP_CONS createConsBasicOr(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR resvar, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 669 | long cPtr = SCIPJNIJNI.createConsBasicOr(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(resvar), nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 670 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 671 | } 672 | 673 | public static SWIGTYPE_p_SCIP_CONS createConsBasicBounddisjunction(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_SCIP_BoundType boundtypes, SWIGTYPE_p_double bounds) { 674 | long cPtr = SCIPJNIJNI.createConsBasicBounddisjunction(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_SCIP_BoundType.getCPtr(boundtypes), SWIGTYPE_p_double.getCPtr(bounds)); 675 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 676 | } 677 | 678 | public static SWIGTYPE_p_SCIP_CONS createConsBasicBounddisjunctionRedundant(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_SCIP_BoundType boundtypes, SWIGTYPE_p_double bounds) { 679 | long cPtr = SCIPJNIJNI.createConsBasicBounddisjunctionRedundant(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_SCIP_BoundType.getCPtr(boundtypes), SWIGTYPE_p_double.getCPtr(bounds)); 680 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 681 | } 682 | 683 | public static SWIGTYPE_p_SCIP_CONS createConsBasicCardinality(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, int cardval, SWIGTYPE_p_p_SCIP_VAR indvars, SWIGTYPE_p_double weights) { 684 | long cPtr = SCIPJNIJNI.createConsBasicCardinality(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), cardval, SWIGTYPE_p_p_SCIP_VAR.getCPtr(indvars), SWIGTYPE_p_double.getCPtr(weights)); 685 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 686 | } 687 | 688 | public static SWIGTYPE_p_SCIP_CONS createConsBasicConjunction(SWIGTYPE_p_SCIP scip, String name, int nconss, SWIGTYPE_p_p_SCIP_CONS conss) { 689 | long cPtr = SCIPJNIJNI.createConsBasicConjunction(SWIGTYPE_p_SCIP.getCPtr(scip), name, nconss, SWIGTYPE_p_p_SCIP_CONS.getCPtr(conss)); 690 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 691 | } 692 | 693 | public static SWIGTYPE_p_SCIP_CONS createConsBasicDisjunction(SWIGTYPE_p_SCIP scip, String name, int nconss, SWIGTYPE_p_p_SCIP_CONS conss, SWIGTYPE_p_SCIP_CONS relaxcons) { 694 | long cPtr = SCIPJNIJNI.createConsBasicDisjunction(SWIGTYPE_p_SCIP.getCPtr(scip), name, nconss, SWIGTYPE_p_p_SCIP_CONS.getCPtr(conss), SWIGTYPE_p_SCIP_CONS.getCPtr(relaxcons)); 695 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 696 | } 697 | 698 | public static SWIGTYPE_p_SCIP_CONS createConsBasicCumulative(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_int durations, SWIGTYPE_p_int demands, int capacity) { 699 | long cPtr = SCIPJNIJNI.createConsBasicCumulative(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_int.getCPtr(durations), SWIGTYPE_p_int.getCPtr(demands), capacity); 700 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 701 | } 702 | 703 | public static SWIGTYPE_p_SCIP_CONS createConsBasicIndicator(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR binvar, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double vals, double rhs) { 704 | long cPtr = SCIPJNIJNI.createConsBasicIndicator(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(binvar), nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(vals), rhs); 705 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 706 | } 707 | 708 | public static SWIGTYPE_p_SCIP_CONS createConsBasicIndicatorLinCons(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR binvar, SWIGTYPE_p_SCIP_CONS lincons, SWIGTYPE_p_SCIP_VAR slackvar) { 709 | long cPtr = SCIPJNIJNI.createConsBasicIndicatorLinCons(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(binvar), SWIGTYPE_p_SCIP_CONS.getCPtr(lincons), SWIGTYPE_p_SCIP_VAR.getCPtr(slackvar)); 710 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 711 | } 712 | 713 | public static SWIGTYPE_p_SCIP_CONS createConsBasicKnapsack(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_long_long weights, long capacity) { 714 | long cPtr = SCIPJNIJNI.createConsBasicKnapsack(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_long_long.getCPtr(weights), capacity); 715 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 716 | } 717 | 718 | public static SWIGTYPE_p_SCIP_CONS createConsBasicLinking(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR linkvar, SWIGTYPE_p_p_SCIP_VAR binvars, SWIGTYPE_p_double vals, int nbinvars) { 719 | long cPtr = SCIPJNIJNI.createConsBasicLinking(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(linkvar), SWIGTYPE_p_p_SCIP_VAR.getCPtr(binvars), SWIGTYPE_p_double.getCPtr(vals), nbinvars); 720 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 721 | } 722 | 723 | public static SWIGTYPE_p_SCIP_CONS createConsBasicLogicor(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 724 | long cPtr = SCIPJNIJNI.createConsBasicLogicor(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 725 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 726 | } 727 | 728 | public static SWIGTYPE_p_SCIP_CONS createConsBasicOrbisack(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_p_SCIP_VAR vars1, SWIGTYPE_p_p_SCIP_VAR vars2, int nrows, long ispporbisack, long isparttype, long ismodelcons) { 729 | long cPtr = SCIPJNIJNI.createConsBasicOrbisack(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars1), SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars2), nrows, ispporbisack, isparttype, ismodelcons); 730 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 731 | } 732 | 733 | public static SWIGTYPE_p_SCIP_CONS createConsBasicOrbitope(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_p_p_SCIP_VAR vars, SCIP_OrbitopeType orbitopetype, int nspcons, int nblocks, long usedynamicprop, long resolveprop, long ismodelcons, long mayinteract) { 734 | long cPtr = SCIPJNIJNI.createConsBasicOrbitope(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_p_p_SCIP_VAR.getCPtr(vars), orbitopetype.swigValue(), nspcons, nblocks, usedynamicprop, resolveprop, ismodelcons, mayinteract); 735 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 736 | } 737 | 738 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSOS1(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double weights) { 739 | long cPtr = SCIPJNIJNI.createConsBasicSOS1(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(weights)); 740 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 741 | } 742 | 743 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSOS2(SWIGTYPE_p_SCIP scip, String name, int nvars, SWIGTYPE_p_p_SCIP_VAR vars, SWIGTYPE_p_double weights) { 744 | long cPtr = SCIPJNIJNI.createConsBasicSOS2(SWIGTYPE_p_SCIP.getCPtr(scip), name, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), SWIGTYPE_p_double.getCPtr(weights)); 745 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 746 | } 747 | 748 | public static SWIGTYPE_p_SCIP_CONS createConsBasicSymresack(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_int perm, SWIGTYPE_p_p_SCIP_VAR vars, int nvars, long ismodelcons) { 749 | long cPtr = SCIPJNIJNI.createConsBasicSymresack(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_int.getCPtr(perm), SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars), nvars, ismodelcons); 750 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 751 | } 752 | 753 | public static SWIGTYPE_p_SCIP_CONS createConsBasicVarbound(SWIGTYPE_p_SCIP scip, String name, SWIGTYPE_p_SCIP_VAR var, SWIGTYPE_p_SCIP_VAR vbdvar, double vbdcoef, double lhs, double rhs) { 754 | long cPtr = SCIPJNIJNI.createConsBasicVarbound(SWIGTYPE_p_SCIP.getCPtr(scip), name, SWIGTYPE_p_SCIP_VAR.getCPtr(var), SWIGTYPE_p_SCIP_VAR.getCPtr(vbdvar), vbdcoef, lhs, rhs); 755 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 756 | } 757 | 758 | public static SWIGTYPE_p_SCIP_CONS createConsBasicXor(SWIGTYPE_p_SCIP scip, String name, long rhs, int nvars, SWIGTYPE_p_p_SCIP_VAR vars) { 759 | long cPtr = SCIPJNIJNI.createConsBasicXor(SWIGTYPE_p_SCIP.getCPtr(scip), name, rhs, nvars, SWIGTYPE_p_p_SCIP_VAR.getCPtr(vars)); 760 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_CONS(cPtr, false); 761 | } 762 | 763 | public static void releaseCons(SWIGTYPE_p_SCIP scip, SWIGTYPE_p_SCIP_CONS cons) { 764 | SCIPJNIJNI.releaseCons(SWIGTYPE_p_SCIP.getCPtr(scip), SWIGTYPE_p_SCIP_CONS.getCPtr(cons)); 765 | } 766 | 767 | public static SWIGTYPE_p_SCIP_Messagehdlr createObjMessagehdlr(ObjMessagehdlr objmessagehdlr, long deleteobject) { 768 | long cPtr = SCIPJNIJNI.createObjMessagehdlr(ObjMessagehdlr.getCPtr(objmessagehdlr), objmessagehdlr, deleteobject); 769 | return (cPtr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(cPtr, false); 770 | } 771 | 772 | } 773 | -------------------------------------------------------------------------------- /java/jscip/SCIPJNIJNI.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SCIPJNIJNI { 12 | public final static native long new_char_array(int jarg1); 13 | public final static native void delete_char_array(long jarg1); 14 | public final static native char char_array_getitem(long jarg1, int jarg2); 15 | public final static native void char_array_setitem(long jarg1, int jarg2, char jarg3); 16 | public final static native long new_double_array(int jarg1); 17 | public final static native void delete_double_array(long jarg1); 18 | public final static native double double_array_getitem(long jarg1, int jarg2); 19 | public final static native void double_array_setitem(long jarg1, int jarg2, double jarg3); 20 | public final static native long new_int_array(int jarg1); 21 | public final static native void delete_int_array(long jarg1); 22 | public final static native int int_array_getitem(long jarg1, int jarg2); 23 | public final static native void int_array_setitem(long jarg1, int jarg2, int jarg3); 24 | public final static native long new_long_long_array(int jarg1); 25 | public final static native void delete_long_long_array(long jarg1); 26 | public final static native long long_long_array_getitem(long jarg1, int jarg2); 27 | public final static native void long_long_array_setitem(long jarg1, int jarg2, long jarg3); 28 | public final static native long new_unsigned_int_array(int jarg1); 29 | public final static native void delete_unsigned_int_array(long jarg1); 30 | public final static native long unsigned_int_array_getitem(long jarg1, int jarg2); 31 | public final static native void unsigned_int_array_setitem(long jarg1, int jarg2, long jarg3); 32 | public final static native long new_SCIP_BoundType_array(int jarg1); 33 | public final static native void delete_SCIP_BoundType_array(long jarg1); 34 | public final static native int SCIP_BoundType_array_getitem(long jarg1, int jarg2); 35 | public final static native void SCIP_BoundType_array_setitem(long jarg1, int jarg2, int jarg3); 36 | public final static native long new_String_array(int jarg1); 37 | public final static native void delete_String_array(long jarg1); 38 | public final static native String String_array_getitem(long jarg1, int jarg2); 39 | public final static native void String_array_setitem(long jarg1, int jarg2, String jarg3); 40 | public final static native long new_SCIP_VAR_array(int jarg1); 41 | public final static native void delete_SCIP_VAR_array(long jarg1); 42 | public final static native long SCIP_VAR_array_getitem(long jarg1, int jarg2); 43 | public final static native void SCIP_VAR_array_setitem(long jarg1, int jarg2, long jarg3); 44 | public final static native long new_SCIP_EXPR_array(int jarg1); 45 | public final static native void delete_SCIP_EXPR_array(long jarg1); 46 | public final static native long SCIP_EXPR_array_getitem(long jarg1, int jarg2); 47 | public final static native void SCIP_EXPR_array_setitem(long jarg1, int jarg2, long jarg3); 48 | public final static native long new_SCIP_CONS_array(int jarg1); 49 | public final static native void delete_SCIP_CONS_array(long jarg1); 50 | public final static native long SCIP_CONS_array_getitem(long jarg1, int jarg2); 51 | public final static native void SCIP_CONS_array_setitem(long jarg1, int jarg2, long jarg3); 52 | public final static native long new_SCIP_SOL_array(int jarg1); 53 | public final static native void delete_SCIP_SOL_array(long jarg1); 54 | public final static native long SCIP_SOL_array_getitem(long jarg1, int jarg2); 55 | public final static native void SCIP_SOL_array_setitem(long jarg1, int jarg2, long jarg3); 56 | public final static native long new_SCIP_VAR_array_array(int jarg1); 57 | public final static native void delete_SCIP_VAR_array_array(long jarg1); 58 | public final static native long SCIP_VAR_array_array_getitem(long jarg1, int jarg2); 59 | public final static native void SCIP_VAR_array_array_setitem(long jarg1, int jarg2, long jarg3); 60 | public final static native int SCIP_OKAY_get(); 61 | public final static native int SCIP_ERROR_get(); 62 | public final static native int SCIP_NOMEMORY_get(); 63 | public final static native int SCIP_READERROR_get(); 64 | public final static native int SCIP_WRITEERROR_get(); 65 | public final static native int SCIP_NOFILE_get(); 66 | public final static native int SCIP_FILECREATEERROR_get(); 67 | public final static native int SCIP_LPERROR_get(); 68 | public final static native int SCIP_NOPROBLEM_get(); 69 | public final static native int SCIP_INVALIDCALL_get(); 70 | public final static native int SCIP_INVALIDDATA_get(); 71 | public final static native int SCIP_INVALIDRESULT_get(); 72 | public final static native int SCIP_PLUGINNOTFOUND_get(); 73 | public final static native int SCIP_PARAMETERUNKNOWN_get(); 74 | public final static native int SCIP_PARAMETERWRONGTYPE_get(); 75 | public final static native int SCIP_PARAMETERWRONGVAL_get(); 76 | public final static native int SCIP_KEYALREADYEXISTING_get(); 77 | public final static native int SCIP_MAXDEPTHLEVEL_get(); 78 | public final static native int SCIP_BRANCHERROR_get(); 79 | public final static native int SCIP_VARTYPE_BINARY_get(); 80 | public final static native int SCIP_VARTYPE_INTEGER_get(); 81 | public final static native int SCIP_VARTYPE_IMPLINT_get(); 82 | public final static native int SCIP_VARTYPE_CONTINUOUS_get(); 83 | public final static native int SCIP_BOUNDTYPE_LOWER_get(); 84 | public final static native int SCIP_BOUNDTYPE_UPPER_get(); 85 | public final static native int SCIP_ORBITOPETYPE_FULL_get(); 86 | public final static native int SCIP_ORBITOPETYPE_PARTITIONING_get(); 87 | public final static native int SCIP_ORBITOPETYPE_PACKING_get(); 88 | public final static native int SCIP_PARAMEMPHASIS_DEFAULT_get(); 89 | public final static native int SCIP_PARAMEMPHASIS_CPSOLVER_get(); 90 | public final static native int SCIP_PARAMEMPHASIS_EASYCIP_get(); 91 | public final static native int SCIP_PARAMEMPHASIS_FEASIBILITY_get(); 92 | public final static native int SCIP_PARAMEMPHASIS_HARDLP_get(); 93 | public final static native int SCIP_PARAMEMPHASIS_OPTIMALITY_get(); 94 | public final static native int SCIP_PARAMEMPHASIS_COUNTER_get(); 95 | public final static native int SCIP_PARAMEMPHASIS_PHASEFEAS_get(); 96 | public final static native int SCIP_PARAMEMPHASIS_PHASEIMPROVE_get(); 97 | public final static native int SCIP_PARAMEMPHASIS_PHASEPROOF_get(); 98 | public final static native int SCIP_VERBLEVEL_NONE_get(); 99 | public final static native int SCIP_VERBLEVEL_DIALOG_get(); 100 | public final static native int SCIP_VERBLEVEL_MINIMAL_get(); 101 | public final static native int SCIP_VERBLEVEL_NORMAL_get(); 102 | public final static native int SCIP_VERBLEVEL_HIGH_get(); 103 | public final static native int SCIP_VERBLEVEL_FULL_get(); 104 | public final static native int SCIP_OBJSENSE_MAXIMIZE_get(); 105 | public final static native int SCIP_OBJSENSE_MINIMIZE_get(); 106 | public final static native int SCIP_STATUS_UNKNOWN_get(); 107 | public final static native int SCIP_STATUS_USERINTERRUPT_get(); 108 | public final static native int SCIP_STATUS_NODELIMIT_get(); 109 | public final static native int SCIP_STATUS_TOTALNODELIMIT_get(); 110 | public final static native int SCIP_STATUS_STALLNODELIMIT_get(); 111 | public final static native int SCIP_STATUS_TIMELIMIT_get(); 112 | public final static native int SCIP_STATUS_MEMLIMIT_get(); 113 | public final static native int SCIP_STATUS_GAPLIMIT_get(); 114 | public final static native int SCIP_STATUS_SOLLIMIT_get(); 115 | public final static native int SCIP_STATUS_BESTSOLLIMIT_get(); 116 | public final static native int SCIP_STATUS_RESTARTLIMIT_get(); 117 | public final static native int SCIP_STATUS_OPTIMAL_get(); 118 | public final static native int SCIP_STATUS_INFEASIBLE_get(); 119 | public final static native int SCIP_STATUS_UNBOUNDED_get(); 120 | public final static native int SCIP_STATUS_INFORUNBD_get(); 121 | public final static native int SCIP_STATUS_TERMINATE_get(); 122 | public final static native int SCIP_STAGE_INIT_get(); 123 | public final static native int SCIP_STAGE_PROBLEM_get(); 124 | public final static native int SCIP_STAGE_TRANSFORMING_get(); 125 | public final static native int SCIP_STAGE_TRANSFORMED_get(); 126 | public final static native int SCIP_STAGE_INITPRESOLVE_get(); 127 | public final static native int SCIP_STAGE_PRESOLVING_get(); 128 | public final static native int SCIP_STAGE_EXITPRESOLVE_get(); 129 | public final static native int SCIP_STAGE_PRESOLVED_get(); 130 | public final static native int SCIP_STAGE_INITSOLVE_get(); 131 | public final static native int SCIP_STAGE_SOLVING_get(); 132 | public final static native int SCIP_STAGE_SOLVED_get(); 133 | public final static native int SCIP_STAGE_EXITSOLVE_get(); 134 | public final static native int SCIP_STAGE_FREETRANS_get(); 135 | public final static native int SCIP_STAGE_FREE_get(); 136 | public final static native double SCIPcalcMachineEpsilon(); 137 | public final static native int SCIPcreate(long jarg1); 138 | public final static native int SCIPreadProb(long jarg1, String jarg2, String jarg3); 139 | public final static native int SCIPreadParams(long jarg1, String jarg2); 140 | public final static native int SCIPcreateProbBasic(long jarg1, String jarg2); 141 | public final static native int SCIPincludeDefaultPlugins(long jarg1); 142 | public final static native int SCIPsolve(long jarg1); 143 | public final static native int SCIPsolveConcurrent(long jarg1); 144 | public final static native int SCIPinterruptSolve(long jarg1); 145 | public final static native long SCIPisSolveInterrupted(long jarg1); 146 | public final static native int SCIPaddVar(long jarg1, long jarg2); 147 | public final static native int SCIPgetNVars(long jarg1); 148 | public final static native long SCIPgetVars(long jarg1); 149 | public final static native int SCIPgetNOrigVars(long jarg1); 150 | public final static native long SCIPgetOrigVars(long jarg1); 151 | public final static native int SCIPaddCons(long jarg1, long jarg2); 152 | public final static native int SCIPwriteOrigProblem(long jarg1, String jarg2, String jarg3, long jarg4); 153 | public final static native int SCIPwriteTransProblem(long jarg1, String jarg2, String jarg3, long jarg4); 154 | public final static native int SCIPprintStatistics(long jarg1, long jarg2); 155 | public final static native int SCIPprintBestSol(long jarg1, long jarg2, long jarg3); 156 | public final static native void SCIPsetMessagehdlrQuiet(long jarg1, long jarg2); 157 | public final static native int SCIPgetStatus(long jarg1); 158 | public final static native int SCIPgetStage(long jarg1); 159 | public final static native long SCIPgetSols(long jarg1); 160 | public final static native int SCIPgetNSols(long jarg1); 161 | public final static native long SCIPgetBestSol(long jarg1); 162 | public final static native double SCIPgetSolVal(long jarg1, long jarg2, long jarg3); 163 | public final static native double SCIPgetSolOrigObj(long jarg1, long jarg2); 164 | public final static native double SCIPinfinity(long jarg1); 165 | public final static native double SCIPepsilon(long jarg1); 166 | public final static native double SCIPfeastol(long jarg1); 167 | public final static native int SCIPgetBoolParam(long jarg1, String jarg2, long jarg3); 168 | public final static native int SCIPgetIntParam(long jarg1, String jarg2, long jarg3); 169 | public final static native int SCIPgetLongintParam(long jarg1, String jarg2, long jarg3); 170 | public final static native int SCIPgetRealParam(long jarg1, String jarg2, long jarg3); 171 | public final static native int SCIPgetCharParam(long jarg1, String jarg2, long jarg3); 172 | public final static native int SCIPgetStringParam(long jarg1, String jarg2, long jarg3); 173 | public final static native int SCIPsetBoolParam(long jarg1, String jarg2, long jarg3); 174 | public final static native int SCIPsetIntParam(long jarg1, String jarg2, int jarg3); 175 | public final static native int SCIPsetLongintParam(long jarg1, String jarg2, long jarg3); 176 | public final static native int SCIPsetRealParam(long jarg1, String jarg2, double jarg3); 177 | public final static native int SCIPsetCharParam(long jarg1, String jarg2, char jarg3); 178 | public final static native int SCIPsetStringParam(long jarg1, String jarg2, String jarg3); 179 | public final static native int SCIPsetEmphasis(long jarg1, int jarg2, long jarg3); 180 | public final static native int SCIPsetObjsense(long jarg1, int jarg2); 181 | public final static native int SCIPgetObjsense(long jarg1); 182 | public final static native double SCIPgetGap(long jarg1); 183 | public final static native int SCIPchgVarObj(long jarg1, long jarg2, double jarg3); 184 | public final static native int SCIPchgVarBranchPriority(long jarg1, long jarg2, int jarg3); 185 | public final static native int SCIPcreateSol(long jarg1, long jarg2, long jarg3); 186 | public final static native int SCIPcreatePartialSol(long jarg1, long jarg2, long jarg3); 187 | public final static native int SCIPsetSolVal(long jarg1, long jarg2, long jarg3, double jarg4); 188 | public final static native int SCIPsetSolVals(long jarg1, long jarg2, int jarg3, long jarg4, long jarg5); 189 | public final static native int SCIPaddSolFree(long jarg1, long jarg2, long jarg3); 190 | public final static native double SCIPgetPrimalbound(long jarg1); 191 | public final static native double SCIPgetDualbound(long jarg1); 192 | public final static native double SCIPgetSolvingTime(long jarg1); 193 | public final static native void BMScheckEmptyMemory(); 194 | public final static native long BMSgetMemoryUsed(); 195 | public final static native String SCIPvarGetName(long jarg1); 196 | public final static native int SCIPvarGetType(long jarg1); 197 | public final static native double SCIPvarGetLbLocal(long jarg1); 198 | public final static native double SCIPvarGetUbLocal(long jarg1); 199 | public final static native double SCIPvarGetLbGlobal(long jarg1); 200 | public final static native double SCIPvarGetUbGlobal(long jarg1); 201 | public final static native double SCIPvarGetObj(long jarg1); 202 | public final static native int SCIPvarGetBranchPriority(long jarg1); 203 | public final static native int SCIPsolGetDepth(long jarg1); 204 | public final static native int SCIPsolGetIndex(long jarg1); 205 | public final static native String SCIPconsGetName(long jarg1); 206 | public final static native long ObjMessagehdlr_scip_bufferedoutput__get(long jarg1, ObjMessagehdlr jarg1_); 207 | public final static native long new_ObjMessagehdlr(long jarg1); 208 | public final static native void delete_ObjMessagehdlr(long jarg1); 209 | public final static native void ObjMessagehdlr_scip_error(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 210 | public final static native void ObjMessagehdlr_scip_errorSwigExplicitObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 211 | public final static native void ObjMessagehdlr_scip_warning(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 212 | public final static native void ObjMessagehdlr_scip_warningSwigExplicitObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 213 | public final static native void ObjMessagehdlr_scip_dialog(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 214 | public final static native void ObjMessagehdlr_scip_dialogSwigExplicitObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 215 | public final static native void ObjMessagehdlr_scip_info(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 216 | public final static native void ObjMessagehdlr_scip_infoSwigExplicitObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2, long jarg3, String jarg4); 217 | public final static native int ObjMessagehdlr_scip_free(long jarg1, ObjMessagehdlr jarg1_, long jarg2); 218 | public final static native int ObjMessagehdlr_scip_freeSwigExplicitObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2); 219 | public final static native void ObjMessagehdlr_director_connect(ObjMessagehdlr obj, long cptr, boolean mem_own, boolean weak_global); 220 | public final static native void ObjMessagehdlr_change_ownership(ObjMessagehdlr obj, long cptr, boolean take_or_release); 221 | public final static native long SCIPgetObjMessagehdlr(long jarg1); 222 | public final static native void SCIPsetStaticErrorPrintingMessagehdlr(long jarg1); 223 | public final static native int SCIPsetMessagehdlr(long jarg1, long jarg2); 224 | public final static native long SCIPgetMessagehdlr(long jarg1); 225 | public final static native void SCIPsetMessagehdlrLogfile(long jarg1, String jarg2); 226 | public final static native int SCIPgetVerbLevel(long jarg1); 227 | public final static native long createSCIP(); 228 | public final static native void freeSCIP(long jarg1); 229 | public final static native long createVar(long jarg1, String jarg2, double jarg3, double jarg4, double jarg5, int jarg6); 230 | public final static native void releaseVar(long jarg1, long jarg2); 231 | public final static native long createExprAbs(long jarg1, long jarg2); 232 | public final static native long createExprEntropy(long jarg1, long jarg2); 233 | public final static native long createExprExp(long jarg1, long jarg2); 234 | public final static native long createExprLog(long jarg1, long jarg2); 235 | public final static native long createExprPow(long jarg1, long jarg2, double jarg3); 236 | public final static native long createExprSignpower(long jarg1, long jarg2, double jarg3); 237 | public final static native long createExprProduct(long jarg1, int jarg2, long jarg3, double jarg4); 238 | public final static native long createExprSum(long jarg1, int jarg2, long jarg3, long jarg4, double jarg5); 239 | public final static native long createExprSin(long jarg1, long jarg2); 240 | public final static native long createExprCos(long jarg1, long jarg2); 241 | public final static native long createExprValue(long jarg1, double jarg2); 242 | public final static native long createExprVar(long jarg1, long jarg2); 243 | public final static native void releaseExpr(long jarg1, long jarg2); 244 | public final static native long createConsBasicLinear(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, double jarg6, double jarg7); 245 | public final static native long createConsBasicQuadratic(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, int jarg6, long jarg7, long jarg8, long jarg9, double jarg10, double jarg11); 246 | public final static native long createConsBasicNonlinear(long jarg1, String jarg2, long jarg3, double jarg4, double jarg5); 247 | public final static native long createConsBasicSuperindicator(long jarg1, String jarg2, long jarg3, long jarg4); 248 | public final static native long createConsBasicPseudoboolean(long jarg1, String jarg2, long jarg3, int jarg4, long jarg5, long jarg6, int jarg7, long jarg8, long jarg9, long jarg10, double jarg11, long jarg12, long jarg13, double jarg14, double jarg15); 249 | public final static native long createConsBasicSetpart(long jarg1, String jarg2, int jarg3, long jarg4); 250 | public final static native long createConsBasicSetpack(long jarg1, String jarg2, int jarg3, long jarg4); 251 | public final static native long createConsBasicSetcover(long jarg1, String jarg2, int jarg3, long jarg4); 252 | public final static native long createConsBasicSOC(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6, double jarg7, long jarg8, double jarg9, double jarg10); 253 | public final static native long createConsBasicSignpower(long jarg1, String jarg2, long jarg3, long jarg4, double jarg5, double jarg6, double jarg7, double jarg8, double jarg9); 254 | public final static native long createConsBasicAnd(long jarg1, String jarg2, long jarg3, int jarg4, long jarg5); 255 | public final static native long createConsBasicOr(long jarg1, String jarg2, long jarg3, int jarg4, long jarg5); 256 | public final static native long createConsBasicBounddisjunction(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6); 257 | public final static native long createConsBasicBounddisjunctionRedundant(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6); 258 | public final static native long createConsBasicCardinality(long jarg1, String jarg2, int jarg3, long jarg4, int jarg5, long jarg6, long jarg7); 259 | public final static native long createConsBasicConjunction(long jarg1, String jarg2, int jarg3, long jarg4); 260 | public final static native long createConsBasicDisjunction(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5); 261 | public final static native long createConsBasicCumulative(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6, int jarg7); 262 | public final static native long createConsBasicIndicator(long jarg1, String jarg2, long jarg3, int jarg4, long jarg5, long jarg6, double jarg7); 263 | public final static native long createConsBasicIndicatorLinCons(long jarg1, String jarg2, long jarg3, long jarg4, long jarg5); 264 | public final static native long createConsBasicKnapsack(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6); 265 | public final static native long createConsBasicLinking(long jarg1, String jarg2, long jarg3, long jarg4, long jarg5, int jarg6); 266 | public final static native long createConsBasicLogicor(long jarg1, String jarg2, int jarg3, long jarg4); 267 | public final static native long createConsBasicOrbisack(long jarg1, String jarg2, long jarg3, long jarg4, int jarg5, long jarg6, long jarg7, long jarg8); 268 | public final static native long createConsBasicOrbitope(long jarg1, String jarg2, long jarg3, int jarg4, int jarg5, int jarg6, long jarg7, long jarg8, long jarg9, long jarg10); 269 | public final static native long createConsBasicSOS1(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5); 270 | public final static native long createConsBasicSOS2(long jarg1, String jarg2, int jarg3, long jarg4, long jarg5); 271 | public final static native long createConsBasicSymresack(long jarg1, String jarg2, long jarg3, long jarg4, int jarg5, long jarg6); 272 | public final static native long createConsBasicVarbound(long jarg1, String jarg2, long jarg3, long jarg4, double jarg5, double jarg6, double jarg7); 273 | public final static native long createConsBasicXor(long jarg1, String jarg2, long jarg3, int jarg4, long jarg5); 274 | public final static native void releaseCons(long jarg1, long jarg2); 275 | public final static native long createObjMessagehdlr(long jarg1, ObjMessagehdlr jarg1_, long jarg2); 276 | 277 | public static void SwigDirector_ObjMessagehdlr_scip_error(ObjMessagehdlr jself, long messagehdlr, long file, String msg) { 278 | jself.scip_error((messagehdlr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(messagehdlr, false), (file == 0) ? null : new SWIGTYPE_p_FILE(file, false), msg); 279 | } 280 | public static void SwigDirector_ObjMessagehdlr_scip_warning(ObjMessagehdlr jself, long messagehdlr, long file, String msg) { 281 | jself.scip_warning((messagehdlr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(messagehdlr, false), (file == 0) ? null : new SWIGTYPE_p_FILE(file, false), msg); 282 | } 283 | public static void SwigDirector_ObjMessagehdlr_scip_dialog(ObjMessagehdlr jself, long messagehdlr, long file, String msg) { 284 | jself.scip_dialog((messagehdlr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(messagehdlr, false), (file == 0) ? null : new SWIGTYPE_p_FILE(file, false), msg); 285 | } 286 | public static void SwigDirector_ObjMessagehdlr_scip_info(ObjMessagehdlr jself, long messagehdlr, long file, String msg) { 287 | jself.scip_info((messagehdlr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(messagehdlr, false), (file == 0) ? null : new SWIGTYPE_p_FILE(file, false), msg); 288 | } 289 | public static int SwigDirector_ObjMessagehdlr_scip_free(ObjMessagehdlr jself, long messagehdlr) { 290 | return (jself.scip_free((messagehdlr == 0) ? null : new SWIGTYPE_p_SCIP_Messagehdlr(messagehdlr, false))).swigValue(); 291 | } 292 | 293 | private final static native void swig_module_init(); 294 | static { 295 | swig_module_init(); 296 | } 297 | } 298 | -------------------------------------------------------------------------------- /java/jscip/SCIP_BoundType.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_BoundType { 12 | public final static SCIP_BoundType SCIP_BOUNDTYPE_LOWER = new SCIP_BoundType("SCIP_BOUNDTYPE_LOWER", SCIPJNIJNI.SCIP_BOUNDTYPE_LOWER_get()); 13 | public final static SCIP_BoundType SCIP_BOUNDTYPE_UPPER = new SCIP_BoundType("SCIP_BOUNDTYPE_UPPER", SCIPJNIJNI.SCIP_BOUNDTYPE_UPPER_get()); 14 | 15 | public final int swigValue() { 16 | return swigValue; 17 | } 18 | 19 | public String toString() { 20 | return swigName; 21 | } 22 | 23 | public static SCIP_BoundType swigToEnum(int swigValue) { 24 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 25 | return swigValues[swigValue]; 26 | for (int i = 0; i < swigValues.length; i++) 27 | if (swigValues[i].swigValue == swigValue) 28 | return swigValues[i]; 29 | throw new IllegalArgumentException("No enum " + SCIP_BoundType.class + " with value " + swigValue); 30 | } 31 | 32 | private SCIP_BoundType(String swigName) { 33 | this.swigName = swigName; 34 | this.swigValue = swigNext++; 35 | } 36 | 37 | private SCIP_BoundType(String swigName, int swigValue) { 38 | this.swigName = swigName; 39 | this.swigValue = swigValue; 40 | swigNext = swigValue+1; 41 | } 42 | 43 | private SCIP_BoundType(String swigName, SCIP_BoundType swigEnum) { 44 | this.swigName = swigName; 45 | this.swigValue = swigEnum.swigValue; 46 | swigNext = this.swigValue+1; 47 | } 48 | 49 | private static SCIP_BoundType[] swigValues = { SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER }; 50 | private static int swigNext = 0; 51 | private final int swigValue; 52 | private final String swigName; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /java/jscip/SCIP_Objsense.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_Objsense { 12 | public final static SCIP_Objsense SCIP_OBJSENSE_MAXIMIZE = new SCIP_Objsense("SCIP_OBJSENSE_MAXIMIZE", SCIPJNIJNI.SCIP_OBJSENSE_MAXIMIZE_get()); 13 | public final static SCIP_Objsense SCIP_OBJSENSE_MINIMIZE = new SCIP_Objsense("SCIP_OBJSENSE_MINIMIZE", SCIPJNIJNI.SCIP_OBJSENSE_MINIMIZE_get()); 14 | 15 | public final int swigValue() { 16 | return swigValue; 17 | } 18 | 19 | public String toString() { 20 | return swigName; 21 | } 22 | 23 | public static SCIP_Objsense swigToEnum(int swigValue) { 24 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 25 | return swigValues[swigValue]; 26 | for (int i = 0; i < swigValues.length; i++) 27 | if (swigValues[i].swigValue == swigValue) 28 | return swigValues[i]; 29 | throw new IllegalArgumentException("No enum " + SCIP_Objsense.class + " with value " + swigValue); 30 | } 31 | 32 | private SCIP_Objsense(String swigName) { 33 | this.swigName = swigName; 34 | this.swigValue = swigNext++; 35 | } 36 | 37 | private SCIP_Objsense(String swigName, int swigValue) { 38 | this.swigName = swigName; 39 | this.swigValue = swigValue; 40 | swigNext = swigValue+1; 41 | } 42 | 43 | private SCIP_Objsense(String swigName, SCIP_Objsense swigEnum) { 44 | this.swigName = swigName; 45 | this.swigValue = swigEnum.swigValue; 46 | swigNext = this.swigValue+1; 47 | } 48 | 49 | private static SCIP_Objsense[] swigValues = { SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE }; 50 | private static int swigNext = 0; 51 | private final int swigValue; 52 | private final String swigName; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /java/jscip/SCIP_OrbitopeType.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_OrbitopeType { 12 | public final static SCIP_OrbitopeType SCIP_ORBITOPETYPE_FULL = new SCIP_OrbitopeType("SCIP_ORBITOPETYPE_FULL", SCIPJNIJNI.SCIP_ORBITOPETYPE_FULL_get()); 13 | public final static SCIP_OrbitopeType SCIP_ORBITOPETYPE_PARTITIONING = new SCIP_OrbitopeType("SCIP_ORBITOPETYPE_PARTITIONING", SCIPJNIJNI.SCIP_ORBITOPETYPE_PARTITIONING_get()); 14 | public final static SCIP_OrbitopeType SCIP_ORBITOPETYPE_PACKING = new SCIP_OrbitopeType("SCIP_ORBITOPETYPE_PACKING", SCIPJNIJNI.SCIP_ORBITOPETYPE_PACKING_get()); 15 | 16 | public final int swigValue() { 17 | return swigValue; 18 | } 19 | 20 | public String toString() { 21 | return swigName; 22 | } 23 | 24 | public static SCIP_OrbitopeType swigToEnum(int swigValue) { 25 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 26 | return swigValues[swigValue]; 27 | for (int i = 0; i < swigValues.length; i++) 28 | if (swigValues[i].swigValue == swigValue) 29 | return swigValues[i]; 30 | throw new IllegalArgumentException("No enum " + SCIP_OrbitopeType.class + " with value " + swigValue); 31 | } 32 | 33 | private SCIP_OrbitopeType(String swigName) { 34 | this.swigName = swigName; 35 | this.swigValue = swigNext++; 36 | } 37 | 38 | private SCIP_OrbitopeType(String swigName, int swigValue) { 39 | this.swigName = swigName; 40 | this.swigValue = swigValue; 41 | swigNext = swigValue+1; 42 | } 43 | 44 | private SCIP_OrbitopeType(String swigName, SCIP_OrbitopeType swigEnum) { 45 | this.swigName = swigName; 46 | this.swigValue = swigEnum.swigValue; 47 | swigNext = this.swigValue+1; 48 | } 49 | 50 | private static SCIP_OrbitopeType[] swigValues = { SCIP_ORBITOPETYPE_FULL, SCIP_ORBITOPETYPE_PARTITIONING, SCIP_ORBITOPETYPE_PACKING }; 51 | private static int swigNext = 0; 52 | private final int swigValue; 53 | private final String swigName; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /java/jscip/SCIP_ParamEmphasis.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_ParamEmphasis { 12 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_DEFAULT = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_DEFAULT", SCIPJNIJNI.SCIP_PARAMEMPHASIS_DEFAULT_get()); 13 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_CPSOLVER = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_CPSOLVER", SCIPJNIJNI.SCIP_PARAMEMPHASIS_CPSOLVER_get()); 14 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_EASYCIP = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_EASYCIP", SCIPJNIJNI.SCIP_PARAMEMPHASIS_EASYCIP_get()); 15 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_FEASIBILITY = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_FEASIBILITY", SCIPJNIJNI.SCIP_PARAMEMPHASIS_FEASIBILITY_get()); 16 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_HARDLP = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_HARDLP", SCIPJNIJNI.SCIP_PARAMEMPHASIS_HARDLP_get()); 17 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_OPTIMALITY = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_OPTIMALITY", SCIPJNIJNI.SCIP_PARAMEMPHASIS_OPTIMALITY_get()); 18 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_COUNTER = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_COUNTER", SCIPJNIJNI.SCIP_PARAMEMPHASIS_COUNTER_get()); 19 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_PHASEFEAS = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_PHASEFEAS", SCIPJNIJNI.SCIP_PARAMEMPHASIS_PHASEFEAS_get()); 20 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_PHASEIMPROVE = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_PHASEIMPROVE", SCIPJNIJNI.SCIP_PARAMEMPHASIS_PHASEIMPROVE_get()); 21 | public final static SCIP_ParamEmphasis SCIP_PARAMEMPHASIS_PHASEPROOF = new SCIP_ParamEmphasis("SCIP_PARAMEMPHASIS_PHASEPROOF", SCIPJNIJNI.SCIP_PARAMEMPHASIS_PHASEPROOF_get()); 22 | 23 | public final int swigValue() { 24 | return swigValue; 25 | } 26 | 27 | public String toString() { 28 | return swigName; 29 | } 30 | 31 | public static SCIP_ParamEmphasis swigToEnum(int swigValue) { 32 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 33 | return swigValues[swigValue]; 34 | for (int i = 0; i < swigValues.length; i++) 35 | if (swigValues[i].swigValue == swigValue) 36 | return swigValues[i]; 37 | throw new IllegalArgumentException("No enum " + SCIP_ParamEmphasis.class + " with value " + swigValue); 38 | } 39 | 40 | private SCIP_ParamEmphasis(String swigName) { 41 | this.swigName = swigName; 42 | this.swigValue = swigNext++; 43 | } 44 | 45 | private SCIP_ParamEmphasis(String swigName, int swigValue) { 46 | this.swigName = swigName; 47 | this.swigValue = swigValue; 48 | swigNext = swigValue+1; 49 | } 50 | 51 | private SCIP_ParamEmphasis(String swigName, SCIP_ParamEmphasis swigEnum) { 52 | this.swigName = swigName; 53 | this.swigValue = swigEnum.swigValue; 54 | swigNext = this.swigValue+1; 55 | } 56 | 57 | private static SCIP_ParamEmphasis[] swigValues = { SCIP_PARAMEMPHASIS_DEFAULT, SCIP_PARAMEMPHASIS_CPSOLVER, SCIP_PARAMEMPHASIS_EASYCIP, SCIP_PARAMEMPHASIS_FEASIBILITY, SCIP_PARAMEMPHASIS_HARDLP, SCIP_PARAMEMPHASIS_OPTIMALITY, SCIP_PARAMEMPHASIS_COUNTER, SCIP_PARAMEMPHASIS_PHASEFEAS, SCIP_PARAMEMPHASIS_PHASEIMPROVE, SCIP_PARAMEMPHASIS_PHASEPROOF }; 58 | private static int swigNext = 0; 59 | private final int swigValue; 60 | private final String swigName; 61 | } 62 | 63 | -------------------------------------------------------------------------------- /java/jscip/SCIP_Retcode.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_Retcode { 12 | public final static SCIP_Retcode SCIP_OKAY = new SCIP_Retcode("SCIP_OKAY", SCIPJNIJNI.SCIP_OKAY_get()); 13 | public final static SCIP_Retcode SCIP_ERROR = new SCIP_Retcode("SCIP_ERROR", SCIPJNIJNI.SCIP_ERROR_get()); 14 | public final static SCIP_Retcode SCIP_NOMEMORY = new SCIP_Retcode("SCIP_NOMEMORY", SCIPJNIJNI.SCIP_NOMEMORY_get()); 15 | public final static SCIP_Retcode SCIP_READERROR = new SCIP_Retcode("SCIP_READERROR", SCIPJNIJNI.SCIP_READERROR_get()); 16 | public final static SCIP_Retcode SCIP_WRITEERROR = new SCIP_Retcode("SCIP_WRITEERROR", SCIPJNIJNI.SCIP_WRITEERROR_get()); 17 | public final static SCIP_Retcode SCIP_NOFILE = new SCIP_Retcode("SCIP_NOFILE", SCIPJNIJNI.SCIP_NOFILE_get()); 18 | public final static SCIP_Retcode SCIP_FILECREATEERROR = new SCIP_Retcode("SCIP_FILECREATEERROR", SCIPJNIJNI.SCIP_FILECREATEERROR_get()); 19 | public final static SCIP_Retcode SCIP_LPERROR = new SCIP_Retcode("SCIP_LPERROR", SCIPJNIJNI.SCIP_LPERROR_get()); 20 | public final static SCIP_Retcode SCIP_NOPROBLEM = new SCIP_Retcode("SCIP_NOPROBLEM", SCIPJNIJNI.SCIP_NOPROBLEM_get()); 21 | public final static SCIP_Retcode SCIP_INVALIDCALL = new SCIP_Retcode("SCIP_INVALIDCALL", SCIPJNIJNI.SCIP_INVALIDCALL_get()); 22 | public final static SCIP_Retcode SCIP_INVALIDDATA = new SCIP_Retcode("SCIP_INVALIDDATA", SCIPJNIJNI.SCIP_INVALIDDATA_get()); 23 | public final static SCIP_Retcode SCIP_INVALIDRESULT = new SCIP_Retcode("SCIP_INVALIDRESULT", SCIPJNIJNI.SCIP_INVALIDRESULT_get()); 24 | public final static SCIP_Retcode SCIP_PLUGINNOTFOUND = new SCIP_Retcode("SCIP_PLUGINNOTFOUND", SCIPJNIJNI.SCIP_PLUGINNOTFOUND_get()); 25 | public final static SCIP_Retcode SCIP_PARAMETERUNKNOWN = new SCIP_Retcode("SCIP_PARAMETERUNKNOWN", SCIPJNIJNI.SCIP_PARAMETERUNKNOWN_get()); 26 | public final static SCIP_Retcode SCIP_PARAMETERWRONGTYPE = new SCIP_Retcode("SCIP_PARAMETERWRONGTYPE", SCIPJNIJNI.SCIP_PARAMETERWRONGTYPE_get()); 27 | public final static SCIP_Retcode SCIP_PARAMETERWRONGVAL = new SCIP_Retcode("SCIP_PARAMETERWRONGVAL", SCIPJNIJNI.SCIP_PARAMETERWRONGVAL_get()); 28 | public final static SCIP_Retcode SCIP_KEYALREADYEXISTING = new SCIP_Retcode("SCIP_KEYALREADYEXISTING", SCIPJNIJNI.SCIP_KEYALREADYEXISTING_get()); 29 | public final static SCIP_Retcode SCIP_MAXDEPTHLEVEL = new SCIP_Retcode("SCIP_MAXDEPTHLEVEL", SCIPJNIJNI.SCIP_MAXDEPTHLEVEL_get()); 30 | public final static SCIP_Retcode SCIP_BRANCHERROR = new SCIP_Retcode("SCIP_BRANCHERROR", SCIPJNIJNI.SCIP_BRANCHERROR_get()); 31 | 32 | public final int swigValue() { 33 | return swigValue; 34 | } 35 | 36 | public String toString() { 37 | return swigName; 38 | } 39 | 40 | public static SCIP_Retcode swigToEnum(int swigValue) { 41 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 42 | return swigValues[swigValue]; 43 | for (int i = 0; i < swigValues.length; i++) 44 | if (swigValues[i].swigValue == swigValue) 45 | return swigValues[i]; 46 | throw new IllegalArgumentException("No enum " + SCIP_Retcode.class + " with value " + swigValue); 47 | } 48 | 49 | private SCIP_Retcode(String swigName) { 50 | this.swigName = swigName; 51 | this.swigValue = swigNext++; 52 | } 53 | 54 | private SCIP_Retcode(String swigName, int swigValue) { 55 | this.swigName = swigName; 56 | this.swigValue = swigValue; 57 | swigNext = swigValue+1; 58 | } 59 | 60 | private SCIP_Retcode(String swigName, SCIP_Retcode swigEnum) { 61 | this.swigName = swigName; 62 | this.swigValue = swigEnum.swigValue; 63 | swigNext = this.swigValue+1; 64 | } 65 | 66 | private static SCIP_Retcode[] swigValues = { SCIP_OKAY, SCIP_ERROR, SCIP_NOMEMORY, SCIP_READERROR, SCIP_WRITEERROR, SCIP_NOFILE, SCIP_FILECREATEERROR, SCIP_LPERROR, SCIP_NOPROBLEM, SCIP_INVALIDCALL, SCIP_INVALIDDATA, SCIP_INVALIDRESULT, SCIP_PLUGINNOTFOUND, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, SCIP_PARAMETERWRONGVAL, SCIP_KEYALREADYEXISTING, SCIP_MAXDEPTHLEVEL, SCIP_BRANCHERROR }; 67 | private static int swigNext = 0; 68 | private final int swigValue; 69 | private final String swigName; 70 | } 71 | 72 | -------------------------------------------------------------------------------- /java/jscip/SCIP_Stage.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_Stage { 12 | public final static SCIP_Stage SCIP_STAGE_INIT = new SCIP_Stage("SCIP_STAGE_INIT", SCIPJNIJNI.SCIP_STAGE_INIT_get()); 13 | public final static SCIP_Stage SCIP_STAGE_PROBLEM = new SCIP_Stage("SCIP_STAGE_PROBLEM", SCIPJNIJNI.SCIP_STAGE_PROBLEM_get()); 14 | public final static SCIP_Stage SCIP_STAGE_TRANSFORMING = new SCIP_Stage("SCIP_STAGE_TRANSFORMING", SCIPJNIJNI.SCIP_STAGE_TRANSFORMING_get()); 15 | public final static SCIP_Stage SCIP_STAGE_TRANSFORMED = new SCIP_Stage("SCIP_STAGE_TRANSFORMED", SCIPJNIJNI.SCIP_STAGE_TRANSFORMED_get()); 16 | public final static SCIP_Stage SCIP_STAGE_INITPRESOLVE = new SCIP_Stage("SCIP_STAGE_INITPRESOLVE", SCIPJNIJNI.SCIP_STAGE_INITPRESOLVE_get()); 17 | public final static SCIP_Stage SCIP_STAGE_PRESOLVING = new SCIP_Stage("SCIP_STAGE_PRESOLVING", SCIPJNIJNI.SCIP_STAGE_PRESOLVING_get()); 18 | public final static SCIP_Stage SCIP_STAGE_EXITPRESOLVE = new SCIP_Stage("SCIP_STAGE_EXITPRESOLVE", SCIPJNIJNI.SCIP_STAGE_EXITPRESOLVE_get()); 19 | public final static SCIP_Stage SCIP_STAGE_PRESOLVED = new SCIP_Stage("SCIP_STAGE_PRESOLVED", SCIPJNIJNI.SCIP_STAGE_PRESOLVED_get()); 20 | public final static SCIP_Stage SCIP_STAGE_INITSOLVE = new SCIP_Stage("SCIP_STAGE_INITSOLVE", SCIPJNIJNI.SCIP_STAGE_INITSOLVE_get()); 21 | public final static SCIP_Stage SCIP_STAGE_SOLVING = new SCIP_Stage("SCIP_STAGE_SOLVING", SCIPJNIJNI.SCIP_STAGE_SOLVING_get()); 22 | public final static SCIP_Stage SCIP_STAGE_SOLVED = new SCIP_Stage("SCIP_STAGE_SOLVED", SCIPJNIJNI.SCIP_STAGE_SOLVED_get()); 23 | public final static SCIP_Stage SCIP_STAGE_EXITSOLVE = new SCIP_Stage("SCIP_STAGE_EXITSOLVE", SCIPJNIJNI.SCIP_STAGE_EXITSOLVE_get()); 24 | public final static SCIP_Stage SCIP_STAGE_FREETRANS = new SCIP_Stage("SCIP_STAGE_FREETRANS", SCIPJNIJNI.SCIP_STAGE_FREETRANS_get()); 25 | public final static SCIP_Stage SCIP_STAGE_FREE = new SCIP_Stage("SCIP_STAGE_FREE", SCIPJNIJNI.SCIP_STAGE_FREE_get()); 26 | 27 | public final int swigValue() { 28 | return swigValue; 29 | } 30 | 31 | public String toString() { 32 | return swigName; 33 | } 34 | 35 | public static SCIP_Stage swigToEnum(int swigValue) { 36 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 37 | return swigValues[swigValue]; 38 | for (int i = 0; i < swigValues.length; i++) 39 | if (swigValues[i].swigValue == swigValue) 40 | return swigValues[i]; 41 | throw new IllegalArgumentException("No enum " + SCIP_Stage.class + " with value " + swigValue); 42 | } 43 | 44 | private SCIP_Stage(String swigName) { 45 | this.swigName = swigName; 46 | this.swigValue = swigNext++; 47 | } 48 | 49 | private SCIP_Stage(String swigName, int swigValue) { 50 | this.swigName = swigName; 51 | this.swigValue = swigValue; 52 | swigNext = swigValue+1; 53 | } 54 | 55 | private SCIP_Stage(String swigName, SCIP_Stage swigEnum) { 56 | this.swigName = swigName; 57 | this.swigValue = swigEnum.swigValue; 58 | swigNext = this.swigValue+1; 59 | } 60 | 61 | private static SCIP_Stage[] swigValues = { SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, SCIP_STAGE_TRANSFORMING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_PRESOLVING, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_INITSOLVE, SCIP_STAGE_SOLVING, SCIP_STAGE_SOLVED, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_FREE }; 62 | private static int swigNext = 0; 63 | private final int swigValue; 64 | private final String swigName; 65 | } 66 | 67 | -------------------------------------------------------------------------------- /java/jscip/SCIP_Status.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_Status { 12 | public final static SCIP_Status SCIP_STATUS_UNKNOWN = new SCIP_Status("SCIP_STATUS_UNKNOWN", SCIPJNIJNI.SCIP_STATUS_UNKNOWN_get()); 13 | public final static SCIP_Status SCIP_STATUS_USERINTERRUPT = new SCIP_Status("SCIP_STATUS_USERINTERRUPT", SCIPJNIJNI.SCIP_STATUS_USERINTERRUPT_get()); 14 | public final static SCIP_Status SCIP_STATUS_NODELIMIT = new SCIP_Status("SCIP_STATUS_NODELIMIT", SCIPJNIJNI.SCIP_STATUS_NODELIMIT_get()); 15 | public final static SCIP_Status SCIP_STATUS_TOTALNODELIMIT = new SCIP_Status("SCIP_STATUS_TOTALNODELIMIT", SCIPJNIJNI.SCIP_STATUS_TOTALNODELIMIT_get()); 16 | public final static SCIP_Status SCIP_STATUS_STALLNODELIMIT = new SCIP_Status("SCIP_STATUS_STALLNODELIMIT", SCIPJNIJNI.SCIP_STATUS_STALLNODELIMIT_get()); 17 | public final static SCIP_Status SCIP_STATUS_TIMELIMIT = new SCIP_Status("SCIP_STATUS_TIMELIMIT", SCIPJNIJNI.SCIP_STATUS_TIMELIMIT_get()); 18 | public final static SCIP_Status SCIP_STATUS_MEMLIMIT = new SCIP_Status("SCIP_STATUS_MEMLIMIT", SCIPJNIJNI.SCIP_STATUS_MEMLIMIT_get()); 19 | public final static SCIP_Status SCIP_STATUS_GAPLIMIT = new SCIP_Status("SCIP_STATUS_GAPLIMIT", SCIPJNIJNI.SCIP_STATUS_GAPLIMIT_get()); 20 | public final static SCIP_Status SCIP_STATUS_SOLLIMIT = new SCIP_Status("SCIP_STATUS_SOLLIMIT", SCIPJNIJNI.SCIP_STATUS_SOLLIMIT_get()); 21 | public final static SCIP_Status SCIP_STATUS_BESTSOLLIMIT = new SCIP_Status("SCIP_STATUS_BESTSOLLIMIT", SCIPJNIJNI.SCIP_STATUS_BESTSOLLIMIT_get()); 22 | public final static SCIP_Status SCIP_STATUS_RESTARTLIMIT = new SCIP_Status("SCIP_STATUS_RESTARTLIMIT", SCIPJNIJNI.SCIP_STATUS_RESTARTLIMIT_get()); 23 | public final static SCIP_Status SCIP_STATUS_OPTIMAL = new SCIP_Status("SCIP_STATUS_OPTIMAL", SCIPJNIJNI.SCIP_STATUS_OPTIMAL_get()); 24 | public final static SCIP_Status SCIP_STATUS_INFEASIBLE = new SCIP_Status("SCIP_STATUS_INFEASIBLE", SCIPJNIJNI.SCIP_STATUS_INFEASIBLE_get()); 25 | public final static SCIP_Status SCIP_STATUS_UNBOUNDED = new SCIP_Status("SCIP_STATUS_UNBOUNDED", SCIPJNIJNI.SCIP_STATUS_UNBOUNDED_get()); 26 | public final static SCIP_Status SCIP_STATUS_INFORUNBD = new SCIP_Status("SCIP_STATUS_INFORUNBD", SCIPJNIJNI.SCIP_STATUS_INFORUNBD_get()); 27 | public final static SCIP_Status SCIP_STATUS_TERMINATE = new SCIP_Status("SCIP_STATUS_TERMINATE", SCIPJNIJNI.SCIP_STATUS_TERMINATE_get()); 28 | 29 | public final int swigValue() { 30 | return swigValue; 31 | } 32 | 33 | public String toString() { 34 | return swigName; 35 | } 36 | 37 | public static SCIP_Status swigToEnum(int swigValue) { 38 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 39 | return swigValues[swigValue]; 40 | for (int i = 0; i < swigValues.length; i++) 41 | if (swigValues[i].swigValue == swigValue) 42 | return swigValues[i]; 43 | throw new IllegalArgumentException("No enum " + SCIP_Status.class + " with value " + swigValue); 44 | } 45 | 46 | private SCIP_Status(String swigName) { 47 | this.swigName = swigName; 48 | this.swigValue = swigNext++; 49 | } 50 | 51 | private SCIP_Status(String swigName, int swigValue) { 52 | this.swigName = swigName; 53 | this.swigValue = swigValue; 54 | swigNext = swigValue+1; 55 | } 56 | 57 | private SCIP_Status(String swigName, SCIP_Status swigEnum) { 58 | this.swigName = swigName; 59 | this.swigValue = swigEnum.swigValue; 60 | swigNext = this.swigValue+1; 61 | } 62 | 63 | private static SCIP_Status[] swigValues = { SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_INFORUNBD, SCIP_STATUS_TERMINATE }; 64 | private static int swigNext = 0; 65 | private final int swigValue; 66 | private final String swigName; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /java/jscip/SCIP_Vartype.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_Vartype { 12 | public final static SCIP_Vartype SCIP_VARTYPE_BINARY = new SCIP_Vartype("SCIP_VARTYPE_BINARY", SCIPJNIJNI.SCIP_VARTYPE_BINARY_get()); 13 | public final static SCIP_Vartype SCIP_VARTYPE_INTEGER = new SCIP_Vartype("SCIP_VARTYPE_INTEGER", SCIPJNIJNI.SCIP_VARTYPE_INTEGER_get()); 14 | public final static SCIP_Vartype SCIP_VARTYPE_IMPLINT = new SCIP_Vartype("SCIP_VARTYPE_IMPLINT", SCIPJNIJNI.SCIP_VARTYPE_IMPLINT_get()); 15 | public final static SCIP_Vartype SCIP_VARTYPE_CONTINUOUS = new SCIP_Vartype("SCIP_VARTYPE_CONTINUOUS", SCIPJNIJNI.SCIP_VARTYPE_CONTINUOUS_get()); 16 | 17 | public final int swigValue() { 18 | return swigValue; 19 | } 20 | 21 | public String toString() { 22 | return swigName; 23 | } 24 | 25 | public static SCIP_Vartype swigToEnum(int swigValue) { 26 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 27 | return swigValues[swigValue]; 28 | for (int i = 0; i < swigValues.length; i++) 29 | if (swigValues[i].swigValue == swigValue) 30 | return swigValues[i]; 31 | throw new IllegalArgumentException("No enum " + SCIP_Vartype.class + " with value " + swigValue); 32 | } 33 | 34 | private SCIP_Vartype(String swigName) { 35 | this.swigName = swigName; 36 | this.swigValue = swigNext++; 37 | } 38 | 39 | private SCIP_Vartype(String swigName, int swigValue) { 40 | this.swigName = swigName; 41 | this.swigValue = swigValue; 42 | swigNext = swigValue+1; 43 | } 44 | 45 | private SCIP_Vartype(String swigName, SCIP_Vartype swigEnum) { 46 | this.swigName = swigName; 47 | this.swigValue = swigEnum.swigValue; 48 | swigNext = this.swigValue+1; 49 | } 50 | 51 | private static SCIP_Vartype[] swigValues = { SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_CONTINUOUS }; 52 | private static int swigNext = 0; 53 | private final int swigValue; 54 | private final String swigName; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /java/jscip/SCIP_VerbLevel.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public final class SCIP_VerbLevel { 12 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_NONE = new SCIP_VerbLevel("SCIP_VERBLEVEL_NONE", SCIPJNIJNI.SCIP_VERBLEVEL_NONE_get()); 13 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_DIALOG = new SCIP_VerbLevel("SCIP_VERBLEVEL_DIALOG", SCIPJNIJNI.SCIP_VERBLEVEL_DIALOG_get()); 14 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_MINIMAL = new SCIP_VerbLevel("SCIP_VERBLEVEL_MINIMAL", SCIPJNIJNI.SCIP_VERBLEVEL_MINIMAL_get()); 15 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_NORMAL = new SCIP_VerbLevel("SCIP_VERBLEVEL_NORMAL", SCIPJNIJNI.SCIP_VERBLEVEL_NORMAL_get()); 16 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_HIGH = new SCIP_VerbLevel("SCIP_VERBLEVEL_HIGH", SCIPJNIJNI.SCIP_VERBLEVEL_HIGH_get()); 17 | public final static SCIP_VerbLevel SCIP_VERBLEVEL_FULL = new SCIP_VerbLevel("SCIP_VERBLEVEL_FULL", SCIPJNIJNI.SCIP_VERBLEVEL_FULL_get()); 18 | 19 | public final int swigValue() { 20 | return swigValue; 21 | } 22 | 23 | public String toString() { 24 | return swigName; 25 | } 26 | 27 | public static SCIP_VerbLevel swigToEnum(int swigValue) { 28 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 29 | return swigValues[swigValue]; 30 | for (int i = 0; i < swigValues.length; i++) 31 | if (swigValues[i].swigValue == swigValue) 32 | return swigValues[i]; 33 | throw new IllegalArgumentException("No enum " + SCIP_VerbLevel.class + " with value " + swigValue); 34 | } 35 | 36 | private SCIP_VerbLevel(String swigName) { 37 | this.swigName = swigName; 38 | this.swigValue = swigNext++; 39 | } 40 | 41 | private SCIP_VerbLevel(String swigName, int swigValue) { 42 | this.swigName = swigName; 43 | this.swigValue = swigValue; 44 | swigNext = swigValue+1; 45 | } 46 | 47 | private SCIP_VerbLevel(String swigName, SCIP_VerbLevel swigEnum) { 48 | this.swigName = swigName; 49 | this.swigValue = swigEnum.swigValue; 50 | swigNext = this.swigValue+1; 51 | } 52 | 53 | private static SCIP_VerbLevel[] swigValues = { SCIP_VERBLEVEL_NONE, SCIP_VERBLEVEL_DIALOG, SCIP_VERBLEVEL_MINIMAL, SCIP_VERBLEVEL_NORMAL, SCIP_VERBLEVEL_HIGH, SCIP_VERBLEVEL_FULL }; 54 | private static int swigNext = 0; 55 | private final int swigValue; 56 | private final String swigName; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_FILE.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_FILE { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_FILE(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_FILE() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_FILE obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_BoundType.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_BoundType { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_BoundType(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_BoundType() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_BoundType obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_CONS.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_CONS { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_CONS(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_CONS() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_CONS obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_EXPR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_EXPR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_EXPR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_EXPR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_EXPR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_HEUR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_HEUR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_HEUR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_HEUR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_HEUR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_Messagehdlr.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_Messagehdlr { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_Messagehdlr(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_Messagehdlr() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_Messagehdlr obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_SOL.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_SOL { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_SOL(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_SOL() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_SOL obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_SCIP_VAR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_SCIP_VAR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_SCIP_VAR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_SCIP_VAR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_SCIP_VAR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_char.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_char { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_char(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_char() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_char obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_double.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_double { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_double(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_double() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_double obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_int.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_int { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_int() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_int obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_long_long.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_long_long { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_long_long(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_long_long() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_long_long obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_SCIP.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_SCIP { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_SCIP(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_SCIP() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_SCIP obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_SCIP_CONS.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_SCIP_CONS { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_SCIP_CONS(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_SCIP_CONS() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_SCIP_CONS obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_SCIP_EXPR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_SCIP_EXPR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_SCIP_EXPR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_SCIP_EXPR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_SCIP_EXPR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_SCIP_SOL.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_SCIP_SOL { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_SCIP_SOL(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_SCIP_SOL() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_SCIP_SOL obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_SCIP_VAR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_SCIP_VAR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_SCIP_VAR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_SCIP_VAR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_SCIP_VAR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_char.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_char { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_char(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_char() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_char obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_p_p_SCIP_VAR.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_p_p_SCIP_VAR { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_p_p_SCIP_VAR(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_p_p_SCIP_VAR() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_p_p_SCIP_VAR obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/SWIGTYPE_p_unsigned_int.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package jscip; 10 | 11 | public class SWIGTYPE_p_unsigned_int { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_unsigned_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_unsigned_int() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_unsigned_int obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /java/jscip/Solution.java: -------------------------------------------------------------------------------- 1 | package jscip; 2 | 3 | /** Class representing a single solution (equivalent of SCIP_SOL).*/ 4 | public class Solution 5 | { 6 | private SWIGTYPE_p_SCIP_SOL _solptr; /** pointer address class created by SWIG */ 7 | 8 | /** default constructor */ 9 | public Solution(SWIGTYPE_p_SCIP_SOL solptr) 10 | { 11 | _solptr = solptr; 12 | } 13 | 14 | /** returns SWIG object type representing a SCIP_SOL pointer */ 15 | public SWIGTYPE_p_SCIP_SOL getPtr() 16 | { 17 | return _solptr; 18 | } 19 | 20 | // @todo this function should not be public 21 | public void setPtr(SWIGTYPE_p_SCIP_SOL solptr) 22 | { 23 | _solptr = solptr; 24 | } 25 | 26 | /** wraps SCIPsolGetDepth() */ 27 | public int getDepth() 28 | { 29 | return SCIPJNI.SCIPsolGetDepth(_solptr); 30 | } 31 | 32 | /** wraps SCIPsolGetIndex() */ 33 | public int getIndex() 34 | { 35 | return SCIPJNI.SCIPsolGetIndex(_solptr); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /java/jscip/Variable.java: -------------------------------------------------------------------------------- 1 | package jscip; 2 | 3 | /** Class representing a single variable (equivalent of SCIP_VAR).*/ 4 | public class Variable 5 | { 6 | private SWIGTYPE_p_SCIP_VAR _varptr; /** pointer address class created by SWIG */ 7 | 8 | /** default constructor */ 9 | public Variable(SWIGTYPE_p_SCIP_VAR varptr) 10 | { 11 | _varptr = varptr; 12 | } 13 | 14 | /** returns SWIG object type representing a SCIP_VAR pointer */ 15 | public SWIGTYPE_p_SCIP_VAR getPtr() 16 | { 17 | return _varptr; 18 | } 19 | 20 | // @todo this function should not be public 21 | public void setPtr(SWIGTYPE_p_SCIP_VAR varptr) 22 | { 23 | _varptr = varptr; 24 | } 25 | 26 | /** wraps SCIPvarGetName() */ 27 | public String getName() 28 | { 29 | assert(_varptr != null); 30 | return SCIPJNI.SCIPvarGetName(_varptr); 31 | } 32 | 33 | /** wraps SCIPvarGetType() */ 34 | public SCIP_Vartype getType() 35 | { 36 | assert(_varptr != null); 37 | return SCIPJNI.SCIPvarGetType(_varptr); 38 | } 39 | 40 | /** wraps SCIPvarGetLbLocal() */ 41 | public double getLbLocal() 42 | { 43 | assert(_varptr != null); 44 | return SCIPJNI.SCIPvarGetLbLocal(_varptr); 45 | } 46 | 47 | /** wraps SCIPvarGetUbLocal() */ 48 | public double getUbLocal() 49 | { 50 | assert(_varptr != null); 51 | return SCIPJNI.SCIPvarGetUbLocal(_varptr); 52 | } 53 | 54 | /** wraps SCIPvarGetLbGlobal() */ 55 | public double getLbGlobal() 56 | { 57 | assert(_varptr != null); 58 | return SCIPJNI.SCIPvarGetLbGlobal(_varptr); 59 | } 60 | 61 | /** wraps SCIPvarGetUbGlobal() */ 62 | public double getUbGlobal() 63 | { 64 | assert(_varptr != null); 65 | return SCIPJNI.SCIPvarGetUbGlobal(_varptr); 66 | } 67 | 68 | /** wraps SCIPvarGetObj() */ 69 | public double getObj() 70 | { 71 | assert(_varptr != null); 72 | return SCIPJNI.SCIPvarGetObj(_varptr); 73 | } 74 | 75 | /** wraps SCIPvarGetBranchPriority() */ 76 | public int getBranchPriority() 77 | { 78 | assert(_varptr != null); 79 | return SCIPJNI.SCIPvarGetBranchPriority(_varptr); 80 | } 81 | 82 | /** returns a String representation */ 83 | public String toString() 84 | { 85 | return getName() + " in [" + getLbLocal() + "," + getUbLocal() + "] obj = " + getObj() + " type = " + getType(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /make/make.detecthost: -------------------------------------------------------------------------------- 1 | #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 | #* * 3 | #* This file is part of the program and library * 4 | #* SCIP --- Solving Constraint Integer Programs * 5 | #* * 6 | #* Copyright (C) 2002-2016 Konrad-Zuse-Zentrum * 7 | #* fuer Informationstechnik Berlin * 8 | #* * 9 | #* SCIP is distributed under the terms of the ZIB Academic Licence. * 10 | #* * 11 | #* You should have received a copy of the ZIB Academic License * 12 | #* along with SCIP; see the file COPYING. If not email to scip@zib.de. * 13 | #* * 14 | #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 15 | 16 | #@file Makefile include to detect host system 17 | #@brief SCIP Makefile 18 | #@author Thorsten Koch 19 | #@author Tobias Achterberg 20 | 21 | 22 | ARCH := $(shell uname -m | \ 23 | sed \ 24 | -e 's/sun../sparc/' \ 25 | -e 's/i.86/x86/' \ 26 | -e 's/i86pc/x86/' \ 27 | -e 's/[0-9]86/x86/' \ 28 | -e 's/amd64/x86_64/' \ 29 | -e 's/IP../mips/' \ 30 | -e 's/9000..../hppa/' \ 31 | -e 's/Power\ Macintosh/ppc/' \ 32 | -e 's/00........../pwr4/'\ 33 | -e 's/arm.*/arm/' \ 34 | -e 's/aarch64/arm/') 35 | OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ 36 | sed \ 37 | -e 's/cygwin.*/cygwin/' \ 38 | -e 's/irix../irix/' \ 39 | -e 's/windows.*/windows/' \ 40 | -e 's/mingw.*/mingw/') 41 | HOSTNAME := $(shell uname -n | tr '[:upper:]' '[:lower:]') 42 | -------------------------------------------------------------------------------- /make/make.mingw.x86.msvc.dbg: -------------------------------------------------------------------------------- 1 | CC = cl -nologo 2 | CC_o = -Fo 3 | CXX = cl -nologo 4 | CXX_o = -Fo 5 | LINKCC = link 6 | LINKCC_L = -LIBPATH: 7 | LINKCC_l = 8 | LINKCC_o = -out: 9 | LINKCXX = link -nologo 10 | LINKCXX_L = -LIBPATH: 11 | LINKCXX_l = 12 | LINKCXX_o = -out: 13 | FLAGS += -DNO_SIGACTION -DNO_RAND_R -DNO_STRTOK_R -DNO_STRERROR_R -DROUNDING_MS -D_CRT_SECURE_NO_WARNINGS -wd4274 14 | OFLAGS += 15 | CFLAGS += -Zi 16 | CXXFLAGS += -Zi -EHsc -GR 17 | LINKRPATH = 18 | EXEEXTENSION = .exe 19 | AR = lib -nologo 20 | AR_o = -OUT: 21 | ARFLAGS = 22 | RANLIB = 23 | LN_s = cp -r 24 | LIBEXT = lib 25 | STATICLIBEXT = lib 26 | SHAREDLIBEXT = dll 27 | LINKLIBSUFFIX = .lib 28 | 29 | # NOTE: use this flag throughout the whole compilation process 30 | CFLAGS += -MDd 31 | CXXFLAGS += -MDd 32 | -------------------------------------------------------------------------------- /make/make.mingw.x86.msvc.opt: -------------------------------------------------------------------------------- 1 | CC = cl -nologo 2 | CC_o = -Fo 3 | CXX = cl -nologo 4 | CXX_o = -Fo 5 | LINKCC = link -nologo 6 | LINKCC_L = -LIBPATH: 7 | LINKCC_l = 8 | LINKCC_o = -out: 9 | LINKCXX = link -nologo 10 | LINKCXX_L = -LIBPATH: 11 | LINKCXX_l = 12 | LINKCXX_o = -out: 13 | FLAGS += -DNO_SIGACTION -DNO_RAND_R -DNO_STRTOK_R -DNDEBUG -DNO_STRERROR_R -DROUNDING_MS -D_CRT_SECURE_NO_WARNINGS -wd4274 14 | OFLAGS += 15 | CFLAGS += -Ox -Oi -fp:precise 16 | CXXFLAGS += -Ox -Oi -fp:precise -EHsc -GR 17 | LINKRPATH = 18 | READLINE_FLAGS = 19 | READLINE_LDFLAGS = 20 | EXEEXTENSION = .exe 21 | AR = lib -nologo 22 | AR_o = -OUT: 23 | ARFLAGS = 24 | RANLIB = 25 | LN_s = cp -r 26 | LIBEXT = lib 27 | STATICLIBEXT = lib 28 | SHAREDLIBEXT = dll 29 | LINKLIBSUFFIX = .lib 30 | 31 | # NOTE: use this flag throughout the whole compilation process 32 | CFLAGS += -MD 33 | CXXFLAGS += -MD 34 | -------------------------------------------------------------------------------- /make/make.mingw.x86_64.msvc.dbg: -------------------------------------------------------------------------------- 1 | CC = cl -nologo 2 | CC_o = -Fo 3 | CXX = cl -nologo 4 | CXX_o = -Fo 5 | LINKCC = link -nologo 6 | LINKCC_L = -LIBPATH: 7 | LINKCC_l = 8 | LINKCC_o = -out: 9 | LINKCXX = link -nologo 10 | LINKCXX_L = -LIBPATH: 11 | LINKCXX_l = 12 | LINKCXX_o = -out: 13 | FLAGS += -DNO_SIGACTION -DNO_RAND_R -DNO_STRTOK_R -DNDEBUG -DNO_STRERROR_R -DROUNDING_MS -D_CRT_SECURE_NO_WARNINGS -wd4274 -D_WIN64 14 | OFLAGS += 15 | CFLAGS += -Zi -Od -fp:precise 16 | CXXFLAGS += -Zi -Od -fp:precise -EHsc -GR 17 | LINKRPATH = 18 | EXEEXTENSION = .exe 19 | AR = lib -nologo 20 | AR_o = -OUT: 21 | ARFLAGS = 22 | RANLIB = 23 | LN_s = cp -r 24 | LIBEXT = lib 25 | STATICLIBEXT = lib 26 | SHAREDLIBEXT = dll 27 | LINKLIBSUFFIX = .lib 28 | 29 | # NOTE: use this flag throughout the whole compilation process 30 | CFLAGS += -MDd 31 | CXXFLAGS += -MDd 32 | -------------------------------------------------------------------------------- /make/make.mingw.x86_64.msvc.opt: -------------------------------------------------------------------------------- 1 | CC = cl -nologo 2 | CC_o = -Fo 3 | CXX = cl -nologo 4 | CXX_o = -Fo 5 | LINKCC = link -nologo 6 | LINKCC_L = -LIBPATH: 7 | LINKCC_l = 8 | LINKCC_o = -out: 9 | LINKCXX = link -nologo 10 | LINKCXX_L = -LIBPATH: 11 | LINKCXX_l = 12 | LINKCXX_o = -out: 13 | FLAGS += -DNO_SIGACTION -DNO_RAND_R -DNO_STRTOK_R -DNDEBUG -DNO_STRERROR_R -DROUNDING_MS -D_CRT_SECURE_NO_WARNINGS -wd4274 -D_WIN64 14 | OFLAGS += 15 | CFLAGS += -Ox -Oi -fp:precise 16 | CXXFLAGS += -Ox -Oi -fp:precise -EHsc -GR 17 | LINKRPATH = 18 | EXEEXTENSION = .exe 19 | AR = lib -nologo 20 | AR_o = -OUT: 21 | ARFLAGS = 22 | RANLIB = 23 | LN_s = cp -r 24 | LIBEXT = lib 25 | STATICLIBEXT = lib 26 | SHAREDLIBEXT = dll 27 | LINKLIBSUFFIX = .lib 28 | 29 | # NOTE: use this flag throughout the whole compilation process 30 | CFLAGS += -MD 31 | CXXFLAGS += -MD 32 | -------------------------------------------------------------------------------- /make/make.project: -------------------------------------------------------------------------------- 1 | #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 | #* * 3 | #* This file is part of the program and library * 4 | #* SCIP --- Solving Constraint Integer Programs * 5 | #* * 6 | #* Copyright (C) 2002-2016 Konrad-Zuse-Zentrum * 7 | #* fuer Informationstechnik Berlin * 8 | #* * 9 | #* SCIP is distributed under the terms of the ZIB Academic Licence. * 10 | #* * 11 | #* You should have received a copy of the ZIB Academic License * 12 | #* along with SCIP; see the file COPYING. If not email to scip@zib.de. * 13 | #* * 14 | #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 15 | 16 | #@file Makefile 17 | #@brief Makefile to include in SCIP projects 18 | #@author Thorsten Koch 19 | #@author Tobias Achterberg 20 | #@author Marc Pfetsch 21 | #@author Timo Berthold 22 | 23 | #----------------------------------------------------------------------------- 24 | # detect host architecture 25 | #----------------------------------------------------------------------------- 26 | include ./make/make.detecthost 27 | 28 | 29 | #----------------------------------------------------------------------------- 30 | # get real path to SCIP 31 | #----------------------------------------------------------------------------- 32 | ifeq ($(OSTYPE),mingw) 33 | SCIPREALPATH = $(SCIPDIR) 34 | else 35 | SCIPREALPATH = $(realpath $(SCIPDIR)) 36 | endif 37 | 38 | 39 | #----------------------------------------------------------------------------- 40 | # default settings 41 | #----------------------------------------------------------------------------- 42 | 43 | #check and testing parameters 44 | TIME = 3600 45 | NODES = 2100000000 46 | MEM = 6144 47 | THREADS = 1 48 | PERMUTE = 0 49 | DISPFREQ = 10000 50 | FEASTOL = default 51 | TEST = short 52 | SETTINGS = default 53 | CONTINUE = false 54 | LOCK = false 55 | VALGRIND = false 56 | CLIENTTMPDIR = /tmp 57 | REOPT = false 58 | OPTCOMMAND = optimize 59 | SETCUTOFF = 0 60 | VISUALIZE = false 61 | MAXJOBS = 1 62 | 63 | 64 | #compiling and linking parameters 65 | VERBOSE = false 66 | OPT = opt 67 | COMP = gnu 68 | LPS = spx2 69 | STATICLIBEXT = a 70 | SHAREDLIBEXT = so 71 | LIBEXT = $(STATICLIBEXT) 72 | LINKER = C 73 | SHARED = false 74 | NOBLKMEM = false 75 | NOBUFMEM = false 76 | NOBLKBUFMEM = false 77 | 78 | #will this be compiled for parascip, necessary for dbg-builds and cppad to make it threadsafe 79 | PARASCIP = false 80 | 81 | #third party compiling parameters 82 | OPENSOURCE = true 83 | READLINE = true 84 | ZLIB = true 85 | GMP = true 86 | ZIMPL = auto 87 | IPOPT = false 88 | EXPRINT = cppad 89 | LPSOPT = opt 90 | ZIMPLOPT = opt 91 | IPOPTOPT = opt 92 | LPSCHECK = false 93 | GAMS = false 94 | SPX_LEGACY = false 95 | 96 | #compiler and linker parameters 97 | CC = gcc 98 | CC_c = -c # the trailing space is important 99 | CC_o = -o # the trailing space is important 100 | CXX = g++ 101 | CXX_c = -c # the trailing space is important 102 | CXX_o = -o # the trailing space is important 103 | LINKCC = gcc 104 | LINKCC_L = -L 105 | LINKCC_l = -l 106 | LINKCC_o = -o # the trailing space is important 107 | LINKCXX = g++ 108 | LINKCXX_L = -L 109 | LINKCXX_l = -l 110 | LINKCXX_o = -o # the trailing space is important 111 | LINKLIBSUFFIX = 112 | LINKRPATH = -Wl,-rpath, 113 | DCC = gcc 114 | DCXX = g++ 115 | AR = ar 116 | AR_o = 117 | RANLIB = ranlib 118 | LIBBUILD = $(AR) 119 | LIBBUILD_o = $(AR_o) 120 | LIBBUILDFLAGS = $(ARFLAGS) 121 | 122 | #code check and doxygen 123 | LINT = flexelint 124 | DOXY = doxygen 125 | SPLINT = splint 126 | #SPLINTFLAGS = -UNDEBUG -UWITH_READLINE -UROUNDING_FE -UWITH_GMP -UWITH_ZLIB -preproc -formatcode +skip-sys-headers -weak +relaxtypes 127 | SPLINTFLAGS = -UNDEBUG -UWITH_READLINE -UROUNDING_FE -UWITH_GMP -UWITH_ZLIB -which-lib -warn-posix-headers +skip-sys-headers -preproc -formatcode -weak \ 128 | -redef +export-header +export-local +decl-undef +relaxtypes 129 | 130 | #third party testing parameters 131 | CPLEX = cplex 132 | CBC = cbc 133 | CBCPARALLEL = cbc-parallel 134 | MOSEK = mosek 135 | GUROBI = gurobi_cl 136 | XPRESS_BIN = xpress 137 | GLPK = glpsol 138 | SYMPHONY = symphony 139 | BLIS = blis 140 | 141 | #system parameters 142 | SHELL = bash 143 | READ = read -e 144 | LN_s = ln -s 145 | LN_sf = ln -sf 146 | 147 | #initial compiler and linker flags 148 | FLAGS = -I$(SRCDIR) -DWITH_SCIPDEF -I$(SCIPDIR)/src 149 | OFLAGS = 150 | CFLAGS = 151 | CXXFLAGS = 152 | 153 | ifeq ($(COMP),msvc) 154 | LDFLAGS = 155 | else 156 | LDFLAGS = $(LINKCC_l)m$(LINKLIBSUFFIX) 157 | endif 158 | 159 | ARFLAGS = cr 160 | DFLAGS = -MM 161 | 162 | GCCWARN = -pedantic -Wno-long-long -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings -Wshadow \ 163 | -Wno-unknown-pragmas -Wno-unused-parameter \ 164 | -Wredundant-decls -Wdisabled-optimization \ 165 | -Wsign-compare -Wstrict-prototypes \ 166 | -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement 167 | 168 | GXXWARN = -pedantic -Wno-long-long -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings -Wshadow \ 169 | -Wno-unknown-pragmas -Wno-unused-parameter \ 170 | -Wredundant-decls -Wdisabled-optimization \ 171 | -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \ 172 | -Woverloaded-virtual -Wsign-promo -Wsynth \ 173 | -Wcast-qual -Wno-unused-parameter -Wno-strict-overflow # -Wold-style-cast -Wshadow -Wundef 174 | 175 | 176 | BASE = $(OSTYPE).$(ARCH).$(COMP).$(OPT) 177 | OBJDIR = obj/O.$(BASE) 178 | BINOBJDIR = $(OBJDIR)/bin 179 | LIBOBJDIR = $(OBJDIR)/lib 180 | LIBOBJSUBDIRS = $(LIBOBJDIR)/scip \ 181 | $(LIBOBJDIR)/objscip \ 182 | $(LIBOBJDIR)/blockmemshell \ 183 | $(LIBOBJDIR)/tclique \ 184 | $(LIBOBJDIR)/lpi \ 185 | $(LIBOBJDIR)/nlpi \ 186 | $(LIBOBJDIR)/xml \ 187 | $(LIBOBJDIR)/dijkstra 188 | SRCDIR = src 189 | BINDIR = bin 190 | LIBDIR = lib 191 | INCLUDEDIR = include 192 | EXEEXTENSION = 193 | ALLSRC = 194 | 195 | 196 | #----------------------------------------------------------------------------- 197 | # include additional make files 198 | #----------------------------------------------------------------------------- 199 | -include ./make/make.$(BASE) 200 | -include ./make/local/make.$(HOSTNAME) 201 | -include ./make/local/make.$(HOSTNAME).$(COMP) 202 | -include ./make/local/make.$(HOSTNAME).$(COMP).$(OPT) 203 | -include ./make/local/make.local 204 | 205 | 206 | #----------------------------------------------------------------------------- 207 | # add user flags 208 | #----------------------------------------------------------------------------- 209 | FLAGS += $(USRFLAGS) 210 | OFLAGS += $(USROFLAGS) 211 | CFLAGS += $(USRCFLAGS) 212 | CXXFLAGS += $(USRCXXFLAGS) 213 | LDFLAGS += $(USRLDFLAGS) 214 | ARFLAGS += $(USRARFLAGS) 215 | DFLAGS += $(USRDFLAGS) 216 | 217 | 218 | #----------------------------------------------------------------------------- 219 | # Memory Management 220 | #----------------------------------------------------------------------------- 221 | 222 | ifeq ($(NOBLKBUFMEM),true) 223 | FLAGS += -DBMS_NOBLOCKMEM -DSCIP_NOBUFFERMEM 224 | else 225 | ifeq ($(NOBLKMEM),true) 226 | FLAGS += -DBMS_NOBLOCKMEM 227 | endif 228 | ifeq ($(NOBUFMEM),true) 229 | FLAGS += -DSCIP_NOBUFFERMEM 230 | endif 231 | endif 232 | 233 | #----------------------------------------------------------------------------- 234 | # PARASCIP 235 | #----------------------------------------------------------------------------- 236 | 237 | ifeq ($(PARASCIP),false) 238 | FLAGS += -DNPARASCIP 239 | else 240 | LDFLAGS += -lpthread 241 | endif 242 | 243 | 244 | #----------------------------------------------------------------------------- 245 | # LP Solver Interface 246 | #----------------------------------------------------------------------------- 247 | 248 | ifeq ($(LPS),spx) 249 | override LPS = spx2 250 | endif 251 | 252 | LPILIBNAME = lpi$(LPS) 253 | 254 | ifeq ($(LPS),cpx) 255 | LPSLDFLAGS += $(LINKCC_l)cplex.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) \ 256 | $(LINKCC_l)pthread$(LINKLIBSUFFIX) \ 257 | $(LINKCC_l)dl$(LINKLIBSUFFIX) 258 | endif 259 | 260 | ifeq ($(LPS),grb) 261 | LPSLDFLAGS += $(LINKCC_l)gurobi.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) 262 | endif 263 | 264 | ifeq ($(LPS),xprs) 265 | LPSLDFLAGS += $(LINKCC_l)xpress.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) $(LINKCC_l)dl$(LINKLIBSUFFIX) 266 | ifneq ($(LINKRPATH),) 267 | LDFLAGS += $(LINKRPATH)\$$ORIGIN/../$(LIBDIR)/xprsinc/../lib 268 | endif 269 | endif 270 | 271 | ifeq ($(LPS),msk) 272 | LPSLDFLAGS += $(LINKCC_l)mosek.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) \ 273 | $(LINKCXX_l)iomp5.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) 274 | endif 275 | 276 | ifeq ($(LPS),spx1) 277 | LPSLDFLAGS += $(LINKCXX_l)soplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)$(LINKLIBSUFFIX) 278 | 279 | ifeq ($(LPSCHECK),true) 280 | LPSLDFLAGS += $(LINKCC_l)cplex.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) 281 | endif 282 | endif 283 | 284 | ifeq ($(LPS),spx2) 285 | LPSLDFLAGS += $(LINKCXX_l)soplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)$(LINKLIBSUFFIX) 286 | 287 | ifeq ($(LPSCHECK),true) 288 | LPSLDFLAGS += $(LINKCC_l)cplex.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) 289 | endif 290 | endif 291 | 292 | ifeq ($(LPS),clp) 293 | CLPDIR = $(SCIPREALPATH)/$(LIBDIR)/clp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT) 294 | # for newer Clp versions all linker flags are in share/coin/doc/Clp/clp_addlibs.txt 295 | LPSLDFLAGS += $(shell test -e $(CLPDIR)/share/coin/doc/Clp/clp_addlibs.txt && cat $(CLPDIR)/share/coin/doc/Clp/clp_addlibs.txt) 296 | # if we could not find clp_addlibs file, try to guess linker flags 297 | ifeq ($(LPSLDFLAGS),) 298 | LPSLDFLAGS += $(LINKCXX_L)$(CLPDIR)/lib $(LINKCXX_l)Clp$(LINKLIBSUFFIX) \ 299 | $(LINKCXX_l)CoinUtils$(LINKLIBSUFFIX) \ 300 | $(LINKCXX_l)bz2$(LINKLIBSUFFIX) $(LINKCXX_l)lapack$(LINKLIBSUFFIX) 301 | endif 302 | # ensure that also shared libraries are found while running the binary 303 | ifneq ($(LINKRPATH),) 304 | CLPFULLPATH := $(realpath $(CLPDIR)) 305 | LPSLDFLAGS += $(LINKRPATH)$(CLPFULLPATH)/lib 306 | endif 307 | endif 308 | 309 | ifeq ($(LPS),qso) 310 | LPSLDFLAGS += $(LINKCC_l)qsopt.$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX) $(LINKCC_l)pthread$(LINKLIBSUFFIX) 311 | endif 312 | 313 | ifeq ($(LPS),none) 314 | LPSLDFLAGS += 315 | endif 316 | 317 | LPILIB = $(LPILIBNAME).$(BASE) 318 | LPILIBFILE = $(SCIPREALPATH)/lib/lib$(LPILIB).$(LIBEXT) 319 | LPILIBSHORTLINK = $(SCIPREALPATH)/lib/lib$(LPILIBNAME).$(LIBEXT) 320 | 321 | 322 | #----------------------------------------------------------------------------- 323 | # External Libraries 324 | #----------------------------------------------------------------------------- 325 | 326 | ifeq ($(ZLIB_LDFLAGS),) 327 | ZLIB = false 328 | endif 329 | 330 | ifeq ($(ZLIB),true) 331 | FLAGS += -DWITH_ZLIB $(ZLIB_FLAGS) 332 | LDFLAGS += $(ZLIB_LDFLAGS) 333 | endif 334 | 335 | ifeq ($(ZIMPL),auto) 336 | ZIMPL = $(GMP) 337 | ifeq ($(ZIMPL),false) 338 | ifeq ($(MAKELEVEL),0) 339 | $(warning ZIMPL was deactived because of missing GMP support.) 340 | endif 341 | endif 342 | endif 343 | 344 | ifeq ($(GMP_LDFLAGS),) 345 | GMP = false 346 | endif 347 | 348 | ifeq ($(ZIMPL),true) 349 | ifeq ($(GMP),false) 350 | $(error ZIMPL requires the GMP to be linked. Use either ZIMPL=false or GMP=true) 351 | endif 352 | ZIMPLLIB = $(LINKCC_l)zimpl.$(OSTYPE).$(ARCH).$(COMP).$(ZIMPLOPT)$(LINKLIBSUFFIX) 353 | LDFLAGS += $(ZIMPLLIB) $(ZIMPL_LDFLAGS) 354 | endif 355 | 356 | ifeq ($(GMP),true) 357 | FLAGS += -DWITH_GMP $(GMP_FLAGS) 358 | LDFLAGS += $(GMP_LDFLAGS) 359 | endif 360 | 361 | ifeq ($(READLINE_LDFLAGS),) 362 | READLINE = false 363 | endif 364 | 365 | ifeq ($(READLINE),true) 366 | FLAGS += -DWITH_READLINE $(READLINE_FLAGS) 367 | LDFLAGS += $(READLINE_LDFLAGS) 368 | endif 369 | 370 | ifeq ($(IPOPT),true) 371 | LINKER = CPP 372 | # we require here Ipopt >= 3.10.0 373 | # - all linker flags are in share/coin/doc/Ipopt/ipopt_addlibs_cpp.txt 374 | # - shared libraries are installed into the lib directory, so add this to the rpath 375 | FLAGS += -I$(LIBDIR)/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/include/coin $(IPOPT_FLAGS) 376 | IPOPTLIBS = $(shell cat $(SCIPDIR)/$(LIBDIR)/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/share/coin/doc/Ipopt/ipopt_addlibs_cpp.txt) 377 | LDFLAGS += $(IPOPTLIBS) 378 | ifneq ($(LINKRPATH),) 379 | LDFLAGS += $(LINKRPATH)\$$ORIGIN/../$(LIBDIR)/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/lib 380 | endif 381 | NLPILIBSHORTNAMEIPOPT = .ipopt 382 | endif 383 | 384 | ifeq ($(EXPRINT),cppad) 385 | LINKER = CPP 386 | NLPILIBSHORTNAMECPPAD = .cppad 387 | endif 388 | 389 | ifeq ($(GAMS),true) 390 | LDFLAGS += -ldl -lpthread 391 | endif 392 | 393 | #----------------------------------------------------------------------------- 394 | # SHARED Libaries 395 | #----------------------------------------------------------------------------- 396 | 397 | ifeq ($(SHARED),true) 398 | FLAGS += -fPIC 399 | LIBEXT = $(SHAREDLIBEXT) 400 | ifeq ($(LINKER),CPP) 401 | LIBBUILD = $(LINKCXX) 402 | LIBBUILD_L = $(LINKCXX_L) 403 | else 404 | LIBBUILD = $(LINKCC) 405 | LIBBUILD_L = $(LINKCC_L) 406 | endif 407 | 408 | ifeq ($(COMP),msvc) 409 | LIBBUILDFLAGS += -dll 410 | LIBBUILD_o = -out: 411 | else 412 | LIBBUILDFLAGS += -shared 413 | LIBBUILD_o = -o # the trailing space is important 414 | endif 415 | ARFLAGS = 416 | RANLIB = 417 | endif 418 | 419 | ifneq ($(LINKRPATH),) 420 | LDFLAGS += $(LINKRPATH)\$$ORIGIN/../$(LIBDIR) 421 | endif 422 | 423 | 424 | #----------------------------------------------------------------------------- 425 | # SCIP Library 426 | #----------------------------------------------------------------------------- 427 | 428 | SCIPLIBNAME = scip 429 | SCIPLIB = $(SCIPLIBNAME).$(BASE) 430 | SCIPLIBFILE = $(SCIPREALPATH)/lib/lib$(SCIPLIB).$(LIBEXT) 431 | SCIPLIBSHARTLINK= $(SCIPREALPATH)/lib/lib$(SCIPLIBNAME).$(LIBEXT) 432 | 433 | 434 | #----------------------------------------------------------------------------- 435 | # OBJSCIP Library 436 | #----------------------------------------------------------------------------- 437 | 438 | OBJSCIPLIBNAME = objscip 439 | OBJSCIPLIB = $(OBJSCIPLIBNAME).$(BASE) 440 | OBJSCIPLIBFILE = $(SCIPREALPATH)/lib/lib$(OBJSCIPLIB).$(LIBEXT) 441 | OBJSCIPLIBSHORTLINK= $(SCIPREALPATH)/lib/lib$(OBJSCIPLIBNAME).$(LIBEXT) 442 | 443 | 444 | #----------------------------------------------------------------------------- 445 | # NLP interfaces and expression interpreter library 446 | #----------------------------------------------------------------------------- 447 | 448 | NLPILIBNAME = nlpi$(NLPILIBSHORTNAMECPPAD)$(NLPILIBSHORTNAMEIPOPT) 449 | NLPILIB = $(NLPILIBNAME).$(BASE) 450 | NLPILIBFILE = $(SCIPREALPATH)/lib/lib$(NLPILIB).$(LIBEXT) 451 | NLPILIBSHORTLINK= $(SCIPREALPATH)/lib/lib$(NLPILIBNAME).$(LIBEXT) 452 | -------------------------------------------------------------------------------- /src/scipjni.i: -------------------------------------------------------------------------------- 1 | /* File: scipjni.i */ 2 | %module(directors="1") SCIPJNI 3 | 4 | // generate directors for all classes that have virtual methods 5 | %feature("director"); 6 | 7 | %{ 8 | #include "scip/scip.h" 9 | #include "scip/scipdefplugins.h" 10 | #include "objscip/objmessagehdlr.h" 11 | 12 | /* if libscip is a shared library, ensure we use function calls instead of 13 | macros, for better binary compatibility across SCIP versions */ 14 | #ifndef HAVE_STATIC_LIBSCIP 15 | #ifdef SCIPinfinity 16 | #undef SCIPinfinity 17 | #endif 18 | 19 | #ifdef BMScheckEmptyMemory 20 | #undef BMScheckEmptyMemory 21 | #endif 22 | #define BMScheckEmptyMemory() BMScheckEmptyMemory_call() 23 | 24 | #ifdef BMSgetMemoryUsed 25 | #undef BMSgetMemoryUsed 26 | #endif 27 | #define BMSgetMemoryUsed() BMSgetMemoryUsed_call() 28 | 29 | #ifdef SCIPvarGetName 30 | #undef SCIPvarGetName 31 | #endif 32 | 33 | #ifdef SCIPvarGetType 34 | #undef SCIPvarGetType 35 | #endif 36 | 37 | #ifdef SCIPvarGetLbLocal 38 | #undef SCIPvarGetLbLocal 39 | #endif 40 | 41 | #ifdef SCIPvarGetUbLocal 42 | #undef SCIPvarGetUbLocal 43 | #endif 44 | 45 | #ifdef SCIPvarGetLbGlobal 46 | #undef SCIPvarGetLbGlobal 47 | #endif 48 | 49 | #ifdef SCIPvarGetUbGlobal 50 | #undef SCIPvarGetUbGlobal 51 | #endif 52 | 53 | #ifdef SCIPvarGetObj 54 | #undef SCIPvarGetObj 55 | #endif 56 | 57 | #ifdef SCIPvarGetBranchPriority 58 | #undef SCIPvarGetBranchPriority 59 | #endif 60 | 61 | #ifdef SCIPsolGetDepth 62 | #undef SCIPsolGetDepth 63 | #endif 64 | 65 | #ifdef SCIPsolGetIndex 66 | #undef SCIPsolGetIndex 67 | #endif 68 | 69 | #ifdef SCIPconsGetName 70 | #undef SCIPconsGetName 71 | #endif 72 | #endif /* ndef HAVE_STATIC_LIBSCIP */ 73 | 74 | /* assist function to create a SCIP */ 75 | SCIP* createSCIP() 76 | { 77 | SCIP* scip; 78 | 79 | SCIP_CALL_ABORT( SCIPcreate(&scip) ); 80 | 81 | return scip; 82 | } 83 | 84 | /* assist function to free a SCIP */ 85 | void freeSCIP(SCIP* scip) 86 | { 87 | SCIP_CALL_ABORT( SCIPfree(&scip) ); 88 | } 89 | 90 | /* assist function to create a variable */ 91 | SCIP_VAR* createVar(SCIP* scip, const char* name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype) 92 | { 93 | SCIP_VAR* var; 94 | 95 | SCIP_CALL_ABORT( SCIPcreateVarBasic(scip, &var, name, lb, ub, obj, vartype) ); 96 | return var; 97 | } 98 | 99 | /* assist function to free a variable */ 100 | void releaseVar(SCIP* scip, SCIP_VAR* var) 101 | { 102 | SCIP_CALL_ABORT( SCIPreleaseVar(scip, &var) ); 103 | } 104 | 105 | /* assist function to create an abs expression */ 106 | SCIP_EXPR* createExprAbs(SCIP* scip, SCIP_EXPR* child) 107 | { 108 | SCIP_EXPR* expr; 109 | 110 | SCIP_CALL_ABORT( SCIPcreateExprAbs(scip, &expr, child, NULL, NULL) ); 111 | return expr; 112 | } 113 | 114 | /* assist function to create an entropy expression */ 115 | SCIP_EXPR* createExprEntropy(SCIP* scip, SCIP_EXPR* child) 116 | { 117 | SCIP_EXPR* expr; 118 | 119 | SCIP_CALL_ABORT( SCIPcreateExprEntropy(scip, &expr, child, NULL, NULL) ); 120 | return expr; 121 | } 122 | 123 | /* assist function to create an exp expression */ 124 | SCIP_EXPR* createExprExp(SCIP* scip, SCIP_EXPR* child) 125 | { 126 | SCIP_EXPR* expr; 127 | 128 | SCIP_CALL_ABORT( SCIPcreateExprExp(scip, &expr, child, NULL, NULL) ); 129 | return expr; 130 | } 131 | 132 | /* assist function to create a log (ln) expression */ 133 | SCIP_EXPR* createExprLog(SCIP* scip, SCIP_EXPR* child) 134 | { 135 | SCIP_EXPR* expr; 136 | 137 | SCIP_CALL_ABORT( SCIPcreateExprLog(scip, &expr, child, NULL, NULL) ); 138 | return expr; 139 | } 140 | 141 | /* assist function to create a pow expression */ 142 | SCIP_EXPR* createExprPow(SCIP* scip, SCIP_EXPR* child, SCIP_Real exponent) 143 | { 144 | SCIP_EXPR* expr; 145 | 146 | SCIP_CALL_ABORT( SCIPcreateExprPow(scip, &expr, child, exponent, NULL, NULL) ); 147 | return expr; 148 | } 149 | 150 | /* assist function to create a signpower expression */ 151 | SCIP_EXPR* createExprSignpower(SCIP* scip, SCIP_EXPR* child, SCIP_Real exponent) 152 | { 153 | SCIP_EXPR* expr; 154 | 155 | SCIP_CALL_ABORT( SCIPcreateExprSignpower(scip, &expr, child, exponent, NULL, NULL) ); 156 | return expr; 157 | } 158 | 159 | /* assist function to create a product expression */ 160 | SCIP_EXPR* createExprProduct(SCIP* scip, int nchildren, SCIP_EXPR** children, SCIP_Real coefficient) 161 | { 162 | SCIP_EXPR* expr; 163 | 164 | SCIP_CALL_ABORT( SCIPcreateExprProduct(scip, &expr, nchildren, children, coefficient, NULL, NULL) ); 165 | return expr; 166 | } 167 | 168 | /* assist function to create a sum expression */ 169 | SCIP_EXPR* createExprSum(SCIP* scip, int nchildren, SCIP_EXPR** children, SCIP_Real* coefficients, SCIP_Real constant) 170 | { 171 | SCIP_EXPR* expr; 172 | 173 | SCIP_CALL_ABORT( SCIPcreateExprSum(scip, &expr, nchildren, children, coefficients, constant, NULL, NULL) ); 174 | return expr; 175 | } 176 | 177 | /* assist function to create a sin expression */ 178 | SCIP_EXPR* createExprSin(SCIP* scip, SCIP_EXPR* child) 179 | { 180 | SCIP_EXPR* expr; 181 | 182 | SCIP_CALL_ABORT( SCIPcreateExprSin(scip, &expr, child, NULL, NULL) ); 183 | return expr; 184 | } 185 | 186 | /* assist function to create a cos expression */ 187 | SCIP_EXPR* createExprCos(SCIP* scip, SCIP_EXPR* child) 188 | { 189 | SCIP_EXPR* expr; 190 | 191 | SCIP_CALL_ABORT( SCIPcreateExprCos(scip, &expr, child, NULL, NULL) ); 192 | return expr; 193 | } 194 | 195 | /* assist function to create a (constant) value expression */ 196 | SCIP_EXPR* createExprValue(SCIP* scip, SCIP_Real value) 197 | { 198 | SCIP_EXPR* expr; 199 | 200 | SCIP_CALL_ABORT( SCIPcreateExprValue(scip, &expr, value, NULL, NULL) ); 201 | return expr; 202 | } 203 | 204 | /* assist function to create a var(iable) expression */ 205 | SCIP_EXPR* createExprVar(SCIP* scip, SCIP_VAR *var) 206 | { 207 | SCIP_EXPR* expr; 208 | 209 | SCIP_CALL_ABORT( SCIPcreateExprVar(scip, &expr, var, NULL, NULL) ); 210 | return expr; 211 | } 212 | 213 | /* assist function to release an expression */ 214 | void releaseExpr(SCIP* scip, SCIP_EXPR* expr) 215 | { 216 | SCIP_CALL_ABORT( SCIPreleaseExpr(scip, &expr) ); 217 | } 218 | 219 | /* assist function to create a linear constraint */ 220 | SCIP_CONS* createConsBasicLinear(SCIP* scip, const char* name , int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real lhs, SCIP_Real rhs) 221 | { 222 | SCIP_CONS* cons; 223 | 224 | SCIP_CALL_ABORT( SCIPcreateConsBasicLinear(scip, &cons, name, nvars, vars, vals, lhs, rhs) ); 225 | 226 | return cons; 227 | } 228 | 229 | /* assist function to create a quadratic constraint */ 230 | SCIP_CONS* createConsBasicQuadratic(SCIP* scip, const char* name, int nlinvars, SCIP_VAR** linvars, SCIP_Real* lincoefs,\ 231 | int nquadvars, SCIP_VAR** quadvars1, SCIP_VAR** quadvars2, SCIP_Real* quadcoefs, SCIP_Real lhs, SCIP_Real rhs) 232 | { 233 | SCIP_CONS* cons; 234 | 235 | SCIP_CALL_ABORT( SCIPcreateConsBasicQuadraticNonlinear(scip, &cons, name, nlinvars, linvars, lincoefs, nquadvars, quadvars1, quadvars2, quadcoefs, lhs, rhs) ); 236 | 237 | return cons; 238 | } 239 | 240 | /* assist function to create a superindicator constraint */ 241 | SCIP_CONS* createConsBasicSuperindicator(SCIP *scip, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons) 242 | { 243 | SCIP_CONS* cons; 244 | 245 | SCIP_CALL_ABORT( SCIPcreateConsBasicSuperindicator(scip, &cons, name, binvar, slackcons) ); 246 | 247 | return cons; 248 | } 249 | 250 | /* assist function to create a nonlinear constraint */ 251 | SCIP_CONS* createConsBasicNonlinear(SCIP* scip, const char* name, SCIP_EXPR* expr, SCIP_Real lhs, SCIP_Real rhs) 252 | { 253 | SCIP_CONS* cons; 254 | 255 | SCIP_CALL_ABORT( SCIPcreateConsBasicNonlinear(scip, &cons, name, expr, lhs, rhs) ); 256 | 257 | return cons; 258 | } 259 | 260 | /* assist function to create a pseudoboolean constraint */ 261 | SCIP_CONS* createConsBasicPseudoboolean(SCIP* scip, const char* name, SCIP_VAR** linvars, int nlinvars, SCIP_Real* linvals, SCIP_VAR*** terms, int nterms, int* ntermvars, SCIP_Real* termvals, SCIP_VAR* indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR* intvar, SCIP_Real lhs, SCIP_Real rhs) 262 | { 263 | SCIP_CONS* cons; 264 | 265 | SCIP_CALL_ABORT( SCIPcreateConsBasicPseudoboolean(scip, &cons, name, linvars, nlinvars, linvals, terms, nterms, ntermvars, termvals, indvar, weight, issoftcons, intvar, lhs, rhs) ); 266 | 267 | return cons; 268 | } 269 | 270 | /* assist function to create a set partitioning constraint */ 271 | SCIP_CONS* createConsBasicSetpart(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars) 272 | { 273 | SCIP_CONS* cons; 274 | 275 | SCIP_CALL_ABORT( SCIPcreateConsBasicSetpart(scip, &cons, name, nvars, vars) ); 276 | 277 | return cons; 278 | } 279 | 280 | /* assist function to create a set packing constraint */ 281 | SCIP_CONS* createConsBasicSetpack(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars) 282 | { 283 | SCIP_CONS* cons; 284 | 285 | SCIP_CALL_ABORT( SCIPcreateConsBasicSetpack(scip, &cons, name, nvars, vars) ); 286 | 287 | return cons; 288 | } 289 | 290 | /* assist function to create a set covering constraint */ 291 | SCIP_CONS* createConsBasicSetcover(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars) 292 | { 293 | SCIP_CONS* cons; 294 | 295 | SCIP_CALL_ABORT( SCIPcreateConsBasicSetcover(scip, &cons, name, nvars, vars) ); 296 | 297 | return cons; 298 | } 299 | 300 | /* assist function to create a second-order cone constraint */ 301 | SCIP_CONS* createConsBasicSOC(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* coefs, SCIP_Real* offsets, SCIP_Real constant, SCIP_VAR* rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset) 302 | { 303 | SCIP_CONS* cons; 304 | 305 | SCIP_CALL_ABORT( SCIPcreateConsBasicSOCNonlinear(scip, &cons, name, nvars, vars, coefs, offsets, constant, rhsvar, rhscoeff, rhsoffset) ); 306 | 307 | return cons; 308 | } 309 | 310 | /* assist function to create a signpower constraint */ 311 | SCIP_CONS* createConsBasicSignpower(SCIP* scip, const char* name, SCIP_VAR* x, SCIP_VAR* z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs) 312 | { 313 | SCIP_CONS* cons; 314 | 315 | SCIP_CALL_ABORT( SCIPcreateConsBasicSignpowerNonlinear(scip, &cons, name, x, z, exponent, xoffset, zcoef, lhs, rhs) ); 316 | 317 | return cons; 318 | } 319 | 320 | /* assist function to create an and constraint */ 321 | SCIP_CONS* createConsBasicAnd(SCIP* scip, const char* name, SCIP_VAR* resvar, int nvars, SCIP_VAR** vars) 322 | { 323 | SCIP_CONS* cons; 324 | 325 | SCIP_CALL_ABORT( SCIPcreateConsBasicAnd(scip, &cons, name, resvar, nvars, vars) ); 326 | 327 | return cons; 328 | } 329 | 330 | /* assist function to create an or constraint */ 331 | SCIP_CONS* createConsBasicOr(SCIP* scip, const char* name, SCIP_VAR* resvar, int nvars, SCIP_VAR** vars) 332 | { 333 | SCIP_CONS* cons; 334 | 335 | SCIP_CALL_ABORT( SCIPcreateConsBasicOr(scip, &cons, name, resvar, nvars, vars) ); 336 | 337 | return cons; 338 | } 339 | 340 | /* assist function to create a bound disjunction constraint */ 341 | SCIP_CONS* createConsBasicBounddisjunction(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_BOUNDTYPE* boundtypes, SCIP_Real* bounds) 342 | { 343 | SCIP_CONS* cons; 344 | 345 | SCIP_CALL_ABORT( SCIPcreateConsBasicBounddisjunction(scip, &cons, name, nvars, vars, boundtypes, bounds) ); 346 | 347 | return cons; 348 | } 349 | 350 | /* assist function to create a redundant bound disjunction constraint */ 351 | SCIP_CONS* createConsBasicBounddisjunctionRedundant(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_BOUNDTYPE* boundtypes, SCIP_Real* bounds) 352 | { 353 | SCIP_CONS* cons; 354 | 355 | SCIP_CALL_ABORT( SCIPcreateConsBasicBounddisjunctionRedundant(scip, &cons, name, nvars, vars, boundtypes, bounds) ); 356 | 357 | return cons; 358 | } 359 | 360 | /* assist function to create a cardinality constraint */ 361 | SCIP_CONS* createConsBasicCardinality(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, int cardval, SCIP_VAR** indvars, SCIP_Real* weights) 362 | { 363 | SCIP_CONS* cons; 364 | 365 | SCIP_CALL_ABORT( SCIPcreateConsBasicCardinality(scip, &cons, name, nvars, vars, cardval, indvars, weights) ); 366 | 367 | return cons; 368 | } 369 | 370 | /* assist function to create a conjunction constraint */ 371 | SCIP_CONS* createConsBasicConjunction(SCIP* scip, const char* name, int nconss, SCIP_CONS** conss) 372 | { 373 | SCIP_CONS* cons; 374 | 375 | SCIP_CALL_ABORT( SCIPcreateConsBasicConjunction(scip, &cons, name, nconss, conss) ); 376 | 377 | return cons; 378 | } 379 | 380 | /* assist function to create a disjunction constraint */ 381 | SCIP_CONS* createConsBasicDisjunction(SCIP* scip, const char* name, int nconss, SCIP_CONS** conss, SCIP_CONS* relaxcons) 382 | { 383 | SCIP_CONS* cons; 384 | 385 | SCIP_CALL_ABORT( SCIPcreateConsBasicDisjunction(scip, &cons, name, nconss, conss, relaxcons) ); 386 | 387 | return cons; 388 | } 389 | 390 | /* assist function to create a cumulative constraint */ 391 | SCIP_CONS* createConsBasicCumulative(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, int* durations, int* demands, int capacity) 392 | { 393 | SCIP_CONS* cons; 394 | 395 | SCIP_CALL_ABORT( SCIPcreateConsBasicCumulative(scip, &cons, name, nvars, vars, durations, demands, capacity) ); 396 | 397 | return cons; 398 | } 399 | 400 | /* assist function to create an indicator constraint */ 401 | SCIP_CONS* createConsBasicIndicator(SCIP* scip, const char* name, SCIP_VAR* binvar, int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real rhs) 402 | { 403 | SCIP_CONS* cons; 404 | 405 | SCIP_CALL_ABORT( SCIPcreateConsBasicIndicator(scip, &cons, name, binvar, nvars, vars, vals, rhs) ); 406 | 407 | return cons; 408 | } 409 | 410 | /* assist function to create an indicator constraint with given linear 411 | constraint and slack variable*/ 412 | SCIP_CONS* createConsBasicIndicatorLinCons(SCIP* scip, const char* name, SCIP_VAR* binvar, SCIP_CONS* lincons, SCIP_VAR* slackvar) 413 | { 414 | SCIP_CONS* cons; 415 | 416 | SCIP_CALL_ABORT( SCIPcreateConsBasicIndicatorLinCons(scip, &cons, name, binvar, lincons, slackvar) ); 417 | 418 | return cons; 419 | } 420 | 421 | /* assist function to create a knapsack constraint */ 422 | SCIP_CONS* createConsBasicKnapsack(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Longint* weights, SCIP_Longint capacity) 423 | { 424 | SCIP_CONS* cons; 425 | 426 | SCIP_CALL_ABORT( SCIPcreateConsBasicKnapsack(scip, &cons, name, nvars, vars, weights, capacity) ); 427 | 428 | return cons; 429 | } 430 | 431 | /* assist function to create a linking constraint */ 432 | SCIP_CONS* createConsBasicLinking(SCIP* scip, const char* name, SCIP_VAR* linkvar, SCIP_VAR** binvars, SCIP_Real* vals, int nbinvars) 433 | { 434 | SCIP_CONS* cons; 435 | 436 | SCIP_CALL_ABORT( SCIPcreateConsBasicLinking(scip, &cons, name, linkvar, binvars, vals, nbinvars) ); 437 | 438 | return cons; 439 | } 440 | 441 | /* assist function to create a logicor constraint */ 442 | SCIP_CONS* createConsBasicLogicor(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars) 443 | { 444 | SCIP_CONS* cons; 445 | 446 | SCIP_CALL_ABORT( SCIPcreateConsBasicLogicor(scip, &cons, name, nvars, vars) ); 447 | 448 | return cons; 449 | } 450 | 451 | /* assist function to create an orbisack constraint */ 452 | SCIP_CONS* createConsBasicOrbisack(SCIP* scip, const char* name, SCIP_VAR** vars1, SCIP_VAR** vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons) 453 | { 454 | SCIP_CONS* cons; 455 | 456 | SCIP_CALL_ABORT( SCIPcreateConsBasicOrbisack(scip, &cons, name, vars1, vars2, nrows, ispporbisack, isparttype, ismodelcons) ); 457 | 458 | return cons; 459 | } 460 | 461 | /* assist function to create an orbitope constraint */ 462 | SCIP_CONS* createConsBasicOrbitope(SCIP* scip, const char* name, SCIP_VAR*** vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool usedynamicprop, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool mayinteract) 463 | { 464 | SCIP_CONS* cons; 465 | 466 | SCIP_CALL_ABORT( SCIPcreateConsBasicOrbitope(scip, &cons, name, vars, orbitopetype, nspcons, nblocks, usedynamicprop, resolveprop, ismodelcons, mayinteract) ); 467 | 468 | return cons; 469 | } 470 | 471 | /* assist function to create an SOS1 constraint */ 472 | SCIP_CONS* createConsBasicSOS1(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* weights) 473 | { 474 | SCIP_CONS* cons; 475 | 476 | SCIP_CALL_ABORT( SCIPcreateConsBasicSOS1(scip, &cons, name, nvars, vars, weights) ); 477 | 478 | return cons; 479 | } 480 | 481 | /* assist function to create an SOS2 constraint */ 482 | SCIP_CONS* createConsBasicSOS2(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* weights) 483 | { 484 | SCIP_CONS* cons; 485 | 486 | SCIP_CALL_ABORT( SCIPcreateConsBasicSOS2(scip, &cons, name, nvars, vars, weights) ); 487 | 488 | return cons; 489 | } 490 | 491 | /* assist function to create a symresack constraint */ 492 | SCIP_CONS* createConsBasicSymresack(SCIP* scip, const char* name, int* perm, SCIP_VAR** vars, int nvars, SCIP_Bool ismodelcons) 493 | { 494 | SCIP_CONS* cons; 495 | 496 | SCIP_CALL_ABORT( SCIPcreateConsBasicSymresack(scip, &cons, name, perm, vars, nvars, ismodelcons) ); 497 | 498 | return cons; 499 | } 500 | 501 | /* assist function to create a variable bound constraint */ 502 | SCIP_CONS* createConsBasicVarbound(SCIP* scip, const char* name, SCIP_VAR* var, SCIP_VAR* vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs) 503 | { 504 | SCIP_CONS* cons; 505 | 506 | SCIP_CALL_ABORT( SCIPcreateConsBasicVarbound(scip, &cons, name, var, vbdvar, vbdcoef, lhs, rhs) ); 507 | 508 | return cons; 509 | } 510 | 511 | /* assist function to create an xor constraint */ 512 | SCIP_CONS* createConsBasicXor(SCIP* scip, const char* name, SCIP_Bool rhs, int nvars, SCIP_VAR** vars) 513 | { 514 | SCIP_CONS* cons; 515 | 516 | SCIP_CALL_ABORT( SCIPcreateConsBasicXor(scip, &cons, name, rhs, nvars, vars) ); 517 | 518 | return cons; 519 | } 520 | 521 | /* assist function to release a constraint */ 522 | void releaseCons(SCIP* scip, SCIP_CONS* cons) 523 | { 524 | SCIP_CALL_ABORT( SCIPreleaseCons(scip, &cons) ); 525 | } 526 | 527 | /* assist function to create a message handler */ 528 | SCIP_MESSAGEHDLR* createObjMessagehdlr(scip::ObjMessagehdlr* objmessagehdlr, SCIP_Bool deleteobject) 529 | { 530 | SCIP_MESSAGEHDLR* messagehdlr; 531 | 532 | SCIP_CALL_ABORT( SCIPcreateObjMessagehdlr(&messagehdlr, objmessagehdlr, deleteobject) ); 533 | 534 | return messagehdlr; 535 | } 536 | %} 537 | 538 | /* use SWIG internal arrays */ 539 | %include carrays.i 540 | /* char *ary is a pointer to a char, not a string, so override the map */ 541 | %apply SWIGTYPE * {char *new_char_array(int)}; 542 | %apply SWIGTYPE * {char *ary}; 543 | %typemap(freearg, noblock=1) char *ary {} 544 | %array_functions( char, char_array ) 545 | %array_functions( double, double_array ) 546 | %array_functions( int, int_array ) 547 | %array_functions( long long, long_long_array ) 548 | %array_functions( unsigned int, unsigned_int_array ) 549 | %array_functions( SCIP_BOUNDTYPE, SCIP_BoundType_array ) 550 | %array_functions( char*, String_array ) 551 | %array_functions( SCIP_VAR*, SCIP_VAR_array ) 552 | %array_functions( SCIP_EXPR*, SCIP_EXPR_array ) 553 | %array_functions( SCIP_CONS*, SCIP_CONS_array ) 554 | %array_functions( SCIP_SOL*, SCIP_SOL_array ) 555 | %array_functions( SCIP_VAR**, SCIP_VAR_array_array ) 556 | 557 | /* some defines from def.h */ 558 | #define SCIP_Real double 559 | #define SCIP_Longint long long int 560 | #define SCIP_Bool unsigned int 561 | 562 | /* SCIP retcode enum */ 563 | enum SCIP_Retcode 564 | { 565 | SCIP_OKAY = +1, 566 | SCIP_ERROR = 0, 567 | SCIP_NOMEMORY = -1, 568 | SCIP_READERROR = -2, 569 | SCIP_WRITEERROR = -3, 570 | SCIP_NOFILE = -4, 571 | SCIP_FILECREATEERROR = -5, 572 | SCIP_LPERROR = -6, 573 | SCIP_NOPROBLEM = -7, 574 | SCIP_INVALIDCALL = -8, 575 | SCIP_INVALIDDATA = -9, 576 | SCIP_INVALIDRESULT = -10, 577 | SCIP_PLUGINNOTFOUND = -11, 578 | SCIP_PARAMETERUNKNOWN = -12, 579 | SCIP_PARAMETERWRONGTYPE = -13, 580 | SCIP_PARAMETERWRONGVAL = -14, 581 | SCIP_KEYALREADYEXISTING = -15, 582 | SCIP_MAXDEPTHLEVEL = -16, 583 | SCIP_BRANCHERROR = -17 584 | }; 585 | typedef enum SCIP_Retcode SCIP_RETCODE; 586 | 587 | /* SCIP vartype enum */ 588 | enum SCIP_Vartype 589 | { 590 | SCIP_VARTYPE_BINARY = 0, 591 | SCIP_VARTYPE_INTEGER = 1, 592 | SCIP_VARTYPE_IMPLINT = 2, 593 | SCIP_VARTYPE_CONTINUOUS = 3 594 | }; 595 | typedef enum SCIP_Vartype SCIP_VARTYPE; 596 | 597 | /** SCIP_BoundType enum */ 598 | enum SCIP_BoundType 599 | { 600 | SCIP_BOUNDTYPE_LOWER = 0, 601 | SCIP_BOUNDTYPE_UPPER = 1 602 | }; 603 | typedef enum SCIP_BoundType SCIP_BOUNDTYPE; 604 | 605 | /** SCIP_OrbitopeType enum */ 606 | enum SCIP_OrbitopeType 607 | { 608 | SCIP_ORBITOPETYPE_FULL = 0, 609 | SCIP_ORBITOPETYPE_PARTITIONING = 1, 610 | SCIP_ORBITOPETYPE_PACKING = 2 611 | }; 612 | typedef enum SCIP_OrbitopeType SCIP_ORBITOPETYPE; 613 | 614 | /* SCIP ParamEmphasis enum */ 615 | enum SCIP_ParamEmphasis 616 | { 617 | SCIP_PARAMEMPHASIS_DEFAULT = 0, 618 | SCIP_PARAMEMPHASIS_CPSOLVER = 1, 619 | SCIP_PARAMEMPHASIS_EASYCIP = 2, 620 | SCIP_PARAMEMPHASIS_FEASIBILITY = 3, 621 | SCIP_PARAMEMPHASIS_HARDLP = 4, 622 | SCIP_PARAMEMPHASIS_OPTIMALITY = 5, 623 | SCIP_PARAMEMPHASIS_COUNTER = 6, 624 | SCIP_PARAMEMPHASIS_PHASEFEAS = 7, 625 | SCIP_PARAMEMPHASIS_PHASEIMPROVE = 8, 626 | SCIP_PARAMEMPHASIS_PHASEPROOF = 9 627 | }; 628 | typedef enum SCIP_ParamEmphasis SCIP_PARAMEMPHASIS; 629 | 630 | /** SCIP VerbLevel enum */ 631 | enum SCIP_VerbLevel 632 | { 633 | SCIP_VERBLEVEL_NONE = 0, 634 | SCIP_VERBLEVEL_DIALOG = 1, 635 | SCIP_VERBLEVEL_MINIMAL = 2, 636 | SCIP_VERBLEVEL_NORMAL = 3, 637 | SCIP_VERBLEVEL_HIGH = 4, 638 | SCIP_VERBLEVEL_FULL = 5 639 | }; 640 | typedef enum SCIP_VerbLevel SCIP_VERBLEVEL; 641 | 642 | /** objective sense */ 643 | enum SCIP_Objsense 644 | { 645 | SCIP_OBJSENSE_MAXIMIZE = -1, /**< maximize objective function */ 646 | SCIP_OBJSENSE_MINIMIZE = +1 /**< minimize objective function */ 647 | }; 648 | typedef enum SCIP_Objsense SCIP_OBJSENSE; 649 | 650 | /** SCIP Status enum */ 651 | enum SCIP_Status 652 | { 653 | SCIP_STATUS_UNKNOWN = 0, 654 | SCIP_STATUS_USERINTERRUPT = 1, 655 | SCIP_STATUS_NODELIMIT = 2, 656 | SCIP_STATUS_TOTALNODELIMIT = 3, 657 | SCIP_STATUS_STALLNODELIMIT = 4, 658 | SCIP_STATUS_TIMELIMIT = 5, 659 | SCIP_STATUS_MEMLIMIT = 6, 660 | SCIP_STATUS_GAPLIMIT = 7, 661 | SCIP_STATUS_SOLLIMIT = 8, 662 | SCIP_STATUS_BESTSOLLIMIT = 9, 663 | SCIP_STATUS_RESTARTLIMIT = 10, 664 | SCIP_STATUS_OPTIMAL = 11, 665 | SCIP_STATUS_INFEASIBLE = 12, 666 | SCIP_STATUS_UNBOUNDED = 13, 667 | SCIP_STATUS_INFORUNBD = 14, 668 | SCIP_STATUS_TERMINATE = 15 669 | }; 670 | typedef enum SCIP_Status SCIP_STATUS; 671 | 672 | /** SCIP operation stage */ 673 | enum SCIP_Stage 674 | { 675 | SCIP_STAGE_INIT = 0, 676 | SCIP_STAGE_PROBLEM = 1, 677 | SCIP_STAGE_TRANSFORMING = 2, 678 | SCIP_STAGE_TRANSFORMED = 3, 679 | SCIP_STAGE_INITPRESOLVE = 4, 680 | SCIP_STAGE_PRESOLVING = 5, 681 | SCIP_STAGE_EXITPRESOLVE = 6, 682 | SCIP_STAGE_PRESOLVED = 7, 683 | SCIP_STAGE_INITSOLVE = 8, 684 | SCIP_STAGE_SOLVING = 9, 685 | SCIP_STAGE_SOLVED = 10, 686 | SCIP_STAGE_EXITSOLVE = 11, 687 | SCIP_STAGE_FREETRANS = 12, 688 | SCIP_STAGE_FREE = 13 689 | }; 690 | typedef enum SCIP_Stage SCIP_STAGE; 691 | 692 | /* from pub_misc.h */ 693 | SCIP_Real SCIPcalcMachineEpsilon(); 694 | 695 | /* from scip.h*/ 696 | SCIP_RETCODE SCIPcreate(SCIP** scip); 697 | SCIP_RETCODE SCIPreadProb(SCIP* scip, const char* filename, const char* extension); 698 | SCIP_RETCODE SCIPreadParams(SCIP* scip, const char* filename); 699 | SCIP_RETCODE SCIPcreateProbBasic(SCIP* scip, const char* probname); 700 | SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP* scip); 701 | SCIP_RETCODE SCIPsolve(SCIP* scip); 702 | SCIP_RETCODE SCIPsolveConcurrent(SCIP* scip); 703 | SCIP_RETCODE SCIPinterruptSolve(SCIP* scip); 704 | SCIP_Bool SCIPisSolveInterrupted(SCIP* scip); 705 | SCIP_RETCODE SCIPaddVar(SCIP* scip, SCIP_VAR* var); 706 | int SCIPgetNVars(SCIP* scip); 707 | SCIP_VAR** SCIPgetVars(SCIP* scip); 708 | int SCIPgetNOrigVars(SCIP* scip); 709 | SCIP_VAR** SCIPgetOrigVars(SCIP* scip); 710 | SCIP_RETCODE SCIPaddCons(SCIP* scip, SCIP_CONS* cons); 711 | SCIP_RETCODE SCIPwriteOrigProblem(SCIP* scip, const char* filename, const char* extension, SCIP_Bool genericnames); 712 | SCIP_RETCODE SCIPwriteTransProblem(SCIP* scip, const char* filename, const char* extension, SCIP_Bool genericnames); 713 | SCIP_RETCODE SCIPprintStatistics(SCIP* scip, FILE* file); 714 | SCIP_RETCODE SCIPprintBestSol(SCIP* scip, FILE* file, SCIP_Bool printzeros); 715 | void SCIPsetMessagehdlrQuiet(SCIP* scip, SCIP_Bool quite); 716 | SCIP_STATUS SCIPgetStatus(SCIP* scip); 717 | SCIP_STAGE SCIPgetStage(SCIP* scip); 718 | SCIP_SOL** SCIPgetSols(SCIP* scip); 719 | int SCIPgetNSols(SCIP* scip); 720 | SCIP_SOL* SCIPgetBestSol(SCIP* scip); 721 | SCIP_Real SCIPgetSolVal(SCIP* scip, SCIP_SOL* sol, SCIP_VAR* var); 722 | SCIP_Real SCIPgetSolOrigObj(SCIP* scip, SCIP_SOL* sol); 723 | SCIP_Real SCIPinfinity(SCIP* scip); 724 | SCIP_Real SCIPepsilon(SCIP* scip); 725 | SCIP_Real SCIPfeastol(SCIP* scip); 726 | SCIP_RETCODE SCIPgetBoolParam(SCIP* scip, const char* name, SCIP_Bool* p_value); 727 | SCIP_RETCODE SCIPgetIntParam(SCIP* scip, const char* name, int* p_value); 728 | SCIP_RETCODE SCIPgetLongintParam(SCIP* scip, const char* name, SCIP_Longint* p_value); 729 | SCIP_RETCODE SCIPgetRealParam(SCIP* scip, const char* name, SCIP_Real* p_value); 730 | /* char *p_value is a pointer to a char, not a string, so override the map */ 731 | %apply SWIGTYPE * {char *p_value}; 732 | %typemap(freearg, noblock=1) char *p_value {} 733 | SCIP_RETCODE SCIPgetCharParam(SCIP* scip, const char* name, char* p_value); 734 | SCIP_RETCODE SCIPgetStringParam(SCIP* scip, const char* name, char** p_value); 735 | SCIP_RETCODE SCIPsetBoolParam(SCIP* scip, const char* name, SCIP_Bool value); 736 | SCIP_RETCODE SCIPsetIntParam(SCIP* scip, const char* name, int value); 737 | SCIP_RETCODE SCIPsetLongintParam(SCIP* scip, const char* name, SCIP_Longint value); 738 | SCIP_RETCODE SCIPsetRealParam(SCIP* scip, const char* name, SCIP_Real value); 739 | SCIP_RETCODE SCIPsetCharParam(SCIP* scip, const char* name, char value); 740 | SCIP_RETCODE SCIPsetStringParam(SCIP* scip, const char* name, const char* value); 741 | SCIP_RETCODE SCIPsetEmphasis(SCIP* scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet); 742 | SCIP_RETCODE SCIPsetObjsense(SCIP* scip, SCIP_OBJSENSE objsense); 743 | SCIP_OBJSENSE SCIPgetObjsense(SCIP* scip); 744 | SCIP_Real SCIPgetGap(SCIP* scip); 745 | SCIP_RETCODE SCIPchgVarObj(SCIP* scip, SCIP_VAR* var, SCIP_Real obj); 746 | 747 | /* from scip_var.h */ 748 | SCIP_RETCODE SCIPchgVarBranchPriority(SCIP* scip, SCIP_VAR* var, int branchpriority); 749 | 750 | /* from scip_sol.h */ 751 | SCIP_RETCODE SCIPcreateSol(SCIP* scip, SCIP_SOL** sol, SCIP_HEUR* heur); 752 | SCIP_RETCODE SCIPcreatePartialSol(SCIP* scip, SCIP_SOL** sol, SCIP_HEUR* heur); 753 | SCIP_RETCODE SCIPsetSolVal(SCIP* scip, SCIP_SOL* sol, SCIP_VAR* var, SCIP_Real val); 754 | SCIP_RETCODE SCIPsetSolVals(SCIP* scip, SCIP_SOL* sol, int nvars, SCIP_VAR** vars, SCIP_Real* val); 755 | SCIP_RETCODE SCIPaddSolFree(SCIP* scip, SCIP_SOL** sol, SCIP_Bool *stored); 756 | 757 | /* from scip_solvingstats.h */ 758 | SCIP_Real SCIPgetPrimalbound(SCIP* scip); 759 | SCIP_Real SCIPgetDualbound(SCIP* scip); 760 | 761 | /* from scip_timing.h */ 762 | SCIP_Real SCIPgetSolvingTime(SCIP* scip); 763 | 764 | /* from memory.h */ 765 | void BMScheckEmptyMemory(); 766 | long long BMSgetMemoryUsed(); 767 | 768 | /* from pub_var.h */ 769 | const char* SCIPvarGetName(SCIP_VAR* var); 770 | SCIP_VARTYPE SCIPvarGetType(SCIP_VAR* var); 771 | SCIP_Real SCIPvarGetLbLocal(SCIP_VAR* var); 772 | SCIP_Real SCIPvarGetUbLocal(SCIP_VAR* var); 773 | SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR* var); 774 | SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR* var); 775 | SCIP_Real SCIPvarGetObj(SCIP_VAR* var); 776 | int SCIPvarGetBranchPriority(SCIP_VAR* var); 777 | 778 | /* from pub_sol.h */ 779 | int SCIPsolGetDepth(SCIP_SOL* sol); 780 | int SCIPsolGetIndex(SCIP_SOL* sol); 781 | 782 | /* from pub_cons.h */ 783 | const char* SCIPconsGetName(SCIP_CONS* cons); 784 | 785 | /* from type_message.h */ 786 | typedef struct SCIP_Messagehdlr SCIP_MESSAGEHDLR; 787 | 788 | /* from obj_message.h */ 789 | namespace scip 790 | { 791 | class ObjMessagehdlr 792 | { 793 | public: 794 | const SCIP_Bool scip_bufferedoutput_; 795 | 796 | explicit ObjMessagehdlr(SCIP_Bool bufferedoutput); 797 | virtual ~ObjMessagehdlr(); 798 | virtual void scip_error(SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg); 799 | virtual void scip_warning(SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg); 800 | virtual void scip_dialog(SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg); 801 | virtual void scip_info(SCIP_MESSAGEHDLR* messagehdlr, FILE* file, const char* msg); 802 | virtual SCIP_RETCODE scip_free(SCIP_MESSAGEHDLR* messagehdlr); 803 | }; 804 | 805 | } /* namespace scip */ 806 | 807 | scip::ObjMessagehdlr* SCIPgetObjMessagehdlr(SCIP_MESSAGEHDLR* messagehdlr); 808 | void SCIPsetStaticErrorPrintingMessagehdlr(SCIP_MESSAGEHDLR* messagehdlr); 809 | 810 | /* from scip_message.h */ 811 | SCIP_RETCODE SCIPsetMessagehdlr(SCIP* scip, SCIP_MESSAGEHDLR* messagehdlr); 812 | SCIP_MESSAGEHDLR* SCIPgetMessagehdlr(SCIP* scip); 813 | void SCIPsetMessagehdlrLogfile(SCIP* scip, const char* filename); 814 | void SCIPsetMessagehdlrQuiet(SCIP* scip, SCIP_Bool quiet); 815 | SCIP_VERBLEVEL SCIPgetVerbLevel(SCIP* scip); 816 | 817 | /* assist functions */ 818 | SCIP* createSCIP(); 819 | void freeSCIP(SCIP* scip); 820 | SCIP_VAR* createVar(SCIP* scip, const char* name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype); 821 | void releaseVar(SCIP* scip, SCIP_VAR* var); 822 | SCIP_EXPR* createExprAbs(SCIP* scip, SCIP_EXPR* child); 823 | SCIP_EXPR* createExprEntropy(SCIP* scip, SCIP_EXPR* child); 824 | SCIP_EXPR* createExprExp(SCIP* scip, SCIP_EXPR* child); 825 | SCIP_EXPR* createExprLog(SCIP* scip, SCIP_EXPR* child); 826 | SCIP_EXPR* createExprPow(SCIP* scip, SCIP_EXPR* child, SCIP_Real exponent); 827 | SCIP_EXPR* createExprSignpower(SCIP* scip, SCIP_EXPR* child, SCIP_Real exponent); 828 | SCIP_EXPR* createExprProduct(SCIP* scip, int nchildren, SCIP_EXPR** children, SCIP_Real coefficient); 829 | SCIP_EXPR* createExprSum(SCIP* scip, int nchildren, SCIP_EXPR** children, SCIP_Real* coefficients, SCIP_Real constant); 830 | SCIP_EXPR* createExprSin(SCIP* scip, SCIP_EXPR* child); 831 | SCIP_EXPR* createExprCos(SCIP* scip, SCIP_EXPR* child); 832 | SCIP_EXPR* createExprValue(SCIP* scip, SCIP_Real value); 833 | SCIP_EXPR* createExprVar(SCIP* scip, SCIP_VAR *var); 834 | void releaseExpr(SCIP* scip, SCIP_EXPR* expr); 835 | SCIP_CONS* createConsBasicLinear(SCIP* scip, const char* name , int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real lhs, SCIP_Real rhs); 836 | SCIP_CONS* createConsBasicQuadratic(SCIP* scip, const char* name, int nlinvars, SCIP_VAR** linvars, SCIP_Real* lincoefs, int nquadvars, SCIP_VAR** quadvars1, SCIP_VAR** quadvars2, SCIP_Real* quadcoefs, SCIP_Real lhs, SCIP_Real rhs); 837 | SCIP_CONS* createConsBasicNonlinear(SCIP* scip, const char* name, SCIP_EXPR* expr, SCIP_Real lhs, SCIP_Real rhs); 838 | SCIP_CONS* createConsBasicSuperindicator(SCIP *scip, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons); 839 | SCIP_CONS* createConsBasicPseudoboolean(SCIP* scip, const char* name, SCIP_VAR** linvars, int nlinvars, SCIP_Real* linvals, SCIP_VAR*** terms, int nterms, int* ntermvars, SCIP_Real* termvals, SCIP_VAR* indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR* intvar, SCIP_Real lhs, SCIP_Real rhs); 840 | SCIP_CONS* createConsBasicSetpart(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars); 841 | SCIP_CONS* createConsBasicSetpack(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars); 842 | SCIP_CONS* createConsBasicSetcover(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars); 843 | SCIP_CONS* createConsBasicSOC(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* coefs, SCIP_Real* offsets, SCIP_Real constant, SCIP_VAR* rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset); 844 | SCIP_CONS* createConsBasicSignpower(SCIP* scip, const char* name, SCIP_VAR* x, SCIP_VAR* z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs); 845 | SCIP_CONS* createConsBasicAnd(SCIP* scip, const char* name, SCIP_VAR* resvar, int nvars, SCIP_VAR** vars); 846 | SCIP_CONS* createConsBasicOr(SCIP* scip, const char* name, SCIP_VAR* resvar, int nvars, SCIP_VAR** vars); 847 | SCIP_CONS* createConsBasicBounddisjunction(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_BOUNDTYPE* boundtypes, SCIP_Real* bounds); 848 | SCIP_CONS* createConsBasicBounddisjunctionRedundant(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_BOUNDTYPE* boundtypes, SCIP_Real* bounds); 849 | SCIP_CONS* createConsBasicCardinality(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, int cardval, SCIP_VAR** indvars, SCIP_Real* weights); 850 | SCIP_CONS* createConsBasicConjunction(SCIP* scip, const char* name, int nconss, SCIP_CONS** conss); 851 | SCIP_CONS* createConsBasicDisjunction(SCIP* scip, const char* name, int nconss, SCIP_CONS** conss, SCIP_CONS* relaxcons); 852 | SCIP_CONS* createConsBasicCumulative(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, int* durations, int* demands, int capacity); 853 | SCIP_CONS* createConsBasicIndicator(SCIP* scip, const char* name, SCIP_VAR* binvar, int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real rhs); 854 | SCIP_CONS* createConsBasicIndicatorLinCons(SCIP* scip, const char* name, SCIP_VAR* binvar, SCIP_CONS* lincons, SCIP_VAR* slackvar); 855 | SCIP_CONS* createConsBasicKnapsack(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Longint* weights, SCIP_Longint capacity); 856 | SCIP_CONS* createConsBasicLinking(SCIP* scip, const char* name, SCIP_VAR* linkvar, SCIP_VAR** binvars, SCIP_Real* vals, int nbinvars); 857 | SCIP_CONS* createConsBasicLogicor(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars); 858 | SCIP_CONS* createConsBasicOrbisack(SCIP* scip, const char* name, SCIP_VAR** vars1, SCIP_VAR** vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons); 859 | SCIP_CONS* createConsBasicOrbitope(SCIP* scip, const char* name, SCIP_VAR*** vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool usedynamicprop, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool mayinteract); 860 | SCIP_CONS* createConsBasicSOS1(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* weights); 861 | SCIP_CONS* createConsBasicSOS2(SCIP* scip, const char* name, int nvars, SCIP_VAR** vars, SCIP_Real* weights); 862 | SCIP_CONS* createConsBasicSymresack(SCIP* scip, const char* name, int* perm, SCIP_VAR** vars, int nvars, SCIP_Bool ismodelcons); 863 | SCIP_CONS* createConsBasicVarbound(SCIP* scip, const char* name, SCIP_VAR* var, SCIP_VAR* vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs); 864 | SCIP_CONS* createConsBasicXor(SCIP* scip, const char* name, SCIP_Bool rhs, int nvars, SCIP_VAR** vars); 865 | void releaseCons(SCIP* scip, SCIP_CONS* cons); 866 | SCIP_MESSAGEHDLR* createObjMessagehdlr(scip::ObjMessagehdlr* objmessagehdlr, SCIP_Bool deleteobject); 867 | -------------------------------------------------------------------------------- /src/scipjni_wrap.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 4.0.2 4 | * 5 | * This file is not intended to be easily readable and contains a number of 6 | * coding conventions designed to improve portability and efficiency. Do not make 7 | * changes to this file unless you know what you are doing--modify the SWIG 8 | * interface file instead. 9 | * ----------------------------------------------------------------------------- */ 10 | 11 | #ifndef SWIG_SCIPJNI_WRAP_H_ 12 | #define SWIG_SCIPJNI_WRAP_H_ 13 | 14 | class SwigDirector_ObjMessagehdlr : public scip::ObjMessagehdlr, public Swig::Director { 15 | 16 | public: 17 | void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); 18 | SwigDirector_ObjMessagehdlr(JNIEnv *jenv, unsigned int bufferedoutput); 19 | virtual ~SwigDirector_ObjMessagehdlr(); 20 | virtual void scip_error(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, char const *msg); 21 | virtual void scip_warning(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, char const *msg); 22 | virtual void scip_dialog(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, char const *msg); 23 | virtual void scip_info(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, char const *msg); 24 | virtual SCIP_RETCODE scip_free(SCIP_MESSAGEHDLR *messagehdlr); 25 | public: 26 | bool swig_overrides(int n) { 27 | return (n < 5 ? swig_override[n] : false); 28 | } 29 | protected: 30 | Swig::BoolArray<5> swig_override; 31 | }; 32 | 33 | 34 | #endif 35 | --------------------------------------------------------------------------------