ModelBuilder C# class -> Model, ModelSolver c# class -> Solver to avoir name conflict between the class and the namespace
This commit is contained in:
@@ -31,7 +31,7 @@ public class AssignmentMb
|
||||
// [END data_model]
|
||||
|
||||
// [START model]
|
||||
ModelBuilder model = new ModelBuilder();
|
||||
Model model = new Model();
|
||||
// [END model]
|
||||
|
||||
// Variables.
|
||||
@@ -88,7 +88,7 @@ public class AssignmentMb
|
||||
|
||||
// [START solver]
|
||||
// Create the solver with the SCIP backend and check it is supported.
|
||||
ModelSolver solver = new ModelSolver("SCIP");
|
||||
Solver solver = new Solver("SCIP");
|
||||
if (!solver.SolverIsSupported())
|
||||
return;
|
||||
// [END solver]
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BinPackingMb
|
||||
// [END program_part1]
|
||||
|
||||
// [START model]
|
||||
ModelBuilder model = new ModelBuilder();
|
||||
Model model = new Model();
|
||||
// [END model]
|
||||
|
||||
// [START program_part2]
|
||||
@@ -85,7 +85,7 @@ public class BinPackingMb
|
||||
|
||||
// [START solver]
|
||||
// Create the solver with the SCIP backend and check it is supported.
|
||||
ModelSolver solver = new ModelSolver("SCIP");
|
||||
Solver solver = new Solver("SCIP");
|
||||
if (!solver.SolverIsSupported())
|
||||
return;
|
||||
// [END solver]
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SimpleMipProgramMb
|
||||
{
|
||||
// [START model]
|
||||
// Create the model builder.
|
||||
ModelBuilder model = new ModelBuilder();
|
||||
Model model = new Model();
|
||||
// [END model]
|
||||
|
||||
// [START variables]
|
||||
@@ -49,7 +49,7 @@ public class SimpleMipProgramMb
|
||||
// [Start clone]
|
||||
// Clone the model.
|
||||
Console.WriteLine("Cloning the model");
|
||||
ModelBuilder modelCopy = model.Clone();
|
||||
Model modelCopy = model.Clone();
|
||||
Variable xCopy = modelCopy.VarFromIndex(x.Index);
|
||||
Variable yCopy = modelCopy.VarFromIndex(y.Index);
|
||||
Variable zCopy = modelCopy.NewBoolVar("z");
|
||||
@@ -67,7 +67,7 @@ public class SimpleMipProgramMb
|
||||
|
||||
// [START solver]
|
||||
// Create the solver with the CP-SAT backend and checks it is supported.
|
||||
ModelSolver solver = new ModelSolver("sat");
|
||||
Solver solver = new Solver("sat");
|
||||
if (!solver.SolverIsSupported())
|
||||
return;
|
||||
// [END solver]
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SimpleLpProgramMb
|
||||
{
|
||||
// [START model]
|
||||
// Create the model builder.
|
||||
ModelBuilder model = new ModelBuilder();
|
||||
Model model = new Model();
|
||||
// [END model]
|
||||
|
||||
// [START variables]
|
||||
@@ -52,7 +52,7 @@ public class SimpleLpProgramMb
|
||||
|
||||
// [START solver]
|
||||
// Create the model solver with the GLOP backend.
|
||||
ModelSolver solver = new ModelSolver("GLOP");
|
||||
Solver solver = new Solver("GLOP");
|
||||
if (!solver.SolverIsSupported())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SimpleMipProgramMb
|
||||
{
|
||||
// [START model]
|
||||
// Create the model builder.
|
||||
ModelBuilder model = new ModelBuilder();
|
||||
Model model = new Model();
|
||||
// [END model]
|
||||
|
||||
// [START variables]
|
||||
@@ -52,7 +52,7 @@ public class SimpleMipProgramMb
|
||||
|
||||
// [START solver]
|
||||
// Create the model solver with the SCIP backend.
|
||||
ModelSolver solver = new ModelSolver("SCIP");
|
||||
Solver solver = new Solver("SCIP");
|
||||
if (!solver.SolverIsSupported())
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user