Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
contrib
JavaInterface
org
coinor
examples
scalable
Scalable.java
Go to the documentation of this file.
1
9
package
org.coinor.examples.scalable;
10
11
import
org.coinor.Ipopt;
12
23
public
abstract
class
Scalable
extends
Ipopt
24
{
25
// Problem sizes
26
int
n;
27
int
m;
28
int
nnz_jac_g;
29
int
nnz_h_lag;
30
31
// The bounds
32
double
x_l[], x_u[];
33
double
g_l[], g_u[];
34
35
// the index style
36
int
index_style;
37
38
// The initial guess and solution
39
double
x[];
40
41
private
String
name
;
42
43
protected
double
gl
;
44
protected
double
gu
;
45
51
public
Scalable
(String
name
,
double
gl
,
double
gu
)
52
{
53
this.name =
name
;
54
this.gl =
gl
;
55
this.gu =
gu
;
56
}
57
58
public
String
toString
()
59
{
60
return
name
;
61
}
62
71
abstract
public
boolean
initialize
(
int
n);
72
76
public
void
create
()
77
{
78
super.create(n, m, nnz_jac_g, nnz_h_lag, index_style);
79
}
80
81
public
double
[]
getInitialGuess
()
82
{
83
return
x;
84
}
85
86
public
void
print
(
double
[] x, String str)
87
{
88
System.out.println(str);
89
for
(
int
i = 0; i < x.length; ++i )
90
System.out.println(x[i]);
91
System.out.println();
92
}
93
}
Generated on Mon Oct 21 2013 19:08:14 for Ipopt by
1.8.4