Ipopt 3.11.9
Loading...
Searching...
No Matches
Scalable.java
Go to the documentation of this file.
1
9package org.coinor.examples.scalable;
10
11import org.coinor.Ipopt;
12
23public 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}
Number * x
Input: Starting point Output: Optimal solution.
Number Number Index m
Number of constraints.
Number Number Index Number Number Index Index Index index_style
indexing style for iRow & jCol, 0 for C style, 1 for Fortran style
Abstract class for the scalable problems.
Definition Scalable.java:24
abstract boolean initialize(int n)
In this function all problem sizes, bounds and initial guess should be initialized.
void print(double[] x, String str)
Definition Scalable.java:86
Scalable(String name, double gl, double gu)
Definition Scalable.java:51
void create()
Creates the problem based on the already computed problem sizes and bounds.
Definition Scalable.java:76