Skip to content
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="crypto.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="cscvrptw.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csdiet.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csflow.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -106,19 +106,24 @@ public class CsIntegerProgramming
static void Main()
{
Console.WriteLine("---- Integer programming example with GLPK ----");
RunIntegerProgrammingExample("GLPK_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExample("GLPK");
Console.WriteLine("---- Linear programming example with CBC ----");
RunIntegerProgrammingExample("CBC_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExample("CBC");
Console.WriteLine("---- Linear programming example with SCIP ----");
RunIntegerProgrammingExample("SCIP_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExample("SCIP");
Console.WriteLine("---- Linear programming example with SAT ----");
RunIntegerProgrammingExample("SAT");
Console.WriteLine(
"---- Integer programming example (Natural API) with GLPK ----");
RunIntegerProgrammingExampleNaturalApi("GLPK_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExampleNaturalApi("GLPK");
Console.WriteLine(
"---- Linear programming example (Natural API) with CBC ----");
RunIntegerProgrammingExampleNaturalApi("CBC_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExampleNaturalApi("CBC");
Console.WriteLine(
"---- Linear programming example (Natural API) with SCIP ----");
RunIntegerProgrammingExampleNaturalApi("SCIP_MIXED_INTEGER_PROGRAMMING");
RunIntegerProgrammingExampleNaturalApi("SCIP");
Console.WriteLine(
"---- Linear programming example (Natural API) with SAT ----");
RunIntegerProgrammingExampleNaturalApi("SAT");
}
}
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csintegerprogramming.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csknapsack.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -18,6 +18,8 @@ public class CsLinearProgramming
{
private static void RunLinearProgrammingExample(String solverType)
{
Console.WriteLine($"---- Linear programming example with {solverType} ----");
Solver solver = Solver.CreateSolver("IntegerProgramming", solverType);
if (solver == null)
{
......@@ -96,6 +98,9 @@ public class CsLinearProgramming
private static void RunLinearProgrammingExampleNaturalApi(
String solverType, bool printModel)
{
Console.WriteLine(
$"---- Linear programming example (Natural API) with {solverType} ----");
Solver solver = Solver.CreateSolver("IntegerProgramming", solverType);
if (solver == null)
{
......@@ -157,20 +162,12 @@ public class CsLinearProgramming
static void Main()
{
Console.WriteLine("---- Linear programming example with GLOP ----");
RunLinearProgrammingExample("GLOP_LINEAR_PROGRAMMING");
Console.WriteLine("---- Linear programming example with GLPK ----");
RunLinearProgrammingExample("GLPK_LINEAR_PROGRAMMING");
Console.WriteLine("---- Linear programming example with CLP ----");
RunLinearProgrammingExample("CLP_LINEAR_PROGRAMMING");
Console.WriteLine(
"---- Linear programming example (Natural API) with GLOP ----");
RunLinearProgrammingExampleNaturalApi("GLOP_LINEAR_PROGRAMMING", true);
Console.WriteLine(
"---- Linear programming example (Natural API) with GLPK ----");
RunLinearProgrammingExampleNaturalApi("GLPK_LINEAR_PROGRAMMING", false);
Console.WriteLine(
"---- Linear programming example (Natural API) with CLP ----");
RunLinearProgrammingExampleNaturalApi("CLP_LINEAR_PROGRAMMING", false);
RunLinearProgrammingExample("GLOP");
RunLinearProgrammingExample("GLPK_LP");
RunLinearProgrammingExample("CLP");
RunLinearProgrammingExampleNaturalApi("GLOP", true);
RunLinearProgrammingExampleNaturalApi("GLPK_LP", false);
RunLinearProgrammingExampleNaturalApi("CLP", false);
}
}
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="cslinearprogramming.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csls_api.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="csrabbitspheasants.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="cstsp.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="curious_set_of_integers.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="debruijn.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="discrete_tomography.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="divisible_by_9_through_1.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="dudeney.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="einav_puzzle2.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="eq10.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>
......@@ -19,6 +19,6 @@
<ItemGroup>
<Compile Include="eq20.cs" />
<PackageReference Include="Google.OrTools" Version="7.7.*" />
<PackageReference Include="Google.OrTools" Version="7.8.*" />
</ItemGroup>
</Project>