E-TE0006 — Could not infer type
Error Type |
|
|---|---|
Phase |
type checking the model |
Python exception |
|
Message
Could not infer the type of `{expr}`.
Possible fix: use it in a context that determines its type (for example, apply the function to a concrete set or domain).
Cause
The type checker could not determine the type of an expression from its context. This typically happens for a lambda (function) whose argument type cannot be inferred from how it is used.
Fix
Use the function in a context that determines its argument type — for example, pass it together with a domain= to problem.Constraint(...), or apply it via jm.map/jm.filter/jm.genarray to a concrete set or shape. Python lambdas cannot carry type annotations that JijModeling can read, so the surrounding context must supply the type.