'How to use Google's "SimpleMinCostFlow" - C#
I want to create a Max Flow - Min Cost program in C# -Visual studio. I'm using this Guide , but I get error at this line
MinCostFlow minCostFlow = new MinCostFlow();
I'm sure I have to add a library at the using
part
(near those: using System.Windows.Forms;)
,but I can't find the name of what library I should add. Do I need to install an special google package?
As the guide specifies, I need the following functions to work.
SimpleMinCostFlow methods:
AddArcWithCapacityAndUnitCost()
SetNodeSupply()
Head()
NumArcs()
NumNodes()
MaximumFlow()
OptimalCost()
Solve()
SolveMaxFlowWithMinCost()
Tail()
PS: Here is some more info about the functions (those are C++, but should provide useful info). Found this new info about StarGraph maybe it helps.
As user Milos Mrdovic specifies, I added using Google.OrTools.Graph;
, but it seems I am "missing an using directive or assembly reference" as you can see in the following picture enter image description here
Thank you,
Vlad
Solution 1:[1]
PROBLEM SOLVED !
Go to Tools -> NuGet Package Manager -> Package Manager Console
and type "Install-Package Google.OrTools
", hit enter. Credit to @Milos Mrdovic
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Vlad |