Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
solve_flow_model.cc File Reference
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <sstream>
#include <string>
#include <vector>
#include "absl/base/log_severity.h"
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/log/globals.h"
#include "absl/log/log.h"
#include "absl/strings/match.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "ortools/base/filesystem.h"
#include "ortools/base/helpers.h"
#include "ortools/base/init_google.h"
#include "ortools/base/options.h"
#include "ortools/base/path.h"
#include "ortools/base/timer.h"
#include "ortools/graph/flow_graph.h"
#include "ortools/graph/flow_problem.pb.h"
#include "ortools/graph/generic_max_flow.h"
#include "ortools/graph/graph.h"
#include "ortools/graph/min_cost_flow.h"
#include "ortools/util/file_util.h"
#include "ortools/util/filelineiter.h"
#include "ortools/util/stats.h"

Go to the source code of this file.

Classes

class  FlowModelProto
class  TimeDistribution

Namespaces

namespace  operations_research
 OR-Tools root namespace.

Typedefs

typedef util::ReverseArcStaticGraph operations_research::Graph

Functions

 ABSL_FLAG (std::string, input, "", "Input file of the problem.")
 ABSL_FLAG (std::string, output_dimacs, "", "Output problem as a dimacs file.")
 ABSL_FLAG (std::string, output_proto, "", "Output problem as a flow proto.")
 ABSL_FLAG (bool, use_flow_graph, true, "Use special kind of graph.")
 ABSL_FLAG (bool, sort_heads, false, "Sort outgoing arcs by head.")
 ABSL_FLAG (bool, detect_reverse_arcs, true, "Detect reverse arcs.")
void operations_research::ConvertFlowModelToDimacs (const FlowModelProto &flow_model, std::string *dimacs)
bool operations_research::ConvertDimacsToFlowModel (absl::string_view file, FlowModelProto *flow_model)
void operations_research::SolveMinCostFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time)
template<typename GraphType>
void operations_research::SolveMaxFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time, std::function< void(GraphType *graph)> configure_graph_options=nullptr)
int main (int argc, char **argv)
template<typename GraphType>
void SolveMaxFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time, std::function< void(GraphType *graph)> configure_graph_options=nullptr)
void SolveMinCostFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time)

Function Documentation

◆ ABSL_FLAG() [1/6]

ABSL_FLAG ( bool ,
detect_reverse_arcs ,
true ,
"Detect reverse arcs."  )

◆ ABSL_FLAG() [2/6]

ABSL_FLAG ( bool ,
sort_heads ,
false ,
"Sort outgoing arcs by head."  )

◆ ABSL_FLAG() [3/6]

ABSL_FLAG ( bool ,
use_flow_graph ,
true ,
"Use special kind of graph."  )

◆ ABSL_FLAG() [4/6]

ABSL_FLAG ( std::string ,
input ,
"" ,
"Input file of the problem."  )

◆ ABSL_FLAG() [5/6]

ABSL_FLAG ( std::string ,
output_dimacs ,
"" ,
"Output problem as a dimacs file."  )

◆ ABSL_FLAG() [6/6]

ABSL_FLAG ( std::string ,
output_proto ,
"" ,
"Output problem as a flow proto."  )

◆ main()

int main ( int argc,
char ** argv )

Definition at line 299 of file solve_flow_model.cc.

◆ SolveMaxFlow()

template<typename GraphType>
void operations_research::SolveMaxFlow ( const FlowModelProto & flow_model,
double * loading_time,
double * solving_time,
std::function< void(GraphType *graph)> configure_graph_options = nullptr )

Definition at line 234 of file solve_flow_model.cc.

◆ SolveMinCostFlow()

void operations_research::SolveMinCostFlow ( const FlowModelProto & flow_model,
double * loading_time,
double * solving_time )

Definition at line 186 of file solve_flow_model.cc.