PPL Java Language Interface  1.2
MIP_Problem.java
Go to the documentation of this file.
1 /* MIP_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 
54 public class MIP_Problem extends PPL_Object {
55 
57 
59 
71  public MIP_Problem(long dim) {
72  build_cpp_object(dim);
73  }
74 
101  Optimization_Mode mode) {
102  build_cpp_object(dim, cs, obj, mode);
103  }
104 
107  build_cpp_object(y);
108  }
109 
114  public native void free();
115 
117  protected native void finalize();
118  /* Constructors and Destructor */
120 
122 
124  public native long max_space_dimension();
126 
128  public native long space_dimension();
129 
134  public native Variables_Set integer_space_dimensions();
135 
137  public native Constraint_System constraints();
138 
140  public native Linear_Expression objective_function();
141 
143  public native Optimization_Mode optimization_mode();
144 
146  public native String ascii_dump();
147 
149  public native String toString();
150 
155  public native long total_memory_in_bytes();
156 
158  public native boolean OK();
159  /* Functions that Do Not Modify the MIP_Problem */
161 
163 
165 
169  public native void clear();
170 
185  public native void add_space_dimensions_and_embed(long m);
186 
195  public native void add_to_integer_space_dimensions(Variables_Set i_vars);
196 
204  public native void add_constraint(Constraint c);
205 
214  public native void add_constraints(Constraint_System cs);
215 
217 
222  public native void set_objective_function(Linear_Expression obj);
223 
225  public native void set_optimization_mode(Optimization_Mode mode);
226  /* Functions that May Modify the MIP_Problem */
228 
230 
232 
237  public native boolean is_satisfiable();
238 
240 
245  public native MIP_Problem_Status solve();
246 
264  public native void evaluate_objective_function(Generator evaluating_point,
265  Coefficient num,
266  Coefficient den);
267 
269 
273  public native Generator feasible_point();
274 
276 
281  public native Generator optimizing_point();
282 
291  public native void optimal_value(Coefficient num, Coefficient den);
292  /* Computing the Solution of the MIP_Problem */
294 
296 
301  public native Control_Parameter_Value
303 
308  /* Querying/Setting Control Parameters */
310 
312  private native void build_cpp_object(long dim);
313 
315  private native void build_cpp_object(long dim,
317  Linear_Expression obj,
318  Optimization_Mode mode);
319 
321  private native void build_cpp_object(MIP_Problem y);
322 }
native void finalize()
Releases all resources managed by this.
native boolean OK()
Checks if all the invariants are satisfied.
A java.util.TreeSet of variables' indexes.
native long space_dimension()
Returns the space dimension of the MIP problem.
native void build_cpp_object(long dim)
Builds the underlying C++ object.
value
Possible values for MIP problem's control parameters.
Names of MIP problems' control parameters.
native void add_constraint(Constraint c)
Adds a copy of constraint c to the MIP problem.
native void set_objective_function(Linear_Expression obj)
Sets the objective function to obj.
native String ascii_dump()
Returns an ascii formatted internal representation of this.
MIP_Problem(long dim, Constraint_System cs, Linear_Expression obj, Optimization_Mode mode)
Builds an MIP problem having space dimension dim from the constraint system cs, the objective functio...
native void evaluate_objective_function(Generator evaluating_point, Coefficient num, Coefficient den)
Sets num and den so that is the result of evaluating the objective function on evaluating_point.
A line, ray, point or closure point.
Definition: Generator.java:36
native Control_Parameter_Value get_control_parameter(Control_Parameter_Name name)
Returns the value of control parameter name.
native long max_space_dimension()
Returns the maximum space dimension an MIP_Problem can handle.
native Generator feasible_point()
Returns a feasible point for this, if it exists.
Possible outcomes of the MIP_Problem solver.
Smart pointer to a PPL, C++ object.
Definition: PPL_Object.java:32
native void add_to_integer_space_dimensions(Variables_Set i_vars)
Sets the variables whose indexes are in set i_vars to be integer space dimensions.
native void optimal_value(Coefficient num, Coefficient den)
Sets num and den so that is the solution of the optimization problem.
MIP_Problem(MIP_Problem y)
Builds a copy of y.
native Generator optimizing_point()
Returns an optimal point for this, if it exists.
native String toString()
Returns a string representation of this.
A Mixed Integer (linear) Programming problem.
native long total_memory_in_bytes()
Returns the total size in bytes of the memory occupied by the underlying C++ object.
native void add_constraints(Constraint_System cs)
Adds a copy of the constraints in cs to the MIP problem.
native Constraint_System constraints()
Returns the constraints .
native void set_control_parameter(Control_Parameter_Value value)
Sets control parameter value.
native MIP_Problem_Status solve()
Optimizes the MIP problem.
native void clear()
Resets this to be equal to the trivial MIP problem.
native boolean is_satisfiable()
Checks satisfiability of this.
native void add_space_dimensions_and_embed(long m)
Adds m new space dimensions and embeds the old MIP problem in the new vector space.
native Linear_Expression objective_function()
Returns the objective function.
native Optimization_Mode optimization_mode()
Returns the optimization mode.
MIP_Problem(long dim)
Builds a trivial MIP problem.
native Variables_Set integer_space_dimensions()
Returns a set containing all the variables' indexes constrained to be integral.
native void free()
Releases all resources managed by this, also resetting it to a null reference.
A linear equality or inequality.
Definition: Constraint.java:33
native void set_optimization_mode(Optimization_Mode mode)
Sets the optimization mode to mode.