Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ examples/ cpp/

or-tools/examples/cpp/multidim_knapsack.cc File Reference

#include <cstdio>
#include <cstdlib>
#include "base/commandlineflags.h"
#include "base/integral_types.h"
#include "base/logging.h"
#include "base/stringprintf.h"
#include "base/strtoint.h"
#include "base/file.h"
#include "base/filelinereader.h"
#include "base/split.h"
#include "constraint_solver/constraint_solver.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Classes

class  operations_research::MultiDimKnapsackData
 Data. More...

Functions

 DEFINE_string (data_file,"","Required: input file description the muldi-dimensional knapsack problem\n ""to solve. It supports two file format as described in:\n"" - http:///elib.zib.de/pub/Packages/mp-testdata/ip/sac94-suite/readme\n"" - http:///hces.bus.olemiss.edu/tools.html\n")
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 DEFINE_int32 (time_limit_in_ms, 0,"Time limit in ms, <= 0 means no limit.")
 DEFINE_int32 (simplex_frequency, 0,"Number of nodes explored between each"" call to the simplex optimizer.")
 DEFINE_bool (display_search_log, true,"Display search log.")
int64 operations_research::EvaluateItem (MultiDimKnapsackData *const data, int64 var, int64 val)
void operations_research::SolveKnapsack (MultiDimKnapsackData *const data)
int main (int argc, char **argv)

Variables

static const char kUsage []
 namespace operations_research


Function Documentation

DEFINE_bool ( display_search_log  ,
true  ,
"Display search log."   
)

DEFINE_int32 ( simplex_frequency  ,
,
"Number of nodes explored between each"" call to the simplex optimizer."   
)

DEFINE_int32 ( time_limit_in_ms  ,
,
"Time limit in   ms,
<=0 means no limit."   
)

DEFINE_string ( data_file  ,
""   
)

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

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.

This model implements a multidimensional knapsack problem.

int main ( int  argc,
char **  argv 
)

Definition at line 323 of file multidim_knapsack.cc.


Variable Documentation

const char kUsage[] [static]

Initial value:

    "Usage: see flags.\n"
    "This program runs a multi-dimensional knapsack problem."
namespace operations_research

Definition at line 319 of file multidim_knapsack.cc.