I have a boolean variable in Ortools CP-SAT, let's say x. That variable is in a constraint say y = -5 * x. I have two other constraints in the model that are model.Add(y >= 0).OnlyEnforceIf(z) and model.Add(y < 0).OnlyEnforceIf(z.Not()). When I try to fix x = 1 and solve it, I am receiving as answer that the model is infeasible? Does anyone know the reason? I was expecting it to be feasible.
Model infeasible when fixing some variables in OrTools CP-SAT
204 Views Asked by Leonardo Ribeiro At
1
There are 1 best solutions below
Related Questions in OR-TOOLS
- Google or-tools soft constraint issue
- OR Tools cp model performance for flexible job shop scheduling with transitions
- Add node precedence
- OR Tools problem with 'scheduling_with_transitions_sat' job shop scheduling example from GitHub
- OR Tools Job Shop Scheduling for multiple machines with setup times
- Only allow intervals to be produced on machines during shifts cp-sat or-tools
- ortools solvers GLOP, PDLP instantly writes that the model is infeasible
- Self referencing constraints
- Geo spatial constraints in OR-Tools CP-SAT
- CpModel BoolVar not evaluating as a boolean
- Adding reload points in Google Cloud Fleet Routing API (Optimization AI)
- Differences between Excel Solver & OR Tools solver in python
- Unable to build OR-Tools with XPRESS enabled in Windows 11
- Google OR-Tools Set Some Locations Edge Fixed
- AttributeError: type object 'ortools.algorithms.python.knapsack_solver.KnapsackSolver' has no attribute 'KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER'
Related Questions in CONSTRAINT-PROGRAMMING
- Is there a constraint to pieces of the stateFunction only go in ascending or descending order?
- Is it possible for "alwaysIn" (state functions) select from set of values?
- Bin packing in OR-Tools with only one bin
- System solution in [0,1]
- How to find the best possible team lineup (in swimming)
- python-constraint - schedule maker program does not follow constraints when sum is 0 or 2?
- How do you encode a required number of consecutive days off in a set time-span constraint into an OR-Tools CP-SAT Schedule?
- Error with DOCplex CP objective function expression
- Constraint Progrraming No solution
- How to integrate OptaPlanner
- Error for pulse part in IBM CPLEX cumulative
- MIP (mixed integer problem) Build Constraint with OR
- Constraint programming
- Performance Issue with CPMpy's Cumulative Constraint
- I can't resolve a sudoku with OptaPlanner
Related Questions in OPERATIONS-RESEARCH
- GAMS: How to write x(i,j) is not equal to x(i,j) as a constraint to a integer linear programming model?
- Confusion about Google OR-Tools' CVRP solver
- Is this possible within optimization framework?
- Idiomatic way to simulate a multi-node servicing queue without a loop with Polars?
- subtour elimination constraints in VRP exact mathematical formulation
- About NSGA-II and NSGA-III output variables
- Dynamically increasing lower bound in CP-SAT from Google's OR tools
- Keeping count of variable occurence in google OR Tools
- Determining if a linear program is self-dual?
- Creating custom constraints in google's OR-Tools CP-SAT in python
- Hungarian Algorithm step
- Constraint formulation for variable cleaning times - MILP optimization
- For open source optimization solvers, the cutting plane algorithm is not effective in solving the scheduling problem of single machine
- How is AMRI calculated and what does it mean in terms of link prediction in knowledge graph?
- Solving linear programs using Pulp but with nonlinear constraint
Related Questions in CP-SAT
- OR Tools cp model performance for flexible job shop scheduling with transitions
- OR Tools problem with 'scheduling_with_transitions_sat' job shop scheduling example from GitHub
- OR Tools Job Shop Scheduling for multiple machines with setup times
- Only allow intervals to be produced on machines during shifts cp-sat or-tools
- Self referencing constraints
- Geo spatial constraints in OR-Tools CP-SAT
- CpModel BoolVar not evaluating as a boolean
- Days off constraint for Nurse Scheduling
- Same cp model, nothing changed, but sometimes feasible sometimes infeasible
- How to change penalized cover constraint from excess only to target in OR Tools?
- Bin packing in OR-Tools with only one bin
- OR Tool - OnlyEnforceIf problem when used in constraint
- In a model Or-tools, how to return the value linked to the first boolean True?
- Linear method to determine costs between elements of a sequence
- OR-Tools Maximise feasible shift in Employee Scheduling
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Below code snippet works out for me. I haven't specified the objective function, since I am not sure of it.