PPL Configured Java Language Interface  1.2
PIP_Problem.java
Go to the documentation of this file.
1 /* PIP_Problem Java class declaration and implementation.
2  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
3  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
4 
5 This file is part of the Parma Polyhedra Library (PPL).
6 
7 The PPL is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 The PPL is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
20 
21 For the most up-to-date information see the Parma Polyhedra Library
22 site: http://bugseng.com/products/ppl/ . */
23 
24 
25 package parma_polyhedra_library;
26 
28 
94 public class PIP_Problem extends PPL_Object {
95 
97 
110  public PIP_Problem(long dim) {
111  build_cpp_object(dim);
112  }
113 
115 
120  public PIP_Problem(long dim, Constraint_System cs, Variables_Set params) {
121  build_cpp_object(dim, cs, params);
122  }
123 
126  build_cpp_object(y);
127  }
128 
133  public native void free();
134 
136  protected native void finalize();
137  /* Constructors and Destructor */
139 
141 
143  public native long max_space_dimension();
145 
147  public native long space_dimension();
148 
150  public native long number_of_parameter_space_dimensions();
151 
156 
158  public native long get_big_parameter_dimension();
159 
164  public native long number_of_constraints();
165 
170  public native Constraint constraint_at_index(long dim);
171 
173  public native Constraint_System constraints();
174 
176  public native String ascii_dump();
177 
179  public native String toString();
180 
185  public native long total_memory_in_bytes();
186 
191  public native long external_memory_in_bytes();
192 
198  public native boolean OK();
199  /* Functions that Do Not Modify the MIP_Problem */
201 
202 
204 
206 
210  public native void clear();
211 
212 
230  public native void add_space_dimensions_and_embed(long pip_vars,
231  long pip_params);
232 
237  public native void add_to_parameter_space_dimensions(Variables_Set vars);
238 
242  public native void set_big_parameter_dimension(long d);
243 
251  public native void add_constraint(Constraint c);
252 
261  public native void add_constraints(Constraint_System cs);
262  /* Functions that May Modify the PIP_Problem */
264 
266 
268 
273  public native boolean is_satisfiable();
274 
276 
285  public native PIP_Problem_Status solve();
286 
288  public native PIP_Tree_Node solution();
289 
291  public native PIP_Tree_Node optimizing_solution();
292  /* Computing the Solution of the PIP_Problem */
294 
296 
304 
308  public native void set_pip_problem_control_parameter
310  /* Querying/Setting Control Parameters */
312 
314  private native void build_cpp_object(long dim);
315 
317  private native void build_cpp_object(long dim,
319  Variables_Set vars);
320 
322  private native void build_cpp_object(PIP_Problem y);
323 }
A node of the PIP solution tree.
A java.util.TreeSet of variables' indexes.
native void set_big_parameter_dimension(long d)
Sets the big parameter dimension of PIP problem to d.
native void finalize()
Releases all resources managed by this.
native long space_dimension()
Returns the space dimension of the PIP problem.
native PIP_Problem_Control_Parameter_Value get_pip_problem_control_parameter(PIP_Problem_Control_Parameter_Name name)
Returns the value of control parameter name.
value
native long number_of_parameter_space_dimensions()
Returns the number of parameter space dimensions of the PIP problem.
native Variables_Set parameter_space_dimensions()
Returns all the parameter space dimensions of problem pip.
native boolean is_satisfiable()
Checks satisfiability of this.
native void free()
Releases all resources managed by this, also resetting it to a null reference.
native void add_space_dimensions_and_embed(long pip_vars, long pip_params)
Adds pip_vars + pip_params new space dimensions and embeds the PIP problem in the new vector space...
PIP_Problem(long dim, Constraint_System cs, Variables_Set params)
Builds a PIP problem from a sequence of constraints.
native void add_constraint(Constraint c)
Adds a copy of constraint c to the PIP problem.
native PIP_Tree_Node optimizing_solution()
Returns an optimizing solution for the PIP problem, if it exists.
native String toString()
Returns a string representation of this.
native long total_memory_in_bytes()
Returns the size in bytes of the memory occupied by the underlying C++ object.
native PIP_Problem_Status solve()
Optimizes the PIP problem.
PIP_Problem(PIP_Problem y)
Builds a copy of y.
native Constraint constraint_at_index(long dim)
Returns the i-th constraint defining the feasible region of the PIP problem pip.
native long max_space_dimension()
Returns the maximum space dimension an PIP_Problem can handle.
native void set_pip_problem_control_parameter(PIP_Problem_Control_Parameter_Value value)
Sets control parameter value.
native void build_cpp_object(long dim)
Builds the underlying C++ object.
Smart pointer to a PPL, C++ object.
Definition: PPL_Object.java:32
native void add_constraints(Constraint_System cs)
Adds a copy of the constraints in cs to the PIP problem.
native void clear()
Resets this to be equal to the trivial PIP problem.
native PIP_Tree_Node solution()
Returns a solution for the PIP problem, if it exists.
native long number_of_constraints()
Returns the number of constraints defining the feasible region of pip.
native long get_big_parameter_dimension()
Returns the big parameter dimension of PIP problem pip.
native long external_memory_in_bytes()
Returns the size in bytes of the memory managed by the underlying C++ object.
PIP_Problem(long dim)
Builds a trivial PIP problem.
native Constraint_System constraints()
Returns the constraints .
A Parametric Integer Programming problem.
native void add_to_parameter_space_dimensions(Variables_Set vars)
Sets the space dimensions in vars to be parameter dimensions of the PIP problem.
native String ascii_dump()
Returns an ascii formatted internal representation of this.
Possible outcomes of the PIP_Problem solver.
native boolean OK()
Returns true if the pip problem is well formed, i.e., if it satisfies all its implementation invarian...
A linear equality or inequality.
Definition: Constraint.java:33