Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-decided IntervalVar causing Crash #49

Closed
orwant opened this issue Aug 5, 2015 · 4 comments
Closed

Un-decided IntervalVar causing Crash #49

orwant opened this issue Aug 5, 2015 · 4 comments
Assignees
Milestone

Comments

@orwant
Copy link
Collaborator

orwant commented Aug 5, 2015

Originally reported on Google Code with ID 33

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.

Reported by johan.ludde.wessen on 2013-10-24 11:42:25


- _Attachment: [DataModel.cs](https://storage.googleapis.com/google-code-attachments/or-tools/issue-33/comment-0/DataModel.cs)_ - _Attachment: [DataReader.cs](https://storage.googleapis.com/google-code-attachments/or-tools/issue-33/comment-0/DataReader.cs)_ - _Attachment: [Program.cs](https://storage.googleapis.com/google-code-attachments/or-tools/issue-33/comment-0/Program.cs)_ - _Attachment: [Heuristics.cs](https://storage.googleapis.com/google-code-attachments/or-tools/issue-33/comment-0/Heuristics.cs)_
@orwant orwant self-assigned this Aug 5, 2015
@orwant
Copy link
Collaborator Author

orwant commented Aug 5, 2015

I will look at it.

Thanks

Reported by laurent.perron on 2013-10-27 20:25:40

  • Status changed: Accepted

@orwant
Copy link
Collaborator Author

orwant commented Aug 5, 2015

Reported by laurent.perron on 2013-11-05 12:17:13

  • Status changed: Started

@orwant
Copy link
Collaborator Author

orwant commented Aug 5, 2015

Hello, 

a few comments.

1) I have added examples/tests/issue33.cs that contains your code.
2) There is now an API on the DisjunctiveConstraint that adds transition time between
activities. You need a callback long distance(int before_activity, int after_activity).
3) In your code, next[0] points to the first activity and is not the activity after
the first. 0 is a dummy node. I am not sure this is true in your code.

Thanks

Reported by laurent.perron on 2013-11-06 13:43:09

@orwant
Copy link
Collaborator Author

orwant commented Aug 5, 2015

I found and fixed the bug.
Thanks for the bug report.

Reported by laurent.perron on 2013-11-22 10:50:35

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants