Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Bookmarks inbookmarks:mine
inbookmarks:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only user 2942

For questions about solving Operations Research problems using the C++ programming language.

8
votes
1answer
I'm trying to write this constraint in C++ and add it to my model (addLessOrEqual): $$\text{start}_{i}+\text{duration}_{i}\le\text{start}_{j}$$ for an $(i,j)$ arc of precedence. Starts (IntVar) and d …
asked Jan 20 '20 by Diego R. Troncoso
5
votes
1answer
I'm trying to solve an rcpsp model. I can't find documentation for the AddCumulative function of OR-Tools. How should this function be used? I want to write this constraint in C++: $$\forall k \in R …
asked Jan 20 '20 by Diego R. Troncoso
5
votes
1answer
If I have an IntVar s[j] stored in a vector s, is it possible to iterate for (a period of time) t and create a BoolVar b such that b[t] is true if and only if s[j]==t? I tried setting some restrictio …
asked Jan 31 '20 by Diego R. Troncoso
3
votes
1answer
I'm trying to validate my model, this is the relevant part of my code: cp_model.Maximize(LinearExpr::Sum(obj_final)); SatHelper::ValidateModel(cp_model); //solve Model model; // …
asked Jan 23 '20 by Diego R. Troncoso
6
votes
0answers
I'm using OptionalIntervalVar and then maximizing the starts. The optimal solution is not affecting the other variables that creates the OptionalIntervalVar (i mean the constraint starts[j]+sizes[j]== …
asked Jan 30 '20 by Diego R. Troncoso
4
votes
0answers
I'm trying to solve an RCPSPDc problem in OR-Tools with CP-SAT solver. In my RCPSPDc model (with discount rate) i want to set this objective: $$\max_{s}\sum_{j\in J}\text{profit}_{j}\cdot \frac{1}{(1 …
asked Jan 22 '20 by Diego R. Troncoso
4
votes
1answer
I created OptionalIntervals for a number of tasks: std::vector<IntVar> starts; std::vector<IntVar> sizes; std::vector<IntVar> ends; std::vector<BoolVar> presences; std::vector<Int …
asked Feb 5 '20 by Diego R. Troncoso
6
votes
0answers
I'm trying to solve an RCPSPDc model It is infeasible, although Ilog Cplex solves it, so I think I have a modelling issue. I have more constraints but the precedence is the one that makes it infeasibl …
asked Jan 23 '20 by Diego R. Troncoso