Skip to content

Code generation failed for examples that include mixed-integer variables (invpend_contact, satellite). #56

@sungjun66

Description

@sungjun66

Hello
I’m trying to implement an MIQP control problem using LinearMPC on an embedded board.
However, when I attempt code generation for examples that include mixed-integer variables, I encounter an error.

using LinearMPC
mpc,range = LinearMPC.mpc_examples("satellite")
LinearMPC.codegen(mpc;dir="codegen_impc")

When I run this code, the following error occurs.

ERROR: LoadError: MethodError: no method matching iterate(::Nothing)
The function iterate exists, but no method is defined for this combination of argument types.

The examples that do not call the set_binary_controls! function successfully complete code generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions