Fixup F# examples

This commit is contained in:
Corentin Le Molgat
2018-09-07 15:46:20 +02:00
parent 401067ea87
commit 0ba343e0cd
44 changed files with 2155 additions and 344 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,48 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp\a_puzzle.csproj", "{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsharp", "fsharp\Program.fsproj", "{B0E80F2F-BDB3-4688-8E27-5678173DC28C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|x64.ActiveCfg = Debug|x64
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|x64.Build.0 = Debug|x64
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|x86.ActiveCfg = Debug|x86
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Debug|x86.Build.0 = Debug|x86
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|Any CPU.Build.0 = Release|Any CPU
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|x64.ActiveCfg = Release|x64
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|x64.Build.0 = Release|x64
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|x86.ActiveCfg = Release|x86
{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}.Release|x86.Build.0 = Release|x86
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|x64.ActiveCfg = Debug|x64
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|x64.Build.0 = Debug|x64
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|x86.ActiveCfg = Debug|x86
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Debug|x86.Build.0 = Debug|x86
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|Any CPU.Build.0 = Release|Any CPU
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|x64.ActiveCfg = Release|x64
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|x64.Build.0 = Release|x64
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|x86.ActiveCfg = Release|x86
{B0E80F2F-BDB3-4688-8E27-5678173DC28C}.Release|x86.Build.0 = Release|x86
EndGlobalSection
EndGlobal

View File

@@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="diet.cs" />
<Compile Include="csdiet.cs" />
<PackageReference Include="Google.OrTools" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="equality-inequality.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<Compile Include="fsProgram.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@
(*
Copyright 2012 Hakan Kjellerstrand
Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,19 +12,10 @@
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.
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.ConstraintSolver
let solver = new Solver("Diet");
let price = [|50; 20; 30; 80|] // in cents

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="volsay.fs" />
<Compile Include="fsdiet.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -17,16 +17,8 @@
var[4] : 0.000000
Note: When entering the matrix, it is reduced to standard form with appropriate slack variables.
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.FSharp
@@ -41,4 +33,3 @@ let opts = SolverOpts.Default
let slvrCLP = opts.Algorithm(LP CLP) |> lpSolve |> SolverSummary
let slvrGLOP = opts.Algorithm(LP GLOP) |> lpSolve |> SolverSummary

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsequality-inequality.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -15,16 +15,8 @@
x[2] : 0.000000
x[3] : 0.000000
x[4] : 1.000000
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.FSharp

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="knapsack.fs" />
<Compile Include="fsequality.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,6 @@
And x[0] <= 1, x[1] <= 1, x[2] <= 4, x[3] <= 2
Answer:
Integer Program Solution
@@ -22,7 +21,6 @@
Advanced usage:
Problem solved in 0 branch-and-bound nodes
Linear Program Solution
Problem solved in 2 milliseconds
@@ -35,13 +33,6 @@
var[3] : 0.888889
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.FSharp
let opts = SolverOpts.Default

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsinteger-linear-program.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -11,13 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.FSharp
open Google.OrTools.LinearSolver

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="csintegerprogramming.fs" />
<Compile Include="fsintegerprogramming.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@
(*
Copyright 2010-2017 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -12,16 +11,8 @@ distributed under the License is distributed on an "AS IS" BASIS,
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.
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.FSharp
let profits = [ 360L; 83L; 59L; 130L; 431L; 67L; 230L; 52L; 93L; 125L; 670L; 892L; 600L; 38L; 48L; 147L; 78L; 256L; 63L; 17L; 120L; 164L; 432L; 35L; 92L; 110L; 22L; 42L; 50L; 323L; 514L; 28L; 87L; 73L; 78L; 15L; 26L; 78L; 210L; 36L; 85L; 189L; 274L; 43L; 33L; 10L; 19L; 389L; 276L; 312L ]

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsknapsack.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -11,17 +11,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.LinearSolver
open Google.OrTools.FSharp
open Google.OrTools.LinearSolver
let solver solverType =
let svr = Solver.CreateSolver("IntegerProgramming", solverType.ToString())

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="cslinearprogramming.fs" />
<Compile Include="fslinearprogramming.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -22,13 +22,6 @@
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.FSharp
let opts = SolverOpts.Default

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsnetwork-max-flow-lpSolve.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@
(*
Copyright 2010-2017 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,16 +24,8 @@
Arc 7 (4 -> 3), capacity=6, computed=0, expected=0
Arc 8 (5 -> 3), capacity=6, computed=6, expected=6
Arc 9 (5 -> 4), capacity=4, computed=4, expected=4
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.Graph
open Google.OrTools.FSharp

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsnetwork-max-flow.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,9 +1,17 @@
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
(*
Copyright 2010-2017 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.
*)
open Google.OrTools.Graph
open Google.OrTools.FSharp

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsnetwork-min-cost-flow.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,10 +1,8 @@
(* Here is a very simple Constraint Programming problem:
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
Knowing that we see 56 legs and 20 heads, how many pheasants and rabbits
are we looking at ?
*)
open Google.OrTools.ConstraintSolver
@@ -33,4 +31,4 @@ solver.NewSearch(db)
while (solver.NextSolution()) do
printfn "rabbits: %d, pheasants: %d" (r.Value()) (p.Value())
solver.EndSearch()
solver.EndSearch()

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsrabbit-pheasant.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -13,13 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.FSharp
open Google.OrTools.LinearSolver
@@ -57,5 +50,4 @@ let solver (solverType:LinearProgramming) =
printfn "c1 : DualValue: %f" (c1.DualValue())
printfn "c2 : DualValue: %f" (c2.DualValue())
solver LinearProgramming.CLP

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="equality.fs" />
<Compile Include="fsvolsay.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@
(*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -11,16 +10,8 @@
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.
*)
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open Google.OrTools.FSharp
let opts = SolverOpts.Default
@@ -34,4 +25,4 @@ let opts = SolverOpts.Default
.Algorithm(LP CLP)
let slvr = opts |> lpSolve |> SolverSummary
slvr |> ignore
slvr |> ignore

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="fsvolsay3-lpSolve.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,3 @@
//
// Copyright 2012 Hakan Kjellerstrand
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,13 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#I "../../bin"
#I "./packages/NETStandard.Library.2.0.2/build/netstandard2.0/ref"
#r "Google.OrTools.dll"
#r "Google.OrTools.FSharp.dll"
#r "netstandard.dll"
open System
open Google.OrTools.FSharp
open Google.OrTools.LinearSolver

View File

@@ -13,7 +13,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="diet.fs" />
<Compile Include="fsvolsay3.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="integer-linear-program.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="network-max-flow-lpSolve.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="network-max-flow.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="network-min-cost-flow.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="rabbit-pheasant.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="volsay3-lpSolve.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<RestoreSources>../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<ItemGroup>
<Compile Include="volsay3.fs" />
<PackageReference Include="Google.OrTools.FSharp" Version="6.8.*" />
</ItemGroup>
</Project>

View File

@@ -401,10 +401,10 @@ test_dotnet_fsharp: $(DOTNET_ORTOOLS_FSHARP_NUPKG) \
#############################
## .NET Examples/Samples ##
#############################
.PHONY: test_donet_examples # Build and Run all .Net Examples (located in examples/dotnet)
test_dotnet_examples: test_donet_examples_csharp test_donet_examples_fsharp
.PHONY: test_dotnet_examples # Build and Run all .Net Examples (located in examples/dotnet)
test_dotnet_examples: test_dotnet_examples_csharp test_dotnet_examples_fsharp
.PHONY: test_donet_examples_csharp # Build and Run all CSharp Examples (located in examples/dotnet)
.PHONY: test_dotnet_examples_csharp # Build and Run all CSharp Examples (located in examples/dotnet)
test_dotnet_examples_csharp: $(DOTNET_ORTOOLS_NUPKG)
$(MAKE) rdotnet_3_jugs_regular
$(MAKE) rdotnet_alldifferent_except_0
@@ -438,7 +438,7 @@ test_dotnet_examples_csharp: $(DOTNET_ORTOOLS_NUPKG)
$(MAKE) rdotnet_cstsp
$(MAKE) rdotnet_curious_set_of_integers
$(MAKE) rdotnet_debruijn
$(MAKE) rdotnet_diet
$(MAKE) rdotnet_csdiet
$(MAKE) rdotnet_discrete_tomography
$(MAKE) rdotnet_divisible_by_9_through_1
$(MAKE) rdotnet_dudeney
@@ -530,23 +530,23 @@ endif
$(MAKE) rdotnet_young_tableaux
$(MAKE) rdotnet_zebra
.PHONY: test_donet_examples_fsharp # Build and Run all FSharp Samples (located in examples/dotnet)
.PHONY: test_dotnet_examples_fsharp # Build and Run all FSharp Samples (located in examples/dotnet)
test_dotnet_examples_fsharp: $(DOTNET_ORTOOLS_FSHARP_NUPKG)
$(MAKE) rdotnet_csintegerprogramming
$(MAKE) rdotnet_cslinearprogramming
$(MAKE) rdotnet_diet
$(MAKE) rdotnet_equality
$(MAKE) rdotnet_equality-inequality
$(MAKE) rdotnet_integer-linear-program
$(MAKE) rdotnet_knapsack
$(MAKE) rdotnet_network-max-flow
$(MAKE) rdotnet_network-max-flow-lpSolve
$(MAKE) rdotnet_network-min-cost-flow
$(MAKE) rdotnet_Program
$(MAKE) rdotnet_rabbit-pheasant
$(MAKE) rdotnet_volsay3
$(MAKE) rdotnet_volsay3-lpSolve
$(MAKE) rdotnet_volsay
$(MAKE) rdotnet_fsintegerprogramming
$(MAKE) rdotnet_fslinearprogramming
$(MAKE) rdotnet_fsdiet
$(MAKE) rdotnet_fsequality
$(MAKE) rdotnet_fsequality-inequality
$(MAKE) rdotnet_fsinteger-linear-program
$(MAKE) rdotnet_fsknapsack
$(MAKE) rdotnet_fsnetwork-max-flow
$(MAKE) rdotnet_fsnetwork-max-flow-lpSolve
$(MAKE) rdotnet_fsnetwork-min-cost-flow
$(MAKE) rdotnet_fsProgram
$(MAKE) rdotnet_fsrabbit-pheasant
$(MAKE) rdotnet_fsvolsay3
$(MAKE) rdotnet_fsvolsay3-lpSolve
$(MAKE) rdotnet_fsvolsay
.PHONY: test_donet_samples # Build and Run all .Net Samples (located in ortools/*/samples)
test_dotnet_samples: $(DOTNET_ORTOOLS_NUPKG)

View File

@@ -11,6 +11,18 @@ fi
# shellcheck disable=SC1090
. "${DIR}/../Version.txt"
###############
## Cleanup ##
###############
rm -rf examples/dotnet/bin examples/dotnet/obj
echo "Remove prevous .*proj .sln files..."
rm -f examples/dotnet/*.*proj
rm -f examples/dotnet/*.sln
echo "Remove prevous .*proj files...DONE"
##############
## CSHARP ##
##############
for FILE in examples/dotnet/*.cs; do
# if no files found do nothing
[ -e "$FILE" ] || continue
@@ -42,6 +54,9 @@ EOL
echo "Generate $PROJ...DONE"
done
##############
## CSHARP ##
##############
for FILE in examples/dotnet/*.fs; do
# if no files found do nothing
[ -e "$FILE" ] || continue
@@ -72,7 +87,9 @@ EOL
echo "Generate $PROJ...DONE"
done
# Samples
###############
## Samples ##
###############
for FILE in ortools/sat/samples/*.cs; do
# if no files found do nothing
[ -e "$FILE" ] || continue
@@ -103,4 +120,17 @@ for FILE in ortools/sat/samples/*.cs; do
EOL
echo "Generate $PROJ...DONE"
done
###########
## SLN ##
###########
SLN=Google.OrTools.Examples.sln
echo "Generate ${SLN}..."
cd examples/dotnet
dotnet new sln -n ${SLN%.sln}
for i in *.*proj; do
dotnet sln ${SLN} add "$i"
done
echo "Generate ${SLN}...DONE"
# vim: set tw=0 ts=2 sw=2 expandtab: