E-TE0014 — Operation not supported for this type

Error Type

Type Error

Phase

type checking the model

Python exception

jijmodeling.TypeError

Message

`{kind}` is not supported for type `{type_}`

Cause

A type does not support the capability named in the message. Typical cases: folding (jm.sum, jm.prod, …) over a value that cannot be iterated (such as a float scalar or a boolean), unpacking collection elements with a multi-argument lambda (or the argument pattern of a function type) when the number of components differs, or when an array’s length cannot be established when the model is defined, using a type that cannot serve as a dictionary key, or a constraint domain whose elements cannot be used as subscripts.

Fix

Apply the operation to a value of a supported type; the message names the operation and the actual type. For example, sum over an array, a set, or an index range rather than a float scalar.

For lambda a, b: ... over array rows, declare a fixed two-column shape, such as shape=(R, 2). If you only need selected entries, use one row argument and explicit subscripts, such as lambda row: row[0] + row[1]; those entries must exist in each row.