Skip to content
Snippets Groups Projects
Commit e4813070 authored by Paul A. Rubin's avatar Paul A. Rubin
Browse files

Renamed "Model" class "MIP".

parent ee85a5f0
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import ilog.concert.IloNumVar;
import ilog.cplex.IloCplex;
/**
* Model provides an optimization model to solve the logic puzzle.
* MIP provides an optimization model to solve the logic puzzle.
*
* The model captures trips between the "near" bank (starting point) and
* "far" bank (destination). At time 0, the farmer is on the near bank with
......@@ -14,7 +14,7 @@ import ilog.cplex.IloCplex;
*
* @author Paul A. Rubin (rubin@msu.edu)
*/
public final class Model implements AutoCloseable {
public final class MIP implements AutoCloseable {
// Item indices.
private static final int WOLF = 0;
private static final int GOAT = 1;
......@@ -46,7 +46,7 @@ public final class Model implements AutoCloseable {
* Constructor.
* @throws IloException if the model instance cannot be created
*/
public Model() throws IloException {
public MIP() throws IloException {
// Instantiate the model.
cplex = new IloCplex();
// Create the variables.
......
......@@ -18,7 +18,7 @@ public final class WolfGoatCabbage {
* @param args the command line arguments (ignored)
*/
public static void main(final String[] args) {
try (Model model = new Model()) {
try (MIP model = new MIP()) {
double z = model.solve();
System.out.println("Optimal number of trips = " + z + ".");
System.out.println("Solution:");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment