goodhobak / or-tools Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/or-tools
Automatically exported from code.google.com/p/or-tools
What steps will reproduce the problem?
1. Running tools\make all
What is the expected output? What do you see instead?
I was expecting to make all to produce the appropriate binaries. Instead I am
seeing the error
"src\linear_solver/linear_solver.h(680) : error C2512:
'operations_research::Coef
fMap' : no appropriate default constructor available
src\linear_solver/linear_solver.h(851) : error C2512: 'operations_research::Coef
fMap' : no appropriate default constructor available
tools\make: *** [objs/hybrid.obj] Error 2"
What version of the product are you using? On what operating system?
I am using Visual Studio Express 2012 to compile and I am on Windows 7.
Please provide any additional information below.
Is this possibly a compatibility issue with VS2012? The readme does not say the
source has been tested with VS2012.
Original issue reported on code.google.com by [email protected]
on 21 Oct 2013 at 1:38
What steps will reproduce the problem?
1. Have a sh.exe file on path.
2. make third_party
3. If your PATH variable contains any spaces, autoconf build will fail.
What is the expected output? What do you see instead?
Complete building the third_party target successfully.
What version of the product are you using? On what operating system?
trunk, win8.1
Please provide any additional information below.
Removing sh.exe from PATH solves the problem.
It seems that win vs unix detection depends on existence of sh.exe in PATH.
Original issue reported on code.google.com by [email protected]
on 13 May 2014 at 2:21
During run of "make csharpexe" the compiler complained on line 93 in
"adjustable_priority_queue.h":
const vector<T*>* Raw() const { return &elems_; }
Changing to
std::vector<T*>* Raw() const { return &elems_; }
resolved the build errors (even if I'm not sure this reflects your full intent)
My revision of Google Or-tools is: 2932
My operating system is Windows 7, and I compile on Visual Studio 2012 64bit.
Original issue reported on code.google.com by [email protected]
on 4 Nov 2013 at 6:50
line 49 & line 35
points to http://eclipse-clp.org/reports/eclipse.ppt
the correct page is http://eclipseclp.org/reports/eclipse.ppt
Original issue reported on code.google.com by [email protected]
on 8 Jul 2013 at 11:22
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using Google.OrTools.ConstraintSolver;
public class OrTools
{
private static long Solve(long num_buses_check = 0)
{
SolverParameters sPrm = new SolverParameters();
sPrm.compress_trail = 0;
sPrm.trace_level = 0;
sPrm.profile_level = 0;
Solver solver = new Solver("OrTools",sPrm);
//this works
IntVar[,] x = solver.MakeIntVarMatrix(2,2, new int[] {-2,0,1,2}, "x");
//this doesn't work
//IntVar[,] x = solver.MakeIntVarMatrix(2, 2, new int[] { 0, 1, 2 }, "x");
for (int w = 0; w < 2; w++)
{
IntVar[] b = new IntVar[2];
for (int i = 0; i < 2; i++)
{
b[i] = solver.MakeIsEqualCstVar(x[w, i], 0);
}
solver.Add(solver.MakeSumGreaterOrEqual(b, 2));
}
IntVar[] x_flat = x.Flatten();
DecisionBuilder db = solver.MakePhase(x_flat,
Solver.CHOOSE_FIRST_UNBOUND,
Solver.ASSIGN_MIN_VALUE);
solver.NewSearch(db);
while (solver.NextSolution())
{
Console.WriteLine("x: ");
for (int j = 0; j < 2; j++)
{
Console.Write("worker" + (j + 1).ToString() + ":");
for (int i = 0; i < 2; i++)
{
Console.Write(" {0,2} ", x[j, i].Value());
}
Console.Write("\n");
}
Console.WriteLine("End at---->" + DateTime.Now);
}
Console.WriteLine("\nSolutions: {0}", solver.Solutions());
Console.WriteLine("WallTime: {0}ms", solver.WallTime());
Console.WriteLine("Failures: {0}", solver.Failures());
Console.WriteLine("Branches: {0} ", solver.Branches());
solver.EndSearch();
return 1;
}
/// <summary>
///
/// </summary>
/// <param name="args"></param>
public static void Main(String[] args)
{
Console.WriteLine("Check for minimum number of buses: ");
long num_buses = Solve();
Console.WriteLine("\n... got {0} as minimal value.", num_buses);
Console.WriteLine("\nAll solutions: ", num_buses);
Console.ReadKey();
//num_buses = Solve(num_buses);
}
}
Original issue reported on code.google.com by [email protected]
on 11 Mar 2013 at 10:59
What steps will reproduce the problem?
1. Modify the C++ header files so classes can be used with python/java/c#/etc.
wrappers.
What is the expected output? What do you see instead?
When running SWIG on ebert_graph.h, I get the warning: "Warning 325: Nested
class not currently supported (NodeIterator ignored)."
What version of the product are you using? On what operating system?
Ubuntu 12.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 28 Jun 2013 at 2:56
What steps will reproduce the problem?
int solvertype = MPSolver.getSolverEnum("CBC_MIXED_INTEGER_PROGRAMMING");
MPSolver solver = new MPSolver("My_solver_name", this.solvertype);
solver.makeConstraint("my_const_name");
try {
solver.makeConstraint("my_const_name");
} catch(Throwable e) {
System.out.println(e);
}
What is the expected output? What do you see instead?
I'm expecting the second called to makeConstraint() with the same name to
return either null or generate an exception. Currently it print the following
line to the console and exit the application:
> [17:10:33] src/base/map-util.h:126: Check failed: collection->insert(value_type(key, data)).secondduplicate key: test2
What version of the product are you using? On what operating system?
2200
I'm getting the same behavior while creating two variables with the same name.
Original issue reported on code.google.com by [email protected]
on 26 Apr 2013 at 9:34
time_limit from RoutingSearchParameter was not getting applied for solving.
Original issue reported on code.google.com by [email protected]
on 1 Apr 2014 at 3:16
Attachments:
What steps will reproduce the problem?
1. I can not find the tsptw code of chap9 in tutorials.
What is the expected output? What do you see instead?
I want to see the code example and if possible in C#, thanks.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Aug 2013 at 1:08
Solver solver = new Google.OrTools.ConstraintSolver.Solver("p");
// creating dummy variables
List<IntVar> vars = new List<IntVar>();
for (int i = 0; i < 200000; i++)
{
vars.Add(solver.MakeIntVar(0, 1));
}
IntExpr globalSum = solver.MakeSum(vars.ToArray());
DecisionBuilder db = solver.MakePhase(vars.ToArray(),
Google.OrTools.ConstraintSolver.Solver.INT_VAR_SIMPLE,
Google.OrTools.ConstraintSolver.Solver.INT_VALUE_SIMPLE);
// works
// OptimizeVar obj = new OptimizeVar(solver, true, globalSum.Var(), 100);
// solver.NewSearch(db, obj);
// crashes
solver.NewSearch(db, new OptimizeVar(solver, true, globalSum.Var(), 100));
while (solver.NextSolution())
{
Console.WriteLine("solution " + globalSum.Var().Value());
}
Console.WriteLine("fini");
Console.ReadLine();
Original issue reported on code.google.com by [email protected]
on 15 Jan 2013 at 10:32
What steps will reproduce the problem?
1. Checkout trunk
2. Build (success because TinyThread source is in the original check out)
3. make clean_third_party
4. Build (fails because no TinyThread source present)
What is the expected output? What do you see instead?
I would not have expected a make clean to break my build. If possible I suggest
to either refetch the source or don't wipe it.
What version of the product are you using? On what operating system?
Linux trunk
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Jun 2012 at 11:21
There are various reasons for strong-naming an assembly. These include:
* Only strong-named assemblies can be put into the GAC.
* Strong-named assemblies can only reference other strong-named assmeblies.
* Strong-named assemblies are uniquely identifiable by key, name and version
and can be verified as not having been tampered with.
In our scenario, we needed to make our core application signed, which requires
that all third party DLLs are also signed. The ildasm/ilasm workaround for
retro-signing does not work for or-tools DLLs likely due to the unusual linking
process.
I've modified Makefile.csharp.mk to consider the variables CLR_KEYFILE and
CLR_DELAYSIGN which can be passed as arguments to make. Specifying CLR_KEYFILE
(and optionally CLR_DELAYSIGN) will produce signed DLLs and test executables. A
diff against r2200 is attached.
Original issue reported on code.google.com by [email protected]
on 5 Sep 2012 at 11:17
Attachments:
On some instances, there is an assertion failure when
PositiveTableConstraint::InitialPropagate calls IntervalUp64.
You pass position+1 as argument, but position can have any value between 0 and
63. If it is 63, then you call IntervalUp64(64) which leads to the assertion
failure.
If you run the program with NDEBUG, this leads to an infinite loop.
The trivial solution would be to add a check, but maybe there's something
smarter that can be done.
Original issue reported on code.google.com by [email protected]
on 16 Sep 2011 at 5:55
After SetCommandLineOption has been removed, only routing search parameters are
accessible from Python. This leaves inaccessible filtering control, first
solution heuristics, propagation control (routing_use_light_propagation) and
misc options.
Original issue reported on code.google.com by [email protected]
on 25 Feb 2014 at 2:46
That would be great to have that to stop the search otherwise you have to put
the process in bg and kill it manually.
Pierre
Original issue reported on code.google.com by [email protected]
on 9 Oct 2010 at 8:40
I just downloaded the file Google.OrTools.python.Windows64.2322.zip from the
homepage and tried the command
setup.py install
setup.py has a syntax error on line 16. The line reads
pjoin('constraint_solver', '_pywraprouting.dll']),
and should presumably be
pjoin('constraint_solver', '_pywraprouting.dll')]),
Furthermore, setup.py refers to ".dll" files, but the files in the packages
have ".pyd" extensions.
Original issue reported on code.google.com by [email protected]
on 6 Mar 2013 at 1:04
What steps will reproduce the problem?
1. make csharp
2.
3.
What is the expected output? What do you see instead?
compiler error in src/constraint_solver/hybrid.cc:
src\linear_solver/linear_solver.h(680) : error C2512:
'operations_research::CoeffMap?' : no appropriate default constructor available
src\linear_solver/linear_solver.h(851) : error C2512:
'operations_research::CoeffMap?' : no appropriate default constructor available
What version of the product are you using? On what operating system?
current svn checkout
win7, vs2010
Please provide any additional information below.
Just checked out the source from svn and hit the compilation error straight on.
Original issue reported on code.google.com by [email protected]
on 20 Oct 2013 at 7:08
During creation of a customized LocalSearch in C#, and I am following chapter
6.7 in the user manual.
As I am trying to create the "SwapIntervals" @ 6.7.3 that inherits the
"SequenceVarLocalSearchOperator"-class, I get the error message:
"The Type Google.ConstraintSolver.SequenceVarLocalSearchOperator has no
constructors defined" (see attached picture of object browser)
The trial to resolve by forcing SWIG to create constructors, even if the class
is abstract did not solve the issue.
(see: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nn6)
Original issue reported on code.google.com by [email protected]
on 5 Nov 2013 at 10:18
Attachments:
MPSolver.ExportModelAsMpsFormat should return the created model as String
instead of taking model_str as argument which does not work in Java.
Alternatively use a mutable argument.
Original issue reported on code.google.com by [email protected]
on 15 Nov 2013 at 8:49
Here's the piece of code that gives me trouble:
Public Class ContainerDimensiuneTimp
Inherits NodeEvaluator2
Dim Timpi()() As Double
Public Sub New(_timpi()() As Double)
Timpi = _timpi
End Sub
Public Overloads Function Run(nod1 As Integer, nod2 As Integer) As Long
Return CLng(Timpi(nod1)(nod2) * 60)
End Function
End Class
After Initialising the RouterModel as "rutare" and setting the cost,
Dim TimesContainer As New ContainerDimensiuneTimp(_timpi)
rutare.AddDimension(TimesContainer, 100, 24 * 3600, "T")
When calling "rutare.AddDimension(TimesContainer, 100, 24 * 3600, "T")" it
throws a StackOverflow.
Original issue reported on code.google.com by [email protected]
on 10 Sep 2012 at 3:05
I'm using Google.OrTools.java.Win32.1304 to solve the Linear , Non-Linear &
mixed Imteger optimization problems using CLP, CBC.
I'm looking for non-linear example programming using CLP/CBC.
Please provide the steps/example for non-Linear program.
-Anu
Original issue reported on code.google.com by [email protected]
on 10 Apr 2012 at 2:23
Hi, I don't know how to compile scip only with Visual studio 10, is there one
way to solve this problem?
Original issue reported on code.google.com by [email protected]
on 22 Sep 2012 at 3:01
I have built a .net project under Visual Studio 12, and with the 32-bit version
(the development web server with Visual Studio is 32 bit), I am able to run my
web application in debug mode. However, when I publish it to a web server
running IIS on Windows Server 2008 (IIS 7.5), on running the web site I get the
following error:
Could not load file or assembly 'Google.OrTools.LinearSolver.DLL' or one of its
dependencies. The specified module could not be found
I have tried all permutations of the following:
* 32/64 bit versions of the tool
* project compile to platform target CPU (any, 86, 64 - in both debug and
release (used for publishing a web application) configurations)
* IIS application pool allow 32-bit applications, and app-pool (and
application) restarted
Has anyone else managed to get it working in IIS, please?
To reproduce the issue:
* add the DLL as a reference to a .NET project
* in a C# file in the project, add: using Google.OrTools.LinearSolver
* in the same file, add: Solver solver =
Solver.CreateSolver("IntegerProgramming", "CBC_MIXED_INTEGER_PROGRAMMING");
* publish the application to an IIS web server
* try to open the application in a browser
Original issue reported on code.google.com by [email protected]
on 23 Jan 2013 at 2:31
I have tried to use
Google.OrTools.ConstraintSolver.dll
Google.OrTools.LinearSolver.dll
to solve some real world schedule problem,
found there are no float expression in ConstraintSolver.
When I head to LinearSolver, I found no Element function for arrays in it.
Is or-tools still in state for fun?
Can it solve real world schedule problem?
Looking forward to your reply! Thank you ahead.
Original issue reported on code.google.com by [email protected]
on 29 Apr 2012 at 3:21
It seems like some of the methods didn't pass through in fix of issue35,
actually all the protected ones:
Activate(.. )
Activated(.. )
AddVars(.. )
ApplyChanges(.. )
Deactivate(.. )
OldSequence(.. )
RevertChanges(.. )
SetForwardSequence(.. )
SetBackwardSequence(.. )
Also, Sequence(.. ) is now conditional on the value of SWIG, but needed in any
case:
#if !defined(SWIG)
const std::vector<int>& Sequence(int64 index) const {
DCHECK_LT(index, vars_.size());
return values_[index];
}
#endif
Original issue reported on code.google.com by [email protected]
on 5 Nov 2013 at 3:30
Since the make file in trunk is looking for glpk-4.49, the documentation should
be updated accordingly. Any reference to glpk-4.47 should be replaced by
glpk-4.49.
Original issue reported on code.google.com by [email protected]
on 21 Apr 2013 at 2:20
What steps will reproduce the problem?
1. Build on Windows with Visual Studio 2013
Error to build file src\constraint_solver\expressions.cc, method
Solver::MakeIntVar
To fix it, add the namespace "std" to the vector instances used inside the
method:
IntVar* Solver::MakeIntVar(const std::vector<int64>& values, const std::string&
name) {
const std::vector<int64> cleaned = SortedNoDuplicates(values);
int64 gcd = 0;
for (int64 v : cleaned) {
if (v == 0) {
continue;
}
if (gcd == 0) {
gcd = std::abs(v);
} else {
gcd = MathUtil::GCD64(gcd, std::abs(v));
}
if (gcd == 1) {
break;
}
}
if (gcd == 1) {
return RegisterIntVar(RevAlloc(new DomainIntVar(this, cleaned, name)));
} else {
std::vector<int64> new_values;
new_values.reserve(values.size());
for (int64 v : cleaned) {
DCHECK_EQ(0, v % gcd);
new_values.push_back(v / gcd);
}
const std::string new_name = name.empty() ? "" : "inner_" + name;
IntVar* const inner =
RegisterIntVar(RevAlloc(new DomainIntVar(this, new_values, new_name)));
return MakeProd(inner, gcd)->Var();
}
}
Original issue reported on code.google.com by [email protected]
on 19 May 2014 at 6:10
m = pywraprouting.RoutingModel(100, 2, [1,10],[11,21])
But I get:
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
m = pywraprouting.RoutingModel(100, 2, [1,10],[11,21])
File "/home/nik/or-tools-read-only/src/constraint_solver/../gen/constraint_solver/pywraprouting.py", line 2224, in __init__
this = _pywraprouting.new_RoutingModel(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function
'new_RoutingModel'.
Possible C/C++ prototypes are:
operations_research::RoutingModel::RoutingModel(int,int)
operations_research::RoutingModel::RoutingModel(int,int,std::vector< std::pair< operations_research::RoutingModel::NodeIndex,operations_research::RoutingModel::NodeIndex >,std::allocator< std::pair< operations_research::RoutingModel::NodeIndex,operations_research::RoutingModel::NodeIndex > > > const &)
operations_research::RoutingModel::RoutingModel(int,int,std::vector< operations_research::RoutingModel::NodeIndex,std::allocator< operations_research::RoutingModel::NodeIndex > > const &,std::vector< operations_research::RoutingModel::NodeIndex,std::allocator< operations_research::RoutingModel::NodeIndex > > const &)
Original issue reported on code.google.com by [email protected]
on 9 Jan 2013 at 11:38
Here's a simple code example to reproduce the problem :
static void Main(string[] args)
{
var solver = Solver.CreateSolver("IntegerProgramming", "CBC_MIXED_INTEGER_PROGRAMMING");
var a = solver.MakeBoolVar("A");
var b = solver.MakeBoolVar("B");
var c = solver.MakeBoolVar("C");
solver.Add(a + b + c == 1);
solver.Minimize(30 * a + 10 * b + 100 * c);
solver.EnableOutput(); // <-- useless
solver.Solve();
Console.WriteLine("A={0},B={1},C={2}", a.SolutionValue(), b.SolutionValue(), c.SolutionValue());
Console.ReadLine();
}
This simple MIP problem is correctly solved, but no solver log is printed on
the console even if solver.EnableOutput() has been called.
or-tools version: 2322
Both 32 and 64 bit binaries are affected;
Binaries downloaded from http://code.google.com/p/or-tools/downloads/list
Original issue reported on code.google.com by [email protected]
on 5 Nov 2012 at 6:12
Hi,
I cannot run your examples.
I get 'The type initializer for 'SWIGExceptionHelper' threw an exception.'. One
of the inner exceptions contains following message:
c:\\Users\\Laurent\\Documents\\or-tools\\bin\\Google.OrTools.Graph.dll': The
specified module could not be found.
Original issue reported on code.google.com by [email protected]
on 2 Aug 2012 at 10:29
What steps will reproduce the problem?
1. Compile the unpacked .cs-files
2. Run the executable
The model:
I have ported your c++-model:
http://or-tools.googlecode.com/svn/trunk/examples/cpp/jobshop.cc to C#.
On top I have added transition times (the function
"PostTransitionTimeConstraints" i Program.cs).
I expect the model to run and solve a small instance of a flexible jobshop
problem with transition times.
The solver often finds a couple of solutions before it crashes.
(For the choice of randomisation seed I get 1 solution before it crashes, as
the problem instance is so small. However, it can also be 0 or any number of
aquired solutions before the crash, depending on the seed in the search phase
where I assign the tools, and the size and composition of the problem instance)
The error message from the c++ library is:
"src/constraint_solver/interval.cc:809: Check failed: performed_.MayBeTrue()".
For my version of the code this piece of code reads:
int64 FixedDurationIntervalVar::StartMax() const {
CHECK(performed_.MayBeTrue());
return start_.Max();
}
I have found that I can enforce correct transition times, but I cannot
constrain the next start time without the application eventually crashing.
(this key piece of code can be found on line 216 in my "program.cs" file)
My revision of Google Or-tools is: 2907
My operating system is Windows 7, and I compile on Visual Studio 2012 64bit.
I just saw that you added setup dependent transition times in revision 2909. I
will look at it, but I think this error is relevant even if the new features
would solve my problem.
Original issue reported on code.google.com by [email protected]
on 24 Oct 2013 at 11:42
Attachments:
Run tests/issue5.py
Original issue reported on code.google.com by [email protected]
on 19 Oct 2010 at 8:18
See the two attached tgz-ed fzn-files: test_nooutput.fzn and test_output.fzn
are the same fzn-problems, both very hard. The only difference is, that in
test_nooutput.fzn only the variable "end_cost" (which must be minimised) is
annotated with ":: output_var", whereas in test_output.fzn there are eight more
variables annotated like that (you can run a diff to see what I mean).
> What steps will reproduce the problem?
1. Run ./bin/fz -all test_nooutput.fzn, you will get "**proven**" in around
980ms with a value of end_cost = 2116 (which is just the lower bound of this
var).
2. Run ./bin/fz -all test_output.fzn, or-tools just takes forever searching
without finding any solution.
> What is the expected output? What do you see instead?
I expect "2." to be the correct behaviour, I tested a lot of solvers with this
problem and never got any solutions better than around 2300.
> What version of the product are you using? On what operating system?
trunk from yesterday, compiled on Ubuntu 12.04, 64-bit
> Please provide any additional information below.
The fz-files were generated from a minizinc-file with G12's mzn2fzn.
Original issue reported on code.google.com by [email protected]
on 11 Apr 2014 at 7:45
Attachments:
What steps will reproduce the problem?
1. run make csharp (make csharplp not working any longer?)
2.
3.
What is the expected output? What do you see instead?
I get the compilation error:
cl /EHsc /MD /nologo -nologo /O2 -DNDEBUG /Isrc /Iexamples /Isrc\\gen /IC:\\pro
jects\\or-tools\\dependencies\\install\\include /DGFLAGS_DLL_DECL= /DGFLAGS_DLL_
DECLARE_FLAG= /DGFLAGS_DLL_DEFINE_FLAG= /IC:\\projects\\or-tools\\dependencies\\
install\\include /Idependencies\\sources\\TinyThread++-1.1\\source /IC:\\projec
ts\\or-tools\\dependencies\\install\\include /IC:\\projects\\or-tools\\dependenc
ies\\install\\include /DUSE_CBC /IC:\\projects\\or-tools\\dependencies\\install\
\include /DUSE_CLP /D__WIN32__ /IC:\\projects\\or-tools\\dependencies\\insta
ll\\include -c src\\gen\\constraint_solver\\constraint_solver_csharp_wrap.cc /Fo
objs\\constraint_solver_csharp_wrap.obj
constraint_solver_csharp_wrap.cc
src\util/tuple_set.h(375) : error C2039: 'sort' : is not a member of 'std'
src\util/tuple_set.h(375) : error C3861: 'sort': identifier not found
src\util/tuple_set.h(408) : error C2039: 'sort' : is not a member of 'std'
src\util/tuple_set.h(408) : error C3861: 'sort': identifier not found
Tools\make: *** [objs/constraint_solver_csharp_wrap.obj] Error 2
What version of the product are you using? On what operating system?
Win 7, VS 2012 SP4, running under "Open VS2012 x64 Cross Tools Command Prompt"
Please provide any additional information below.
Having real trouble using or-tools dlls under "Win 8/IIS app pool" env made me
resort to compiling everything myself hoping it would link to "the right" c++/c
libraries... blind man shooting :)
Original issue reported on code.google.com by [email protected]
on 17 Jan 2014 at 9:51
What steps will reproduce the problem?
1. make
2.
3.
What is the expected output? What do you see instead?
./constraint_solver/constraint_solver.h: In member function ‘void
operations_research::IntVar::RemoveValues(const std::vector<int64,
std::allocator<int64> >&)’:
./constraint_solver/constraint_solver.h:2095: error: ‘const class
std::vector<int64, std::allocator<int64> >’ has no member named ‘data’
./constraint_solver/constraint_solver.h: In member function ‘void
operations_research::IntVar::SetValues(const std::vector<int64,
std::allocator<int64> >&)’:
./constraint_solver/constraint_solver.h:2103: error: ‘const class
std::vector<int64, std::allocator<int64> >’ has no member named ‘data’
constraint_solver/alldiff_cst.cc: In member function
‘operations_research::Constraint*
operations_research::Solver::MakeAllDifferent(const
std::vector<operations_research::IntVar*,
std::allocator<operations_research::IntVar*> >&, bool)’:
constraint_solver/alldiff_cst.cc:139: error: ‘const class
std::vector<operations_research::IntVar*,
std::allocator<operations_research::IntVar*> >’ has no member named ‘data’
What version of the product are you using? On what operating system?
Please provide any additional information below.
Macos 10.5.8
i686-apple-darwin9-g++-4.0.1
To make some progress with the compilation on Macos 10.5.8
I had to remove -DARCH_K8 from the CFLAGS definition in the makefile.
Then I'm having troubles with the vector class. The data() method is not
recognized.
Is data() a standard method from the stl vector?
Original issue reported on code.google.com by [email protected]
on 16 Sep 2010 at 7:44
Simply run the attached example to reproduce.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2010 at 8:47
Attachments:
I downloaded Google.OrTools.java.x64.1304.zip and tested my installation with
IntegerProgramming.java using the compiled jars.
When I run the program GLPK and CBC worked fine, but not SCIP. I got the
following output:
---- Integer programming example with GLPK ----
Problem solved in 70 milliseconds
Optimal objective value = 6.0
x1 = 6.0
x2 = 0.0
Advanced usage:
Problem solved in 3 branch-and-bound nodes
---- Integer programming example with CBC ----
Problem solved in 346 milliseconds
Optimal objective value = 6.0
x1 = 6.0
x2 = 0.0
Advanced usage:
Problem solved in 0 branch-and-bound nodes
---- Integer programming example with SCIP ----
Could not create solver SCIP_MIXED_INTEGER_PROGRAMMING
=====
I was expecting to have access to the SCIP wrapper, but apparently it is not
available in jnilinearsolver.jar. How can I have access to SCIP from your
wrappers?
By the way, I run my program on Eclipse Indigo with Java JRE 7 on Windows 7
Enterprise 64 bit.
Last, but not least, thanks for putting this together. It is amazing!
Original issue reported on code.google.com by [email protected]
on 29 Apr 2012 at 3:25
Following program does not stop.
from constraint_solver import pywrapcp
def main():
solver = pywrapcp.Solver('time limit test')
n = 10
x = [solver.IntVar(1, n, 'x[%i]'%i) for i in range(n)]
solver.Add(solver.AllDifferent(x, True))
solution = solver.Assignment()
solution.Add(x)
db = solver.Phase(x,
solver.CHOOSE_FIRST_UNBOUND,
solver.ASSIGN_MIN_VALUE)
time_limit = 10
branch_limit = 100000000
failures_limit = 100000000
solutions_limit = 10000000
limits = solver.Limit(time_limit, branch_limit, failures_limit, solutions_limit, True)
search_log = solver.SearchLog(1000)
solver.NewSearch(db, [limits, search_log])
num_solutions = 0
while solver.NextSolution():
print "x:", [x[i].Value() for i in range(n)]
num_solutions += 1
solver.EndSearch()
print
print "num_solutions:", num_solutions
print "failures:", solver.failures()
print "branches:", solver.branches()
print "wall_time:", solver.wall_time()
if __name__ == '__main__':
main()
Original issue reported on code.google.com by [email protected]
on 10 Oct 2010 at 12:15
I am looking for CVRPTW (Capacitated Vehicle Routing Problem with Time Windows)
example/source code in .NET
I have download 'Google.OrTools.NET.Windows64.2322.zip' vesrion. TSP example is
availble but CVRPTW example is not available in example folder.
Original issue reported on code.google.com by [email protected]
on 5 Mar 2013 at 6:27
I was going through the code of the DomainIntVar::RemoveValue method and there
are two things I find suspicious. The function goes like this (taken from
trunk) :
---------------------------
void DomainIntVar::RemoveValue(int64 v) {
if (v < min_ || v > max_)
return;
if (v == min_) {
SetMin(v + 1);
} else if (v == max_) {
SetMax(v - 1);
} else {
if (bits_ == NULL) {
CreateBits();
}
if (in_process_ && v >= new_min_ && v <= new_max_ && bits_->Contains(v)) {
bits_->DelayRemoveValue(v);
} else {
if (bits_->RemoveValue(v)) {
Push();
}
}
}
}
---------------------------
1) If the variable is "in process", shouldn't you test v with new_min_ and
new_max_ instead of min_ and max_?
2) In the last if statement, shouldn't it be more like this?
if (in_process_) {
if (v >= new_min_ && v <= new_max_ && bits_->Contains(v)) {
bits_->DelayRemoveValue(v);
}
} else {
if (bits_->RemoveValue(v)) {
Push();
}
}
So to summarize I think the patch would be :
void DomainIntVar::RemoveValue(int64 v) {
if (in_process_) {
if (v < new_min_ || v > new_max_) {
return;
} else if (v == new_min_ && v == new_max_) {
solver()->Fail();
} else if (v == new_min_ ) {
new_min_++;
} else if (v == new_max_) {
new_max_--;
} else {
if (!bits_) CreateBits();
bits_->DelayRemoveValue(v);
}
} else {
if (v < min_ || v > max_) {
return;
} else if (v == min_) {
SetMin(v + 1);
} else if (v == max_) {
SetMax(v - 1);
} else {
if (bits_ == NULL) CreateBits();
if (bits_->RemoveValue(v)) Push();
}
}
}
Maybe I'm wrong but I just wanted to let you know in case it's really a problem!
Philippe Van Kessel
Original issue reported on code.google.com by [email protected]
on 28 Nov 2011 at 8:52
mixed_integer_programming's solution isn't global optimum(for .NET)
Thanks for your attention!
I'm trying to solve a mixed-integer problem with orTools like the example
csintegerprogramming.cs.
The objective function and the constraints are all linear.
When I solved it with CBC_MIXED_INTEGER_PROGRAMMING or other methods,then I got
one result(this is the first result).
But when I change the first result into a new constraint and add it into the
problem above.Then I get a second result,I found that the sencond result is
better then the first one.
So, I think I got a locally optimal solution.
How can I solve this problem?
Original issue reported on code.google.com by [email protected]
on 16 May 2013 at 8:23
Hi.
I'm trying to build the code using VS2013 and came across the following code
errors.
C:\src\or-tool>tools\make all
cl /EHsc /MD /nologo -nologo /O2 -DNDEBUG /Isrc /Iexamples /Isrc\\gen
/IC:\\src\\or-tool\\dependencies\\install\\src\\windows
/IC:\\src\\or-tool\\dependencies\\install\\src /DGFLAGS_DLL_DECL=
/DGFLAGS_DLL_DECLARE_FLAG= /DGFLAGS_DLL_DEFINE_FLAG= /IC:\\src\\or-tool\\dependencies\\install\\include /Idependencies\\sources\\TinyThread++-1.0\\source /Idependencies\\sources\\Minisat /IC:
\\src\\or-tool\\dependencies\\install\\include
/IC:\\src\\or-tool\\dependencies\\install\\include /DUSE_CBC
/IC:\\src\\or-tool\\dependencies\\install\\include /DUSE_CLP /D__WIN32__
/IC:\\sr
c\\or-tool\\dependencies\\install\\include -c src/constraint_solver/diffn.cc
/Foobjs\\diffn.obj
diffn.cc
src/constraint_solver/diffn.cc(85) : error C2065: 'vector' : undeclared
identifier
src/constraint_solver/diffn.cc(85) : error C2275: 'int64' : illegal use of this
type as an expression
src\base/integral_types.h(26) : see declaration of 'int64'
src/constraint_solver/diffn.cc(85) : error C2065: 'size_x' : undeclared
identifier
src/constraint_solver/diffn.cc(86) : error C2065: 'size_x' : undeclared
identifier
src/constraint_solver/diffn.cc(87) : error C2065: 'vector' : undeclared
identifier
src/constraint_solver/diffn.cc(87) : error C2275: 'int64' : illegal use of this
type as an expression
src\base/integral_types.h(26) : see declaration of 'int64'
src/constraint_solver/diffn.cc(87) : error C2065: 'size_y' : undeclared
identifier
src/constraint_solver/diffn.cc(88) : error C2065: 'size_y' : undeclared
identifier
src/constraint_solver/diffn.cc(90) : error C2065: 'size_x' : undeclared
identifier
src/constraint_solver/diffn.cc(90) : error C2065: 'size_y' : undeclared
identifier
src/constraint_solver/diffn.cc(91) : error C2065: 'size_y' : undeclared
identifier
src/constraint_solver/diffn.cc(91) : error C2065: 'size_x' : undeclared
identifier
src/constraint_solver/diffn.cc(241) : error C2065: 'vector' : undeclared
identifier
src/constraint_solver/diffn.cc(241) : error C2059: syntax error : '>'
src/constraint_solver/diffn.cc(243) : error C2065: 'intervals' : undeclared
identifier
src/constraint_solver/diffn.cc(245) : error C2065: 'intervals' : undeclared
identifier
tools\make: *** [objs/diffn.obj] Error 2
Original issue reported on code.google.com by [email protected]
on 7 Jul 2013 at 6:36
I would like to solve a LP by using different parameters (especially different
from the default parameters). I tried to set some solver specific parameters
for CBC by two different ways:
1. I tried to change the default values of the parameters LP_ALGORITHM,
BARRIER and DUAL by using the SetIntegerParam/SetDoubleParam-methods, but the
values are unchanged afterwards. The other default-parameters are changeable by
using this methods.
2. Additionally, I tried to use SetSolverSpecificParametersAsString() with a
string of CBC-specific parameters. Currently,
SetSolverSpecificParametersAsString() always returns false, unless the input is
empty. Could you give me an example to use this method?
What version of the product are you using? On what operating system?
.Net OrTools.dll Version 3236
Original issue reported on code.google.com by [email protected]
on 10 Apr 2014 at 9:10
What steps will reproduce the problem?
1. make all
2. wait
3.
What is the expected output? What do you see instead?
svn co svn://vcs.exim.org/pcre/code/trunk
What version of the product are you using? On what operating system?
from source code
Please provide any additional information below.
I tried to install or-tools, but I was unable due to the lack of this
repository,
Original issue reported on code.google.com by [email protected]
on 22 Jul 2013 at 3:32
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.