Comments (5)
As a workaround until this is fixed, you can pass the funcs
array as an argument to your dog
function:
function var bool:dog(array[int] of var func: fns, int:t) =
(funcs:dog,input:t) in fns;
var int:d1 = dog(funcs, 1);
from libminizinc.
@cyderize and @guidotack This error still appears in the MiniZinc playground. Has it not been updated to the latest version?
from libminizinc.
The problem is resolved when you select the “edge” version of MiniZinc in the playground. The fix has not been included in any release yet, so the “latest” version does not yet include the fix.
from libminizinc.
@Dekker1 Now a different error appears when running this model using the COIN-BC solver:
MiniZinc: flattening error: variable X_INTRODUCED_19_ needs finite bounds for linearisation. Or, use indicator constraints. Current domain is [[ [ -inf, 0 ] [ 1, 1 ] [ 2, inf ] ]]
Is this another compiler bug?
from libminizinc.
I think this is just a limitation of how linearisation works for MIP solvers like CBC.
Without any bounds for the input
field of the record, it's not possible to turn (funcs:dog,input:t) in funcs
into an integer variable which the solver can handle.
You can add bounds with
type func = record(functions:funcs,-10..10: input);
which will fix the problem.
from libminizinc.
Related Issues (20)
- Crash with huge number of array concats. HOT 3
- 2d array slicing in comprehension fails, array of arrays not supported HOT 4
- empty set as default value for optional set fails HOT 2
- Invalid solution found when solving with Gecode or Ortools. HOT 1
- Subcircuit of length 1? HOT 2
- MiniZinc 2.8.3: error passing .fzn to minizinc/gecode HOT 2
- Inconsistent reification of stricty_increasing
- MiniZinc 2.8.4: FindMUS "multiple errors:" HOT 2
- Difference in handling of JSON annotated sections in 2.8.* using --json-stream HOT 1
- Gecode CANNOT solve official "Real Number Solving" example
- Apparent mishandling of nested `opt` declarations in the JSON interface
- JSON input bug, record type-inst error with enumerated type HOT 4
- Partial assignment of enum var results in type error HOT 1
- Can't use interger literal -9223372036854775808 HOT 4
- Quoted identifiers are missing quotes in output dzn
- Missing option '-f/--free-search' in flags of command line help
- Linearized model leads to UNSAT or unfeasible solutions given the bound HOT 1
- `Assertion `typeId() == 0 || dim() == d' failed.` HOT 2
- Poor diagnostic for missing int->enum conversion? HOT 2
- `EnumEntry` `in` `anotherEnum` is incorrect? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libminizinc.