//================================================================================================== // P r o g r a m Java // S o l v e _ t e n s i o n // W r a p p e r // By Bruno Bachelet //================================================================================================== // Copyright (c) 1999-2016 // Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net // // This file is part of the B++ Library. This library is free software; you can redistribute it // and/or modify it under the terms of the GNU Library General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your option) any later // version. // // This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See // the GNU Library General Public License for more details (http://www.gnu.org).
/*DESCRIPTION*/ /* This module provides a Java class to execute C++ methods of the program. */
// Package //--------------------------------------------------------------------------------------- package bpp.program.solve_tension;
// Importation //----------------------------------------------------------------------------------- import bpp.graph.*; import java.io.*;
// W r a p p e r Class //-------------------------------------------------------------------------- /*CLASS Wrapper */ /* Encapsulates the call to C++ methods of the program inside Java native methods. */ public class Wrapper { //-------------------------------------------------------------------------------Symbolic Constants /*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the "aggregation" technique. Method I is used to decompose the graph into serial-parallel components. */ // extern_static_constant(public,int,?,AGGREGATION_1_METHOD); public final static int AGGREGATION_1_METHOD = 1;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the "aggregation" technique. Method II is used to decompose the graph into serial-parallel components. */ // extern_static_constant(public,int,?,AGGREGATION_2_METHOD); public final static int AGGREGATION_2_METHOD = 2;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the "aggregation" technique. Method III is used to decompose the graph into serial-parallel components. */ // extern_static_constant(public,int,?,AGGREGATION_3_METHOD); public final static int AGGREGATION_3_METHOD = 3;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the dual cost-scaling technique. */ // extern_static_constant(public,int,?,DUAL_COST_SCALING_METHOD); public final static int DUAL_COST_SCALING_METHOD = 4;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the "conforming" technique (method I). */ // extern_static_constant(public,int,?,LINEAR_CONFORMING_1_METHOD); public final static int LINEAR_CONFORMING_1_METHOD = 5;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with the "conforming" technique (method II). */ // extern_static_constant(public,int,?,LINEAR_CONFORMING_2_METHOD); public final static int LINEAR_CONFORMING_2_METHOD = 6;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with a linear solver using modeling I. */ // extern_static_constant(public,int,?,LINEAR_PROGRAMMING_1_METHOD); public final static int LINEAR_PROGRAMMING_1_METHOD = 7;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with a linear solver using modeling II. */ // extern_static_constant(public,int,?,LINEAR_PROGRAMMING_2_METHOD); public final static int LINEAR_PROGRAMMING_2_METHOD = 8;
/*CONSTANT*/ /* Symbolic constant that represents the algorithm to solve a minimum linear cost tension problem with a linear solver using modeling III. */ // extern_static_constant(public,int,?,LINEAR_PROGRAMMING_3_METHOD); public final static int LINEAR_PROGRAMMING_3_METHOD = 9; //---------------------------------------------------------------------------------------WriteGraph /*AMETHOD Wrapper */ /* Writes the state of a graph into the display of the library. <CODE>false</CODE> is returned if any error occurs. */ public native static boolean writeGraph(JavaGraph agGraph); // //------------------------------------------------------------------------------RunLinearCostSolver /*AMETHOD Wrapper */ /* Runs an optimization method to solve the synchronization problem described by the given graph. The durations of the media objects can be flexible (i.e. of class <CODE>TF_FlexibleDuration</CODE> in module <CODE>formatter.model.time</CODE>) or unflexible with linear costs (i.e. of class <CODE>TF_LinearCostFunctionDuration</CODE> in module <CODE>formatter.model.time</CODE>). The last argument is the symbolic constant representing the method to use for the resolution. <CODE>true</CODE> is returned if the problem has been solved. */ public native static boolean runLinearCostSolver(JavaGraph agGraph,int agMethod); // }
// End //------------------------------------------------------------------------------------------- |
|