Skip to content

List of potential user mistakes (continuously updated) #5

Description

@jowaibel

(umno User mistake No.) (Place in code) (Description)


umno1 OptProblem::add_variables User adds the same variable twice, e.g.,

for (int i = 0; i < N + 1; i++)
 {
    optProblem.add_variable(X_sym[i]); // TODO eno1: Loop through array in add_variable()
    optProblem.add_variable(X_sym[i]);
 }

--> Leads to segmentation fault at runtime.


umno4 User forgets to register a variable.
--> Segmentation fault at runtime. Debug mode tracks it down to the line where the unregistered variable appears.


umno5 User directly uses decision variables (i.e., variable_t members of Transcription) in (tagged) functors by accident.
--> Type mismatch when evaluating ControlProblem function implementations.


umno6 User writes to laopt::variable_t before the solver has been constructed.
--> Segmentation fault at runtime. Variables do not have a memory yet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions