E-CE0001 — Missing placeholder value

Error Type

Compile Error

Phase

compiling the problem into an OMMX instance

Python exception

jijmodeling.CompileError

Message

Missing value for placeholder `{name}` (declared as {spec}).

Possible fix: provide a value for it in the instance data.

Cause

The model declares a placeholder, but the instance data passed to the compiler does not contain a value for it. Every placeholder declared in the problem must receive a concrete value at compile time.

Fix

Add an entry for the named placeholder to the instance data dictionary:

problem = jm.Problem("p")
N = problem.Natural("N", ndim=1)
# ...
compiler = jm.Compiler.from_problem(problem, {"N": [1, 2, 3]})
instance = compiler.eval_problem(problem)