CONOPT
Loading...
Searching...
No Matches
Conopt.java
Go to the documentation of this file.
1
4
5/* ----------------------------------------------------------------------------
6 * This file was automatically generated by SWIG (https://www.swig.org).
7 * Version 4.3.1
8 *
9 * Do not make changes to this file unless you know what you are doing - modify
10 * the SWIG interface file instead.
11 * ----------------------------------------------------------------------------- */
12
13package jconopt;
14
20public class Conopt {
21 private transient long swigCPtr;
22 protected transient boolean swigCMemOwn;
23
24 protected Conopt(long cPtr, boolean cMemoryOwn) {
25 swigCMemOwn = cMemoryOwn;
26 swigCPtr = cPtr;
27 }
28
29 protected static long getCPtr(Conopt obj) {
30 return (obj == null) ? 0 : obj.swigCPtr;
31 }
32
33 protected static long swigRelease(Conopt obj) {
34 long ptr = 0;
35 if (obj != null) {
36 if (!obj.swigCMemOwn)
37 throw new RuntimeException("Cannot release ownership as memory is not owned");
38 ptr = obj.swigCPtr;
39 obj.swigCMemOwn = false;
40 obj.delete();
41 }
42 return ptr;
43 }
44
45 @SuppressWarnings({"deprecation", "removal"})
46 protected void finalize() {
47 delete();
48 }
49
50 public synchronized void delete() {
51 if (swigCPtr != 0) {
52 if (swigCMemOwn) {
53 swigCMemOwn = false;
54 jconoptJNI.delete_Conopt(swigCPtr);
55 }
56 swigCPtr = 0;
57 }
58 }
59
67 public Conopt(String modelName) {
68 this(jconoptJNI.new_Conopt__SWIG_0(modelName), true);
69 }
70
78 public Conopt() {
79 this(jconoptJNI.new_Conopt__SWIG_1(), true);
80 }
81
89 public int solve() {
90 return jconoptJNI.Conopt_solve(swigCPtr, this);
91 }
92
98 return jconoptJNI.Conopt_checkModelAndParameters(swigCPtr, this);
99 }
100
110 return new SWIGTYPE_p_coiHandle_t(jconoptJNI.Conopt_controlVector(swigCPtr, this), true);
111 }
112
119 public void printStatus() {
120 jconoptJNI.Conopt_printStatus(swigCPtr, this);
121 }
122
129 public String getName() {
130 return jconoptJNI.Conopt_getName(swigCPtr, this);
131 }
132
144 public void loadModel(ConoptModelData modeldata) {
145 jconoptJNI.Conopt_loadModel(swigCPtr, this, ConoptModelData.getCPtr(modeldata), modeldata);
146 }
147
153 public int modelStatus() {
154 return jconoptJNI.Conopt_modelStatus(swigCPtr, this);
155 }
156
163 public int solutionStatus() {
164 return jconoptJNI.Conopt_solutionStatus(swigCPtr, this);
165 }
166
173 public int iterations() {
174 return jconoptJNI.Conopt_iterations(swigCPtr, this);
175 }
176
183 public double objectiveValue() {
184 return jconoptJNI.Conopt_objectiveValue(swigCPtr, this);
185 }
186
193 public double[] getVariableValues() {
194 return jconoptJNI.Conopt_getVariableValues(swigCPtr, this);
195}
196
203 public double[] getVariableMarginals() {
204 return jconoptJNI.Conopt_getVariableMarginals(swigCPtr, this);
205}
206
213 public int[] getVariableBasisStatus() {
214 return jconoptJNI.Conopt_getVariableBasisStatus(swigCPtr, this);
215}
216
223 public int[] getVariableStatus() {
224 return jconoptJNI.Conopt_getVariableStatus(swigCPtr, this);
225}
226
233 public double[] getConstraintValues() {
234 return jconoptJNI.Conopt_getConstraintValues(swigCPtr, this);
235}
236
243 public double[] getConstraintMarginals() {
244 return jconoptJNI.Conopt_getConstraintMarginals(swigCPtr, this);
245}
246
254 return jconoptJNI.Conopt_getConstraintBasisStatus(swigCPtr, this);
255}
256
263 public int[] getConstraintStatus() {
264 return jconoptJNI.Conopt_getConstraintStatus(swigCPtr, this);
265}
266
278 public void setMessageHandler(MessageHandler msghandler) {
279 jconoptJNI.Conopt_setMessageHandler(swigCPtr, this, MessageHandler.getCPtr(msghandler), msghandler);
280 }
281
290 public int sendMessage(String msg) {
291 return jconoptJNI.Conopt_sendMessage(swigCPtr, this, msg);
292 }
293
308 public void setVerbosityLevel(int verblevel) {
309 jconoptJNI.Conopt_setVerbosityLevel(swigCPtr, this, verblevel);
310 }
311
320 public static int[] version() {
321 return jconoptJNI.Conopt_version();
322}
323
331 public int debugFV(int debugfv) {
332 return jconoptJNI.Conopt_debugFV(swigCPtr, this, debugfv);
333 }
334
342 public int squareModel(int square) {
343 return jconoptJNI.Conopt_squareModel(swigCPtr, this, square);
344 }
345
353 public int setLicense(int licint1, int licint2, int licint3, String licstring) {
354 return jconoptJNI.Conopt_setLicense(swigCPtr, this, licint1, licint2, licint3, licstring);
355 }
356
364 public int setItLim(int itlim) {
365 return jconoptJNI.Conopt_setItLim(swigCPtr, this, itlim);
366 }
367
375 public int setErrLim(int errlim) {
376 return jconoptJNI.Conopt_setErrLim(swigCPtr, this, errlim);
377 }
378
386 public int fVincLin(int fvinclin) {
387 return jconoptJNI.Conopt_fVincLin(swigCPtr, this, fvinclin);
388 }
389
397 public int fVforAll(int fvforall) {
398 return jconoptJNI.Conopt_fVforAll(swigCPtr, this, fvforall);
399 }
400
408 public int setMaxSup(int maxsup) {
409 return jconoptJNI.Conopt_setMaxSup(swigCPtr, this, maxsup);
410 }
411
419 public int allowEmptyRow(int emptyrow) {
420 return jconoptJNI.Conopt_allowEmptyRow(swigCPtr, this, emptyrow);
421 }
422
430 public int allowEmptyCol(int emptycol) {
431 return jconoptJNI.Conopt_allowEmptyCol(swigCPtr, this, emptycol);
432 }
433
441 public int debug2D(int debug2d) {
442 return jconoptJNI.Conopt_debug2D(swigCPtr, this, debug2d);
443 }
444
452 public int disCont(int discont) {
453 return jconoptJNI.Conopt_disCont(swigCPtr, this, discont);
454 }
455
463 public int clearM(int clearm) {
464 return jconoptJNI.Conopt_clearM(swigCPtr, this, clearm);
465 }
466
474 public int setResLim(double reslim) {
475 return jconoptJNI.Conopt_setResLim(swigCPtr, this, reslim);
476 }
477
485 public int setMaxHeap(double maxheap) {
486 return jconoptJNI.Conopt_setMaxHeap(swigCPtr, this, maxheap);
487 }
488
496 public int setThreadS(int threads) {
497 return jconoptJNI.Conopt_setThreadS(swigCPtr, this, threads);
498 }
499
507 public int setThreadF(int threadf) {
508 return jconoptJNI.Conopt_setThreadF(swigCPtr, this, threadf);
509 }
510
518 public int setThread2D(int thread2d) {
519 return jconoptJNI.Conopt_setThread2D(swigCPtr, this, thread2d);
520 }
521
529 public int setThreadC(int threadc) {
530 return jconoptJNI.Conopt_setThreadC(swigCPtr, this, threadc);
531 }
532
544 public int getMaxThreads() {
545 return jconoptJNI.Conopt_getMaxThreads(swigCPtr, this);
546 }
547
554 public double getMaxHeapUsed() {
555 return jconoptJNI.Conopt_getMaxHeapUsed(swigCPtr, this);
556 }
557
564 public int getRangeErrors() {
565 return jconoptJNI.Conopt_getRangeErrors(swigCPtr, this);
566 }
567
568}
static long getCPtr(ConoptModelData obj)
static long swigRelease(Conopt obj)
Definition Conopt.java:33
int checkModelAndParameters()
Definition Conopt.java:97
synchronized void delete()
Definition Conopt.java:50
static long getCPtr(Conopt obj)
Definition Conopt.java:29
Conopt(long cPtr, boolean cMemoryOwn)
Definition Conopt.java:24
Conopt(String modelName)
Definition Conopt.java:67
void finalize()
Definition Conopt.java:46
transient boolean swigCMemOwn
Definition Conopt.java:22
int modelStatus()
Definition Conopt.java:153
static long getCPtr(MessageHandler obj)
static final native long new_Conopt__SWIG_0(String jarg1)
static final native int Conopt_disCont(long jarg1, Conopt jarg1_, int jarg2)
static final native void Conopt_printStatus(long jarg1, Conopt jarg1_)
static final native int Conopt_solve(long jarg1, Conopt jarg1_)
static final native int Conopt_clearM(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_setThread2D(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_setItLim(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_sendMessage(long jarg1, Conopt jarg1_, String jarg2)
static final native double[] Conopt_getVariableMarginals(long jarg1, Conopt jarg1_)
static final native int Conopt_getRangeErrors(long jarg1, Conopt jarg1_)
static final native int Conopt_checkModelAndParameters(long jarg1, Conopt jarg1_)
static final native void delete_Conopt(long jarg1)
static final native int Conopt_fVincLin(long jarg1, Conopt jarg1_, int jarg2)
static final native void Conopt_setVerbosityLevel(long jarg1, Conopt jarg1_, int jarg2)
static final native String Conopt_getName(long jarg1, Conopt jarg1_)
static final native void Conopt_setMessageHandler(long jarg1, Conopt jarg1_, long jarg2, MessageHandler jarg2_)
static final native int Conopt_iterations(long jarg1, Conopt jarg1_)
static final native int Conopt_setErrLim(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_getMaxThreads(long jarg1, Conopt jarg1_)
static final native int Conopt_setThreadF(long jarg1, Conopt jarg1_, int jarg2)
static final native double Conopt_getMaxHeapUsed(long jarg1, Conopt jarg1_)
static final native int Conopt_debugFV(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_setThreadC(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_squareModel(long jarg1, Conopt jarg1_, int jarg2)
static final native double[] Conopt_getConstraintMarginals(long jarg1, Conopt jarg1_)
static final native int[] Conopt_getVariableStatus(long jarg1, Conopt jarg1_)
static final native double Conopt_objectiveValue(long jarg1, Conopt jarg1_)
static final native double[] Conopt_getVariableValues(long jarg1, Conopt jarg1_)
static final native int Conopt_allowEmptyCol(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_setLicense(long jarg1, Conopt jarg1_, int jarg2, int jarg3, int jarg4, String jarg5)
static final native int Conopt_setResLim(long jarg1, Conopt jarg1_, double jarg2)
static final native int[] Conopt_getVariableBasisStatus(long jarg1, Conopt jarg1_)
static final native long new_Conopt__SWIG_1()
static final native int Conopt_debug2D(long jarg1, Conopt jarg1_, int jarg2)
static final native int[] Conopt_getConstraintStatus(long jarg1, Conopt jarg1_)
static final native double[] Conopt_getConstraintValues(long jarg1, Conopt jarg1_)
static final native int Conopt_modelStatus(long jarg1, Conopt jarg1_)
static final native int Conopt_setMaxSup(long jarg1, Conopt jarg1_, int jarg2)
static final native int[] Conopt_getConstraintBasisStatus(long jarg1, Conopt jarg1_)
static final native void Conopt_loadModel(long jarg1, Conopt jarg1_, long jarg2, ConoptModelData jarg2_)
static final native int Conopt_solutionStatus(long jarg1, Conopt jarg1_)
static final native int[] Conopt_version()
static final native int Conopt_setMaxHeap(long jarg1, Conopt jarg1_, double jarg2)
static final native long Conopt_controlVector(long jarg1, Conopt jarg1_)
static final native int Conopt_allowEmptyRow(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_fVforAll(long jarg1, Conopt jarg1_, int jarg2)
static final native int Conopt_setThreadS(long jarg1, Conopt jarg1_, int jarg2)
program fvforall
Main program. A simple setup and call of CONOPT.
Definition fvforall.f90:14
program fvinclin
Main program. A simple setup and call of CONOPT.
Definition fvinclin.f90:14
int sendMessage(String msg)
Definition Conopt.java:290
void setMessageHandler(MessageHandler msghandler)
Definition Conopt.java:278
void setVerbosityLevel(int verblevel)
Definition Conopt.java:308
void loadModel(ConoptModelData modeldata)
Definition Conopt.java:144
int disCont(int discont)
allow discontinuous functions and derivatives.
Definition Conopt.java:452
int setResLim(double reslim)
define resource limit.
Definition Conopt.java:474
int setThread2D(int thread2d)
number of threads allowed for simultaneous 2DDir calls.
Definition Conopt.java:518
int debug2D(int debug2d)
turn debugging of 2nd derivatives on and off.
Definition Conopt.java:441
int allowEmptyRow(int emptyrow)
allow empty rows.
Definition Conopt.java:419
int setThreadF(int threadf)
number of threads allowed for simultaneous FDEval calls.
Definition Conopt.java:507
int setMaxSup(int maxsup)
limit on superbasics.
Definition Conopt.java:408
int squareModel(int square)
square models.
Definition Conopt.java:342
int setLicense(int licint1, int licint2, int licint3, String licstring)
define the License Information.
Definition Conopt.java:353
int allowEmptyCol(int emptycol)
allow empty columns.
Definition Conopt.java:430
int clearM(int clearm)
ClearM.
Definition Conopt.java:463
int debugFV(int debugfv)
turn Debugging of FDEval on and off.
Definition Conopt.java:331
int setMaxHeap(double maxheap)
define Limit on Heap Memory.
Definition Conopt.java:485
int setItLim(int itlim)
define the Iteration Limit.
Definition Conopt.java:364
int setErrLim(int errlim)
define the Error Limit.
Definition Conopt.java:375
int setThreadC(int threadc)
check for thread compatibility.
Definition Conopt.java:529
int setThreadS(int threads)
number of threads allowed internally in CONOPT.
Definition Conopt.java:496
int fVforAll(int fvforall)
call the FDEval for all constraints, including linear constraints.
Definition Conopt.java:397
int fVincLin(int fvinclin)
include the linear terms in function evaluations.
Definition Conopt.java:386
double[] getVariableMarginals()
Definition Conopt.java:203
int[] getConstraintBasisStatus()
Definition Conopt.java:253
int[] getConstraintStatus()
Definition Conopt.java:263
double[] getVariableValues()
Definition Conopt.java:193
int[] getVariableBasisStatus()
Definition Conopt.java:213
double objectiveValue()
Definition Conopt.java:183
int solutionStatus()
Definition Conopt.java:163
int iterations()
Definition Conopt.java:173
double[] getConstraintValues()
Definition Conopt.java:233
double[] getConstraintMarginals()
Definition Conopt.java:243
int[] getVariableStatus()
Definition Conopt.java:223
int getRangeErrors()
Definition Conopt.java:564
int getMaxThreads()
Definition Conopt.java:544
static int[] version()
Definition Conopt.java:320
int solve()
method for starting the solving process of CONOPT.
Definition Conopt.java:89
double getMaxHeapUsed()
Definition Conopt.java:554
String getName()
Definition Conopt.java:129
void printStatus()
Definition Conopt.java:119
SWIGTYPE_p_coiHandle_t controlVector()
Definition Conopt.java:109
program square
Main program. A simple setup and call of CONOPT.
Definition square.f90:17