@@ -10,24 +10,16 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
package com.google.ortools.java;
|
||||
|
||||
package com.google.ortools.examples;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.linearsolver.MPConstraint;
|
||||
import com.google.ortools.linearsolver.MPObjective;
|
||||
import com.google.ortools.linearsolver.MPSolver;
|
||||
import com.google.ortools.linearsolver.MPVariable;
|
||||
|
||||
/**
|
||||
* Integer programming example that shows how to use the API.
|
||||
*
|
||||
*/
|
||||
|
||||
/** Integer programming example that shows how to use the API. */
|
||||
public class IntegerProgramming {
|
||||
static {
|
||||
System.loadLibrary("jniortools");
|
||||
}
|
||||
|
||||
private static void runIntegerProgrammingExample(String solverType) {
|
||||
MPSolver solver = MPSolver.createSolver(solverType);
|
||||
if (solver == null) {
|
||||
@@ -79,6 +71,7 @@ public class IntegerProgramming {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Loader.loadNativeLibraries();
|
||||
System.out.println("---- Integer programming example with SCIP (recommended) ----");
|
||||
runIntegerProgrammingExample("SCIP");
|
||||
System.out.println("---- Integer programming example with CBC ----");
|
||||
|
||||
Reference in New Issue
Block a user