agentlib_mpc.data_structures.__init__ (agentlib_mpc/data_structures/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | trailing-newlines |
C0305 | Trailing newlines |
agentlib_mpc.data_structures.admm_datatypes (agentlib_mpc/data_structures/admm_datatypes.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/data_structures/admm_datatypes.py: Fatal error while checking 'agentlib_mpc/data_structures/admm_datatypes.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-08.txt'. |
agentlib_mpc.data_structures.casadi_utils (agentlib_mpc/data_structures/casadi_utils.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/data_structures/casadi_utils.py: Fatal error while checking 'agentlib_mpc/data_structures/casadi_utils.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-08.txt'. |
agentlib_mpc.data_structures.coordinator_datatypes (agentlib_mpc/data_structures/coordinator_datatypes.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | convention | wrong-import-order |
C0411 | standard import "import dataclasses" should be placed before "import pandas as pd" |
|
| 2 | 0 | convention | wrong-import-order |
C0411 | standard import "from dataclasses import dataclass, asdict" should be placed before "import pandas as pd" |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "from enum import Enum" should be placed before "import pandas as pd" |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 5 | 0 | convention | ungrouped-imports |
C0412 | Imports from package numpy are not grouped |
|
| 28 | 4 | convention | invalid-name |
C0103 | CoordinatorStatus | Class constant name "sleeping" doesn't conform to UPPER_CASE naming style |
| 29 | 4 | convention | invalid-name |
C0103 | CoordinatorStatus | Class constant name "init_iterations" doesn't conform to UPPER_CASE naming style |
| 30 | 4 | convention | invalid-name |
C0103 | CoordinatorStatus | Class constant name "optimization" doesn't conform to UPPER_CASE naming style |
| 31 | 4 | convention | invalid-name |
C0103 | CoordinatorStatus | Class constant name "updating" doesn't conform to UPPER_CASE naming style |
| 38 | 4 | convention | invalid-name |
C0103 | AgentStatus | Class constant name "pending" doesn't conform to UPPER_CASE naming style |
| 39 | 4 | convention | invalid-name |
C0103 | AgentStatus | Class constant name "standby" doesn't conform to UPPER_CASE naming style |
| 40 | 4 | convention | invalid-name |
C0103 | AgentStatus | Class constant name "ready" doesn't conform to UPPER_CASE naming style |
| 41 | 4 | convention | invalid-name |
C0103 | AgentStatus | Class constant name "busy" doesn't conform to UPPER_CASE naming style |
| 53 | 4 | convention | missing-function-docstring |
C0116 | OptimizationData.to_dict | Missing function or method docstring |
| 61 | 4 | convention | missing-function-docstring |
C0116 | OptimizationData.from_dict | Missing function or method docstring |
agentlib_mpc.data_structures.interpolation (agentlib_mpc/data_structures/interpolation.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 3 | 0 | convention | invalid-name |
C0103 | Constant name "a" doesn't conform to UPPER_CASE naming style |
|
| 6 | 0 | convention | missing-class-docstring |
C0115 | InterpolationMethods | Missing class docstring |
| 7 | 4 | convention | invalid-name |
C0103 | InterpolationMethods | Class constant name "linear" doesn't conform to UPPER_CASE naming style |
| 8 | 4 | convention | invalid-name |
C0103 | InterpolationMethods | Class constant name "previous" doesn't conform to UPPER_CASE naming style |
| 9 | 4 | convention | invalid-name |
C0103 | InterpolationMethods | Class constant name "no_interpolation" doesn't conform to UPPER_CASE naming style |
| 10 | 4 | convention | invalid-name |
C0103 | InterpolationMethods | Class constant name "spline3" doesn't conform to UPPER_CASE naming style |
| 24 | 4 | convention | invalid-name |
C0103 | InterpolationMethods | Class constant name "mean_over_interval" doesn't conform to UPPER_CASE naming style |
| 27 | 0 | convention | invalid-name |
C0103 | Constant name "c" doesn't conform to UPPER_CASE naming style |
agentlib_mpc.data_structures.ml_model_datatypes (agentlib_mpc/data_structures/ml_model_datatypes.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/data_structures/ml_model_datatypes.py: Fatal error while checking 'agentlib_mpc/data_structures/ml_model_datatypes.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-11.txt'. |
agentlib_mpc.data_structures.mpc_datamodels (agentlib_mpc/data_structures/mpc_datamodels.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/data_structures/mpc_datamodels.py: Fatal error while checking 'agentlib_mpc/data_structures/mpc_datamodels.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-07.txt'. |
agentlib_mpc.data_structures.objective (agentlib_mpc/data_structures/objective.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/data_structures/objective.py: Fatal error while checking 'agentlib_mpc/data_structures/objective.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-11.txt'. |
|
| 2 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "import re" should be placed before "import pandas as pd" |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 217 | 0 | convention | line-too-long |
C0301 | Line too long (107/100) |
|
| 328 | 0 | convention | line-too-long |
C0301 | Line too long (107/100) |
|
| 420 | 0 | convention | line-too-long |
C0301 | Line too long (115/100) |
|
| 440 | 0 | convention | line-too-long |
C0301 | Line too long (115/100) |
|
| 466 | 0 | convention | line-too-long |
C0301 | Line too long (109/100) |
agentlib_mpc.machine_learning_plugins.physXAI (agentlib_mpc/machine_learning_plugins/physXAI/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | invalid-name |
C0103 | Module name "physXAI" doesn't conform to snake_case naming style |
agentlib_mpc.machine_learning_plugins.physXAI.model_config_creation (agentlib_mpc/machine_learning_plugins/physXAI/model_config_creation.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'joblib' |
|
| 6 | 0 | convention | line-too-long |
C0301 | Line too long (111/100) |
|
| 6 | 0 | convention | invalid-name |
C0103 | Constant name "output_type_pattern" doesn't conform to UPPER_CASE naming style |
|
| 7 | 0 | convention | invalid-name |
C0103 | Constant name "lag_pattern" doesn't conform to UPPER_CASE naming style |
|
| 8 | 0 | convention | line-too-long |
C0301 | Line too long (114/100) |
|
| 24 | 0 | convention | line-too-long |
C0301 | Line too long (119/100) |
|
| 24 | 0 | convention | invalid-name |
C0103 | physXAI_2_agentlib_json | Function name "physXAI_2_agentlib_json" doesn't conform to snake_case naming style |
| 24 | 0 | refactor | too-many-locals |
R0914 | physXAI_2_agentlib_json | Too many local variables (34/15) |
| 24 | 0 | refactor | too-many-branches |
R0912 | physXAI_2_agentlib_json | Too many branches (19/12) |
| 24 | 0 | refactor | too-many-statements |
R0915 | physXAI_2_agentlib_json | Too many statements (62/50) |
| 43 | 29 | warning | f-string-without-interpolation |
W1309 | physXAI_2_agentlib_json | Using an f-string that does not have any interpolated variables |
| 54 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 12 spaces, expected 8 |
|
| 58 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 12 spaces, expected 8 |
|
| 63 | 0 | convention | line-too-long |
C0301 | Line too long (120/100) |
|
| 64 | 0 | convention | line-too-long |
C0301 | Line too long (104/100) |
|
| 101 | 0 | convention | line-too-long |
C0301 | Line too long (111/100) |
|
| 102 | 0 | convention | line-too-long |
C0301 | Line too long (109/100) |
|
| 108 | 0 | convention | line-too-long |
C0301 | Line too long (104/100) |
|
| 133 | 0 | convention | line-too-long |
C0301 | Line too long (122/100) |
|
| 148 | 0 | convention | line-too-long |
C0301 | Line too long (118/100) |
|
| 165 | 0 | convention | missing-final-newline |
C0304 | Final newline missing |
agentlib_mpc.machine_learning_plugins.physXAI.model_generation (agentlib_mpc/machine_learning_plugins/physXAI/model_generation.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/machine_learning_plugins/physXAI/model_generation.py: Fatal error while checking 'agentlib_mpc/machine_learning_plugins/physXAI/model_generation.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-11.txt'. |
|
| 7 | 0 | convention | line-too-long |
C0301 | Line too long (103/100) |
|
| 12 | 0 | convention | line-too-long |
C0301 | Line too long (149/100) |
|
| 33 | 0 | convention | line-too-long |
C0301 | Line too long (161/100) |
|
| 50 | 0 | convention | line-too-long |
C0301 | Line too long (183/100) |
|
| 51 | 0 | convention | line-too-long |
C0301 | Line too long (227/100) |
|
| 52 | 0 | convention | line-too-long |
C0301 | Line too long (184/100) |
|
| 62 | 0 | convention | line-too-long |
C0301 | Line too long (177/100) |
|
| 68 | 0 | convention | line-too-long |
C0301 | Line too long (221/100) |
|
| 74 | 0 | convention | line-too-long |
C0301 | Line too long (115/100) |
|
| 78 | 0 | convention | line-too-long |
C0301 | Line too long (161/100) |
|
| 81 | 0 | convention | line-too-long |
C0301 | Line too long (178/100) |
|
| 87 | 0 | convention | line-too-long |
C0301 | Line too long (120/100) |
|
| 91 | 0 | convention | line-too-long |
C0301 | Line too long (133/100) |
agentlib_mpc.models (agentlib_mpc/models/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.utils.plugin_import' |
agentlib_mpc.models.casadi_ml_model (agentlib_mpc/models/casadi_ml_model.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/models/casadi_ml_model.py: Fatal error while checking 'agentlib_mpc/models/casadi_ml_model.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-09.txt'. |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "import itertools" should be placed before "import casadi as ca" |
|
| 4 | 0 | convention | wrong-import-order |
C0411 | standard import "import logging" should be placed before "import casadi as ca" |
|
| 4 | 0 | convention | ungrouped-imports |
C0412 | Imports from package logging are not grouped |
|
| 5 | 0 | convention | wrong-import-order |
C0411 | standard import "from itertools import chain" should be placed before "import casadi as ca" |
|
| 6 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import casadi as ca" |
|
| 6 | 0 | convention | ungrouped-imports |
C0412 | Imports from package pathlib are not grouped |
|
| 452 | 0 | convention | line-too-long |
C0301 | Line too long (131/100) |
agentlib_mpc.models.casadi_model (agentlib_mpc/models/casadi_model.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/models/casadi_model.py: Fatal error while checking 'agentlib_mpc/models/casadi_model.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-09.txt'. |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "import json" should be placed before "import casadi as ca" |
|
| 3 | 0 | convention | ungrouped-imports |
C0412 | Imports from package json are not grouped |
|
| 4 | 0 | convention | wrong-import-order |
C0411 | standard import "import logging" should be placed before "import casadi as ca" |
|
| 4 | 0 | convention | ungrouped-imports |
C0412 | Imports from package logging are not grouped |
|
| 5 | 0 | convention | wrong-import-order |
C0411 | standard import "import abc" should be placed before "import casadi as ca" |
|
| 5 | 0 | convention | ungrouped-imports |
C0412 | Imports from package abc are not grouped |
|
| 6 | 0 | convention | wrong-import-order |
C0411 | standard import "from itertools import chain" should be placed before "import casadi as ca" |
|
| 6 | 0 | convention | ungrouped-imports |
C0412 | Imports from package itertools are not grouped |
|
| 277 | 0 | convention | line-too-long |
C0301 | Line too long (128/100) |
|
| 527 | 0 | convention | line-too-long |
C0301 | Line too long (121/100) |
|
| 532 | 0 | convention | line-too-long |
C0301 | Line too long (128/100) |
|
| 575 | 0 | convention | line-too-long |
C0301 | Line too long (101/100) |
agentlib_mpc.models.casadi_predictor (agentlib_mpc/models/casadi_predictor.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/models/casadi_predictor.py: Fatal error while checking 'agentlib_mpc/models/casadi_predictor.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-08.txt'. |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 6 | 0 | convention | wrong-import-order |
C0411 | standard import "from enum import Enum" should be placed before "import casadi as ca" |
|
| 7 | 0 | error | import-error |
E0401 | Unable to import 'keras' |
|
| 8 | 0 | error | import-error |
E0401 | Unable to import 'keras.src' |
|
| 9 | 0 | error | import-error |
E0401 | Unable to import 'keras' |
|
| 284 | 0 | convention | line-too-long |
C0301 | Line too long (106/100) |
|
| 287 | 0 | convention | line-too-long |
C0301 | Line too long (113/100) |
|
| 296 | 0 | convention | line-too-long |
C0301 | Line too long (119/100) |
|
| 297 | 0 | convention | line-too-long |
C0301 | Line too long (103/100) |
|
| 392 | 0 | convention | line-too-long |
C0301 | Line too long (110/100) |
|
| 421 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
|
| 451 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 462 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 478 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 501 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 502 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 511 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 547 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 583 | 0 | convention | line-too-long |
C0301 | Line too long (118/100) |
|
| 585 | 0 | convention | line-too-long |
C0301 | Line too long (103/100) |
|
| 586 | 0 | convention | line-too-long |
C0301 | Line too long (110/100) |
|
| 587 | 0 | convention | line-too-long |
C0301 | Line too long (114/100) |
|
| 588 | 0 | convention | line-too-long |
C0301 | Line too long (113/100) |
|
| 596 | 0 | convention | line-too-long |
C0301 | Line too long (108/100) |
|
| 599 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
| 637 | 0 | convention | line-too-long |
C0301 | Line too long (107/100) |
|
| 652 | 0 | convention | line-too-long |
C0301 | Line too long (106/100) |
|
| 670 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
agentlib_mpc.models.serialized_ml_model (agentlib_mpc/models/serialized_ml_model.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/models/serialized_ml_model.py: Fatal error while checking 'agentlib_mpc/models/serialized_ml_model.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-09.txt'. |
|
| 1 | 0 | convention | wrong-import-order |
C0411 | standard import "import abc" should be placed before "import casadi as ca" |
|
| 1 | 0 | convention | ungrouped-imports |
C0412 | Imports from package abc are not grouped |
|
| 2 | 0 | convention | wrong-import-order |
C0411 | standard import "import json" should be placed before "import casadi as ca" |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "import logging" should be placed before "import casadi as ca" |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 5 | 0 | convention | ungrouped-imports |
C0412 | Imports from package numpy are not grouped |
|
| 7 | 0 | convention | wrong-import-order |
C0411 | standard import "from enum import Enum" should be placed before "import casadi as ca" |
|
| 7 | 0 | convention | ungrouped-imports |
C0412 | Imports from package enum are not grouped |
|
| 8 | 0 | convention | wrong-import-order |
C0411 | standard import "from copy import deepcopy" should be placed before "import casadi as ca" |
|
| 9 | 0 | error | import-error |
E0401 | Unable to import 'keras' |
|
| 9 | 0 | convention | ungrouped-imports |
C0412 | Imports from package keras are not grouped |
|
| 10 | 0 | error | import-error |
E0401 | Unable to import 'keras.src' |
|
| 11 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import casadi as ca" |
|
| 12 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 13 | 0 | error | import-error |
E0401 | Unable to import 'sklearn.gaussian_process' |
|
| 14 | 0 | error | import-error |
E0401 | Unable to import 'sklearn.gaussian_process.kernels' |
|
| 15 | 0 | error | import-error |
E0401 | Unable to import 'sklearn.linear_model' |
|
| 49 | 0 | convention | line-too-long |
C0301 | Line too long (101/100) |
|
| 104 | 0 | convention | line-too-long |
C0301 | Line too long (112/100) |
|
| 119 | 0 | convention | line-too-long |
C0301 | Line too long (114/100) |
|
| 133 | 0 | convention | line-too-long |
C0301 | Line too long (107/100) |
|
| 240 | 0 | convention | line-too-long |
C0301 | Line too long (111/100) |
|
| 245 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
|
| 250 | 0 | convention | line-too-long |
C0301 | Line too long (109/100) |
|
| 308 | 0 | convention | line-too-long |
C0301 | Line too long (101/100) |
|
| 412 | 0 | convention | line-too-long |
C0301 | Line too long (101/100) |
|
| 546 | 0 | convention | line-too-long |
C0301 | Line too long (264/100) |
|
| 664 | 0 | convention | line-too-long |
C0301 | Line too long (115/100) |
|
| 685 | 0 | convention | line-too-long |
C0301 | Line too long (105/100) |
agentlib_mpc.modules.InputPrediction (agentlib_mpc/modules/InputPrediction/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | invalid-name |
C0103 | Module name "InputPrediction" doesn't conform to snake_case naming style |
agentlib_mpc.modules.InputPrediction.__init__ (agentlib_mpc/modules/InputPrediction/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[35:91]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[108:162]
coup_names = [c.name for c in var_ref.couplings]
exchange_names = [c.name for c in var_ref.exchange]
pure_outs = [
m for m in model.outputs if m.name not in coup_names + exchange_names
]
self.outputs = OptimizationVariable.declare(
denotation="y",
variables=pure_outs,
ref_list=var_ref.outputs,
)
self.local_couplings = OptimizationVariable.declare(
denotation="local_couplings",
variables=[model.get(name) for name in coup_names],
ref_list=coup_names,
)
couplings_global = [coup.mean for coup in var_ref.couplings]
self.global_couplings = OptimizationParameter.declare(
denotation="global_couplings",
variables=[CasadiInput(name=coup) for coup in couplings_global],
ref_list=couplings_global,
)
multipliers = [coup.multiplier for coup in var_ref.couplings]
self.multipliers = OptimizationParameter.declare(
denotation="multipliers",
variables=[CasadiInput(name=coup) for coup in multipliers],
ref_list=multipliers,
)
self.local_exchange = OptimizationVariable.declare(
denotation="local_exchange",
variables=[model.get(name) for name in exchange_names],
ref_list=exchange_names,
)
couplings_mean_diff = [coup.mean_diff for coup in var_ref.exchange]
self.exchange_diff = OptimizationParameter.declare(
denotation="average_diff",
variables=[CasadiInput(name=coup) for coup in couplings_mean_diff],
ref_list=couplings_mean_diff,
)
multipliers = [coup.multiplier for coup in var_ref.exchange]
self.exchange_multipliers = OptimizationParameter.declare(
denotation="exchange_multipliers",
variables=[CasadiInput(name=coup) for coup in multipliers],
ref_list=multipliers,
)
self.penalty_factor = OptimizationParameter.declare(
denotation="rho",
variables=[CasadiParameter(name="penalty_factor")],
ref_list=["penalty_factor"],
)
# add admm terms to objective function |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[48:98]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[38:87]
self.states = OptimizationVariable.declare(
denotation="state",
variables=model.get_states(var_ref.states),
ref_list=var_ref.states,
assert_complete=True,
)
self.controls = OptimizationVariable.declare(
denotation="control",
variables=model.get_inputs(var_ref.controls),
ref_list=var_ref.controls,
assert_complete=True,
)
self.algebraics = OptimizationVariable.declare(
denotation="z",
variables=model.auxiliaries,
ref_list=[],
)
self.outputs = OptimizationVariable.declare(
denotation="y",
variables=model.outputs,
ref_list=var_ref.outputs,
)
# define parameters
self.non_controlled_inputs = OptimizationParameter.declare(
denotation="d",
variables=model.get_inputs(var_ref.inputs),
ref_list=var_ref.inputs,
assert_complete=True,
)
self.model_parameters = OptimizationParameter.declare(
denotation="parameter",
variables=model.parameters,
ref_list=var_ref.parameters,
)
self.initial_state = OptimizationParameter.declare(
denotation="initial_state",
variables=model.get_states(var_ref.states),
ref_list=var_ref.states,
use_in_stage_function=False,
assert_complete=True,
)
self.last_control = OptimizationParameter.declare(
denotation="initial_control",
variables=model.get_inputs(var_ref.controls),
ref_list=var_ref.controls,
use_in_stage_function=False,
assert_complete=True,
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[48:92]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[38:80]
self.states = OptimizationVariable.declare(
denotation="state",
variables=model.get_states(var_ref.states),
ref_list=var_ref.states,
assert_complete=True,
)
self.controls = OptimizationVariable.declare(
denotation="control",
variables=model.get_inputs(var_ref.controls),
ref_list=var_ref.controls,
assert_complete=True,
)
self.algebraics = OptimizationVariable.declare(
denotation="z",
variables=model.auxiliaries,
ref_list=[],
)
self.outputs = OptimizationVariable.declare(
denotation="y",
variables=model.outputs,
ref_list=var_ref.outputs,
)
# define parameters
self.non_controlled_inputs = OptimizationParameter.declare(
denotation="d",
variables=model.get_inputs(var_ref.inputs),
ref_list=var_ref.inputs,
assert_complete=True,
)
self.model_parameters = OptimizationParameter.declare(
denotation="parameter",
variables=model.parameters,
ref_list=var_ref.parameters,
)
self.initial_state = OptimizationParameter.declare(
denotation="initial_state",
variables=model.get_states(var_ref.states),
ref_list=var_ref.states,
use_in_stage_function=False,
assert_complete=True,
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[454:505]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[292:343]
all_input_variables[l_name] = new_lag_var
# add the mx variable to its lag time and denotation
lagged_inputs_j = lagged_inputs.setdefault(j, {})
lv_mx = lagged_inputs_j.setdefault(q_name, ca.DM([]))
lagged_inputs[j][q_name] = ca.vertcat(lv_mx, new_lag_var)
# keep track of the variable names that were added
lagged_input_names_j = lagged_input_names.setdefault(j, {})
lv_names = lagged_input_names_j.setdefault(q_name, [])
lv_names.append(v_name)
self._lagged_input_names = lagged_input_names
flat_lagged_inputs = {
f"{den}_{i}": mx
for i, subdict in lagged_inputs.items()
for den, mx in subdict.items()
}
all_outputs = system.sim_step(**all_input_variables)
state_output_it = (all_outputs[s_name] for s_name in system.states.full_names)
state_output = ca.vertcat(*state_output_it)
# aggregate outputs
outputs = [
state_output,
system.objective.get_casadi_expression(),
*constraints_func,
*constraints_lb,
*constraints_ub,
]
output_denotations = [
"next_states",
"cost_function",
*constraint_denotations,
*constraint_lb_denotations,
*constraint_ub_denotations,
]
# function describing system dynamics and cost function
self._stage_function = ca.Function(
"f",
inputs + list(flat_lagged_inputs.values()),
outputs,
# input handles to make kwarg use possible and to debug
input_denotations + list(flat_lagged_inputs),
# output handles to make kwarg use possible and to debug
output_denotations,
)
def _create_lag_structure_for_denotations(self, system: CasadiMLSystem): |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[331:363]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[168:200]
self.pred_time = 0
for time in prediction_grid[1:]:
self.pred_time = time
mx_dict[time][sys.states.name] = self.add_opt_var(sys.states)
self.pred_time += ts
mx_dict[self.pred_time] = {sys.states.name: self.add_opt_var(sys.states)}
all_quantities = sys.all_system_quantities()
# add constraints and create the objective function for all stages
for time in prediction_grid:
stage_mx = mx_dict[time]
if delta_u_objectives:
u_prev = mx_dict[time - ts][sys.controls.name]
uk = stage_mx[sys.controls.name]
for delta_obj in delta_u_objectives:
self.objective_function += delta_u.get_objective(
sys, delta_obj, u_prev, uk, const_par
)
# get stage arguments from current time step
stage_arguments = {
# variables
sys.states.name: stage_mx[sys.states.name],
sys.algebraics.name: stage_mx[sys.algebraics.name],
sys.outputs.name: stage_mx[sys.outputs.name],
# parameters
sys.controls.name: stage_mx[sys.controls.name],
sys.non_controlled_inputs.name: stage_mx[
sys.non_controlled_inputs.name
],
sys.model_parameters.name: const_par, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[253:291]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[118:156]
delta_u_objectives = delta_u.get_delta_u_objectives(sys)
pre_grid_states = [ts * i for i in range(-sys.max_lag + 1, 1)]
inputs_lag = min(-2, -sys.max_lag) # at least -2, to consider last control
pre_grid_inputs = [ts * i for i in range(inputs_lag + 1, 0)]
prediction_grid = [ts * i for i in range(0, n)]
# sort for debugging purposes
full_grid = sorted(
list(set(prediction_grid + pre_grid_inputs + pre_grid_states))
)
# dict[time, dict[denotation, ca.MX]]
mx_dict: dict[float, dict[str, ca.MX]] = {time: {} for time in full_grid}
# add past state variables
for time in pre_grid_states:
self.pred_time = time
x_past = self.add_opt_par(sys.initial_state)
# add past states as optimization variables with fixed values so they can
# be accessed by the first few steps, when there are lags
mx_dict[time][sys.states.name] = self.add_opt_var(
sys.states, lb=x_past, ub=x_past, guess=x_past
)
mx_dict[time][sys.initial_state.name] = x_past
# add past inputs
for time in pre_grid_inputs:
self.pred_time = time
d = sys.non_controlled_inputs
mx_dict[time][d.name] = self.add_opt_par(d)
u_past = self.add_opt_par(sys.last_control)
mx_dict[time][sys.controls.name] = self.add_opt_var(
sys.controls, lb=u_past, ub=u_past, guess=u_past
)
mx_dict[time][sys.last_control.name] = u_past
# admm quantities |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[346:394]
==agentlib_mpc.optimization_backends.casadi_.mhe:[365:413]
d = self.options.collocation_order
polynomial = self.options.collocation_method
# Get collocation points
tau_root = np.append(0, ca.collocation_points(d, polynomial))
# Coefficients of the collocation equation
C = np.zeros((d + 1, d + 1))
# Coefficients of the continuity equation
D = np.zeros(d + 1)
# Coefficients of the quadrature function
B = np.zeros(d + 1)
# Construct polynomial basis
for j in range(d + 1):
# Construct Lagrange polynomials to get the polynomial basis at
# the collocation point
p = np.poly1d([1])
for r in range(d + 1):
if r != j:
p *= np.poly1d([1, -tau_root[r]]) / (tau_root[j] - tau_root[r])
# Evaluate the polynomial at the final time to get the
# coefficients of the continuity equation
D[j] = p(1.0)
# Evaluate the time derivative of the polynomial at all collocation
# points to get the coefficients of the continuity equation
pder = np.polyder(p)
for r in range(d + 1):
C[j, r] = pder(tau_root[r])
# Evaluate the integral of the polynomial to get the coefficients
# of the quadrature function
pint = np.polyint(p)
B[j] = pint(1.0)
return CollocationMatrices(
order=d,
root=tau_root,
B=B,
C=C,
D=D,
)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[453:483]
==agentlib_mpc.utils.plotting.mpc_dashboard:[316:353]
),
style={
"min-width": "600px",
"min-height": "400px",
"max-width": "900px",
"max-height": "450px",
},
),
],
className="draggable",
)
)
return html.Div(
components,
style={
"display": "grid",
"grid-template-columns": "repeat(auto-fit, minmax(600px, 1fr))",
"grid-gap": "20px",
"padding": "20px",
"min-width": "600px",
"min-height": "200px",
},
id="plot-container",
)
def obj_plot(
data, convert_to: Literal["seconds", "minutes", "hours", "days"] = "seconds"
) -> dcc.Graph: |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[88:117]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[175:205]
)
# add admm terms to objective function
rho = self.penalty_factor.full_symbolic[0]
admm_terms = {}
for i, coupling in enumerate(var_ref.couplings):
admm_in = self.global_couplings.full_symbolic[i]
admm_out = self.local_couplings.full_symbolic[i]
admm_lam = self.multipliers.full_symbolic[i]
admm_terms[f"admm_multiplier_{coupling.name}"] = admm_lam * admm_out
admm_terms[f"admm_augmentation_{coupling.name}"] = (
rho / 2 * (admm_in - admm_out) ** 2
)
for i, coupling in enumerate(var_ref.exchange):
admm_in = self.exchange_diff.full_symbolic[i]
admm_out = self.local_exchange.full_symbolic[i]
admm_lam = self.exchange_multipliers.full_symbolic[i]
admm_terms[f"admm_multiplier_{coupling.name}"] = admm_lam * admm_out
admm_terms[f"admm_augmentation_{coupling.name}"] = (
rho / 2 * (admm_in - admm_out) ** 2
)
for name, term in admm_terms.items():
self.objective.objectives += [
SubObjective(term, name="admm_augmentation_term")
]
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[76:113]
==agentlib_mpc.optimization_backends.casadi_.minlp:[109:146]
xk_end, constraints = self._collocation_inner_loop(
collocation=collocation_matrices,
state_at_beginning=xk,
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time
self.k += 1
self.pred_time = ts * self.k
# New NLP variable for differential state at end of interval
xk = self.add_opt_var(sys.states)
# Add continuity constraint
self.add_constraint(xk - xk_end, gap_closing=True)
# add collocation constraints later for fatrop
for constraint in constraints:
self.add_constraint(*constraint)
class MultipleShooting(basic.MultipleShooting):
def _discretize(self, sys: FullSystem):
"""
Defines a multiple shooting discretization
"""
vars_dict = {sys.states.name: {}}
n = self.options.prediction_horizon
ts = self.options.time_step
opts = {"t0": 0, "tf": ts}
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
vars_dict[sys.states.name][0] = xk |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.mhe:[484:518]
==agentlib_mpc.utils.sampling:[118:152]
if (target_grid.shape == source_grid.shape) and all(target_grid == source_grid):
return list(values)
values = np.array(values)
# check requested portion of trajectory, whether the most recent value in the
# source grid is older than the first value in the MHE trajectory
if target_grid[0] >= source_grid[-1]:
# return the last value of the trajectory if requested sample
# starts out of range
logger.warning(
"Latest value of source grid %s is older than "
"current time (%s. Returning latest value anyway.",
source_grid[-1],
current,
)
return [values[-1]] * target_grid_length
# determine whether the target grid lies within the available source grid, and
# how many entries to extrapolate on either side
source_grid_oldest_time: float = source_grid[0]
source_grid_newest_time: float = source_grid[-1]
source_is_recent_enough: np.ndarray = target_grid < source_grid_newest_time
source_is_old_enough: np.ndarray = target_grid > source_grid_oldest_time
number_of_missing_old_entries: int = target_grid_length - np.count_nonzero(
source_is_old_enough
)
number_of_missing_new_entries: int = target_grid_length - np.count_nonzero(
source_is_recent_enough
)
# shorten target interpolation grid by extra points that go above or below
# available data range
target_grid = target_grid[source_is_recent_enough * source_is_old_enough]
# interpolate data to match new grid |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[221:277]
==agentlib_mpc.optimization_backends.casadi_.mhe:[242:298]
*constraints_func,
*constraints_lb,
*constraints_ub,
]
output_denotations = [
"ode",
"cost_function",
*constraint_denotations,
*constraint_lb_denotations,
*constraint_ub_denotations,
]
# function describing system dynamics and cost function
self._stage_function = ca.Function(
"f",
inputs,
outputs,
# input handles to make kwarg use possible and to debug
input_denotations,
# output handles to make kwarg use possible and to debug
output_denotations,
)
def initialize(self, system: MHESystem, solver_factory: SolverFactory):
"""Initializes the trajectory optimization problem, creating all symbolic
variables of the OCP, the mapping function and the numerical solver."""
self._construct_stage_function(system)
super().initialize(system=system, solver_factory=solver_factory)
def _collocation_inner_loop(
self,
state_at_beginning: ca.MX,
collocation: CollocationMatrices,
states: OptimizationVariable,
opt_vars: list[OptimizationVariable],
opt_pars: list[OptimizationParameter],
const: dict[OptimizationQuantity, ca.MX],
) -> ca.MX:
"""
Constructs the inner loop of a collocation discretization. Takes the
Args
collocation: The collocation matrices
state_at_beginning: The casadi MX instance representing the state at the
beginning of the collocation interval
states: The OptimizationVariable representing the states
opt_vars: The OptimizationVariables which should be defined at each
collocation point
par_vars: The OptimizationParameters which should be defined at each
collocation point
const: Variables or parameters to feed into the system function that are
constant over the inner loop. Value is the current MX to be used.
Returns:
state_k_end[MX]: state at the end of collocation interval
""" |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[371:413]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[201:231]
}
# collect stage arguments for lagged variables
for lag, denotation_dict in self._lagged_input_names.items():
for denotation, var_names in denotation_dict.items():
l_name = name_with_lag(denotation, lag)
mx_list = []
for v_name in var_names:
# add only the singular variable which has a lag on this level
# to the stage arguments
index = all_quantities[denotation].full_names.index(v_name)
mx_list.append(mx_dict[time - lag * ts][denotation][index])
stage_arguments[l_name] = ca.vertcat(*mx_list)
# evaluate a stage, add path constraints, multiple shooting constraints
# and add to the objective function
stage_result = self._stage_function(**stage_arguments)
self.add_constraint(
stage_result["model_constraints"],
lb=stage_result["lb_model_constraints"],
ub=stage_result["ub_model_constraints"],
)
self.add_constraint(
stage_result["next_states"] - mx_dict[time + ts][sys.states.name]
)
self.objective_function += stage_result["cost_function"] * ts
def initialize(self, system: CasadiMLSystem, solver_factory: SolverFactory):
"""Initializes the trajectory optimization problem, creating all symbolic
variables of the OCP, the mapping function and the numerical solver.""" |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[497:521]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[252:276]
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
]
inputs.append(system.time)
input_denotations = [
q.name
for denotation, q in all_system_quantities.items()
if q.use_in_stage_function
]
input_denotations.append("__time")
# aggregate constraints
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# create a dictionary which holds all the inputs for the sim step of the model |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[278:309]
==agentlib_mpc.optimization_backends.casadi_.mhe:[298:331]
constants = {var.name: mx for var, mx in const.items()}
# remember time at start of collocation loop
start_time = self.pred_time
# shorthands
ts = self.options.time_step
# State variables at collocation points
state_collocation = []
opt_vars_collocation = []
opt_pars_collocation = []
# add variables at collocation points
for j in range(collocation.order): # d is collocation order
# set time
self.pred_time = start_time + collocation.root[j + 1] * ts
# differential state
state_kj = self.add_opt_var(states, post_den=f"_{j}")
state_collocation.append(state_kj)
opt_vars_collocation.append({})
for opt_var in opt_vars:
var_kj = self.add_opt_var(opt_var, post_den=f"_{j}")
opt_vars_collocation[-1].update({opt_var.name: var_kj})
opt_pars_collocation.append({})
for opt_par in opt_pars:
par_kj = self.add_opt_par(opt_par, post_den=f"_{j}")
opt_pars_collocation[-1].update({opt_par.name: par_kj}) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[414:436]
==agentlib_mpc.optimization_backends.casadi_.mhe:[217:239]
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
]
input_denotations = [
q.name
for denotation, q in all_system_quantities.items()
if q.use_in_stage_function
]
# aggregate constraints
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# create a dictionary which holds all the inputs for the sim step of the model |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[171:196]
==agentlib_mpc.optimization_backends.casadi_.minlp:[108:133]
}
xk_end, constraints = self._collocation_inner_loop(
collocation=collocation_matrices,
state_at_beginning=xk,
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time
self.k += 1
self.pred_time = ts * self.k
# New NLP variables at end of interval
xk = self.add_opt_var(sys.states)
# Add continuity constraint
self.add_constraint(xk - xk_end, gap_closing=True)
# add collocation constraints later for fatrop
for constraint in constraints:
self.add_constraint(*constraint)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[172:196]
==agentlib_mpc.optimization_backends.casadi_.full:[76:100]
xk_end, constraints = self._collocation_inner_loop(
collocation=collocation_matrices,
state_at_beginning=xk,
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time
self.k += 1
self.pred_time = ts * self.k
# New NLP variables at end of interval
xk = self.add_opt_var(sys.states)
# Add continuity constraint
self.add_constraint(xk - xk_end, gap_closing=True)
# add collocation constraints later for fatrop
for constraint in constraints:
self.add_constraint(*constraint)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[323:339]
==agentlib_mpc.optimization_backends.casadi_.basic:[460:494]
sys.non_controlled_inputs.full_symbolic,
sys.model_parameters.full_symbolic,
sys.algebraics.full_symbolic,
sys.outputs.full_symbolic,
)
integrator_ode = {"x": x, "p": p, "ode": ode}
if integrator == Integrators.euler:
xk_end = x + ode * opts["tf"]
opt_integrator = ca.Function(
"system", [x, p], [xk_end], ["x0", "p"], ["xf"]
)
else: # rk, cvodes
opt_integrator = ca.integrator("system", integrator, integrator_ode, opts)
return opt_integrator
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[154:171]
==agentlib_mpc.optimization_backends.casadi_.minlp:[174:190]
)
xk_end = fk["xf"]
# calculate model constraint
self.k += 1
self.pred_time = ts * self.k
xk = self.add_opt_var(sys.states)
vars_dict[sys.states.name][self.k] = xk
self.add_constraint(xk - xk_end, gap_closing=True)
self.add_constraint(
stage["model_constraints"],
lb=stage["lb_model_constraints"],
ub=stage["ub_model_constraints"],
)
self.objective_function += stage["cost_function"] * ts
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[194:207]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[252:265]
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
]
inputs.append(system.time)
input_denotations = [
q.name
for denotation, q in all_system_quantities.items()
if q.use_in_stage_function
] |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[453:466]
==agentlib_mpc.utils.plotting.mpc_dashboard:[288:301]
),
style={
"min-width": "600px",
"min-height": "400px",
"max-width": "900px",
"max-height": "450px",
},
),
],
className="draggable",
)
)
# Handle alternative column structures explicitly without exception handling |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[253:289]
==agentlib_mpc.utils.plotting.mpc_dashboard:[223:258]
fig.update_layout(
showlegend=True,
legend=dict(
groupclick="toggleitem",
itemclick="toggle",
itemdoubleclick="toggleothers",
),
xaxis_title=x_axis_label,
yaxis_title=y_axis_label,
uirevision="same",
)
return fig
def make_components(
data: pd.DataFrame,
convert_to: str,
stats: Optional[pd.DataFrame] = None,
use_datetime: bool = False,
step: bool = False,
) -> html.Div:
"""
Create dashboard components from MPC data and stats.
Args:
data: DataFrame with MPC data
convert_to: Time unit for plotting
stats: Optional DataFrame with MPC statistics
use_datetime: Whether to interpret timestamps as datetime
step: Whether to use step plots
Returns:
Dash HTML Div containing all components
""" |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[205:227]
==agentlib_mpc.optimization_backends.casadi_.core.system:[57:76]
return [
var
for var in self.__dict__.values()
if isinstance(var, OptimizationVariable)
]
@property
def parameters(self) -> list[OptimizationParameter]:
return [
var
for var in self.__dict__.values()
if isinstance(var, OptimizationParameter)
]
@property
def quantities(self) -> list[Union[OptimizationParameter, OptimizationVariable]]:
return self.variables + self.parameters
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[312:326]
==agentlib_mpc.optimization_backends.casadi_.mhe:[331:345]
state_k_end = collocation.D[0] * state_at_beginning
for j in range(1, collocation.order + 1):
# Expression for the state derivative at the collocation point
xp = collocation.C[0, j] * state_at_beginning
for r in range(collocation.order):
xp = xp + collocation.C[r + 1, j] * state_collocation[r]
stage = self._stage_function(
**{states.name: state_collocation[j - 1]},
**opt_pars_collocation[j - 1],
**opt_vars_collocation[j - 1],
**constants,
)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[399:413]
==agentlib_mpc.optimization_backends.casadi_.minlp:[138:152]
vars_dict = {sys.states.name: {}}
n = self.options.prediction_horizon
ts = self.options.time_step
opts = {"t0": 0, "tf": ts}
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
vars_dict[sys.states.name][0] = xk
const_par = self.add_opt_par(sys.model_parameters)
# ODE is used here because the algebraics can be calculated with the stage function
opt_integrator = self._create_ode(sys, opts, integrator=self.options.integrator)
# initiate states
while self.k < n:
uk = self.add_opt_var(sys.controls) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[179:191]
==agentlib_mpc.utils.plotting.mpc_dashboard:[154:168]
actual_values[time_converted] = prediction.loc[0]
except KeyError:
pass
prediction.index = (prediction.index + time_seconds) / TIME_CONVERSION[
convert_to
]
progress = i / number_of_predictions
prediction_color = interpolate_colors(
progress=progress,
colors=[EBCColors.red, EBCColors.dark_grey],
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[16:28]
==agentlib_mpc.optimization_backends.casadi_.mhe:[18:30]
from agentlib_mpc.optimization_backends.casadi_.core.casadi_backend import CasADiBackend
from agentlib_mpc.optimization_backends.casadi_.core.VariableGroup import (
OptimizationQuantity,
OptimizationVariable,
OptimizationParameter,
)
from agentlib_mpc.optimization_backends.casadi_.core.discretization import (
Discretization,
)
from agentlib_mpc.optimization_backends.casadi_.core.system import System
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[413:426]
==agentlib_mpc.optimization_backends.casadi_.full:[132:146]
dk = self.add_opt_par(sys.non_controlled_inputs)
zk = self.add_opt_var(sys.algebraics)
yk = self.add_opt_var(sys.outputs)
# get path constraints and objective values (stage)
stage_arguments = {
# variables
sys.states.name: xk,
sys.algebraics.name: zk,
sys.outputs.name: yk,
# parameters
sys.controls.name: uk,
sys.non_controlled_inputs.name: dk,
sys.model_parameters.name: const_par, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.backend:[69:81]
==agentlib_mpc.optimization_backends.casadi_.minlp_cia:[47:59]
except FileNotFoundError:
pass
else:
if os.path.isfile(info.data["results_file"]):
raise FileExistsError(
f"Results file {res_file} already exists and will not be "
f"overwritten automatically. Set 'overwrite_result_file' to "
f"True to enable automatic overwrite it."
)
return overwrite_result_file
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.mhe:[458:470]
==agentlib_mpc.utils.sampling:[79:91]
target_grid_length = len(grid)
if isinstance(trajectory, (float, int)):
# return constant trajectory for scalars
return [trajectory] * target_grid_length
if isinstance(trajectory, list):
# return lists of matching length without timestamps
if len(trajectory) == target_grid_length:
return trajectory
raise ValueError(
f"Passed list with length {len(trajectory)} "
f"does not match target ({target_grid_length})."
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[428:441]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[268:280]
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# create a dictionary which holds all the inputs for the sim step of the model
all_input_variables = {}
lagged_inputs: dict[int, dict[str, ca.MX]] = {}
# dict[lag, dict[denotation, list[var_name]]]
lagged_input_names: dict[int, dict[str, list[str]]] = {} |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[191:201]
==agentlib_mpc.optimization_backends.casadi_.mhe:[214:224]
all_system_quantities: dict[str, OptimizationQuantity] = {
var.name: var for var in system.quantities
}
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
] |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[171:182]
==agentlib_mpc.optimization_backends.casadi_.basic:[150:161]
}
xk_end, constraints = self._collocation_inner_loop(
collocation=collocation_matrices,
state_at_beginning=xk,
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[436:446]
==agentlib_mpc.optimization_backends.casadi_.full:[151:160]
fk = opt_integrator(
x0=xk,
p=ca.vertcat(uk, dk, const_par, zk, yk),
)
xk_end = fk["xf"]
self.k += 1
self.pred_time = ts * self.k
xk = self.add_opt_var(sys.states)
vars_dict[sys.states.name][self.k] = xk |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.dmpc.admm.admm_coordinator:[60:68]
==agentlib_mpc.modules.mpc.mpc:[46:54]
)
sampling_time: Optional[float] = Field(
default=None, # seconds
description="Sampling interval for control steps. If None, will be the same as"
" time step. Does not affect the discretization of the MPC, "
"only the interval with which there will be optimization steps.",
validate_default=True,
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[329:339]
==agentlib_mpc.modules.mpc.mpc:[418:428]
results = load_mpc(results_file)
stats = load_mpc_stats(results_file)
return results, stats
def cleanup_results(self):
results_file = self.optimization_backend.config.results_file
if not results_file:
return
os.remove(results_file)
os.remove(mpc_datamodels.stats_path(results_file)) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.mpc.minlp_mpc:[81:96]
==agentlib_mpc.modules.mpc.mpc:[244:261]
)
# return dict should have model variables as keys, not mpc variables
unassigned_by_model_var = {
"states": unassigned_by_mpc_var["states"],
"inputs": intersection_input,
"outputs": unassigned_by_mpc_var["outputs"],
"parameters": unassigned_by_mpc_var["parameters"],
}
return unassigned_by_model_var
def set_actuation(self, solution):
"""Takes the solution from optimization backend and sends the first
step to AgentVariables.""" |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.mpc.minlp_mpc:[65:77]
==agentlib_mpc.modules.mpc.mpc:[230:242]
("inputs", self.model.get_input_names(), "Inputs"),
("outputs", self.model.get_output_names(), "Outputs"),
("parameters", self.model.get_parameter_names(), "Parameters"),
]
# perform validations and make a dictionary of unassigned variables
unassigned_by_mpc_var = {
key: self.assert_subset(self.var_ref.__dict__[key], names, message)
for key, names, message in args
}
# fix unassigned values for inputs |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.deactivate_mpc.deactivate_mpc:[10:18]
==agentlib_mpc.modules.mpc.skippable_mixin:[20:28]
active: AgentVariable = Field(
default=AgentVariable(
name=mpc_datamodels.MPC_FLAG_ACTIVE,
description="MPC is active",
type="bool",
value=True,
shared=False,
), |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[139:154]
==agentlib_mpc.optimization_backends.casadi_.full:[57:72]
delta_u_objectives = delta_u.get_delta_u_objectives(sys)
# Formulate the NLP
# loop over prediction horizon
while self.k < n:
# New NLP variable for the control
u_prev = uk
uk = self.add_opt_var(sys.controls)
for delta_obj in delta_u_objectives:
self.objective_function += delta_u.get_objective(
sys, delta_obj, u_prev, uk, const_par
)
# perform inner collocation loop |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[447:466]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[353:372]
lag = system.lags_dict.get(v_name, 1)
# if lag exists, we have to create and organize new variables
for j in range(1, lag):
# create an MX variable for this lag
l_name = name_with_lag(v_name, j)
new_lag_var = ca.MX.sym(l_name)
all_input_variables[l_name] = new_lag_var
# add the mx variable to its lag time and denotation
lagged_inputs_j = lagged_inputs.setdefault(j, {})
lv_mx = lagged_inputs_j.setdefault(q_name, ca.DM([]))
lagged_inputs[j][q_name] = ca.vertcat(lv_mx, new_lag_var)
# keep track of the variable names that were added
lagged_input_names_j = lagged_input_names.setdefault(j, {})
lv_names = lagged_input_names_j.setdefault(q_name, [])
lv_names.append(v_name)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[303:313]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[156:168]
for time in prediction_grid:
self.pred_time = time
mx_dict[time][sys.controls.name] = self.add_opt_var(sys.controls)
mx_dict[time][sys.non_controlled_inputs.name] = self.add_opt_par(
sys.non_controlled_inputs
)
mx_dict[time][sys.algebraics.name] = self.add_opt_var(sys.algebraics)
mx_dict[time][sys.outputs.name] = self.add_opt_var(sys.outputs)
# create the state grid
# x0 will always be the state at time 0 since the loop it is defined in starts
# in the past and finishes at 0 |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[210:220]
==agentlib_mpc.optimization_backends.casadi_.mhe:[231:241]
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# aggregate outputs
outputs = [
system.ode, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[103:120]
==agentlib_mpc.optimization_backends.casadi_.mhe:[125:135]
@dataclasses.dataclass
class CollocationMatrices:
order: int
root: np.ndarray
B: np.ndarray
C: np.ndarray
D: np.ndarray
class DirectCollocation(Discretization): |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[413:424]
==agentlib_mpc.optimization_backends.casadi_.minlp:[153:164]
dk = self.add_opt_par(sys.non_controlled_inputs)
zk = self.add_opt_var(sys.algebraics)
yk = self.add_opt_var(sys.outputs)
# get stage
stage_arguments = {
# variables
sys.states.name: xk,
sys.algebraics.name: zk,
sys.outputs.name: yk,
# parameters
sys.controls.name: uk, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[151:161]
==agentlib_mpc.optimization_backends.casadi_.full:[76:86]
xk_end, constraints = self._collocation_inner_loop(
collocation=collocation_matrices,
state_at_beginning=xk,
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.mpc.minlp_mpc:[57:64]
==agentlib_mpc.modules.mpc.mpc:[223:230]
args = [
(
"states",
self.model.get_state_names(),
"Differential variables / States",
),
("controls", self.model.get_input_names(), "Controls"), |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[143:154]
==agentlib_mpc.optimization_backends.casadi_.full:[123:132]
while self.k < n:
u_prev = uk
uk = self.add_opt_var(sys.controls)
for delta_obj in delta_u_objectives:
self.objective_function += delta_u.get_objective(
sys, delta_obj, u_prev, uk, const_par
)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[124:137]
==agentlib_mpc.optimization_backends.casadi_.full:[43:57]
collocation_matrices = self._collocation_polynomial()
# shorthands
n = self.options.prediction_horizon
ts = self.options.time_step
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
uk = self.add_opt_par(sys.last_control)
# Parameters that are constant over the horizon
const_par = self.add_opt_par(sys.model_parameters)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[413:421]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[251:259]
all_system_quantities = system.all_system_quantities()
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
] |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[530:539]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[487:496]
"cost_function",
*constraint_denotations,
*constraint_lb_denotations,
*constraint_ub_denotations,
]
# function describing system dynamics and cost function
self._stage_function = ca.Function(
"f", |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[399:407]
==agentlib_mpc.optimization_backends.casadi_.full:[105:113]
vars_dict = {sys.states.name: {}}
n = self.options.prediction_horizon
ts = self.options.time_step
opts = {"t0": 0, "tf": ts}
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
vars_dict[sys.states.name][0] = xk |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[227:236]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[325:334]
"cost_function",
*constraint_denotations,
*constraint_lb_denotations,
*constraint_ub_denotations,
]
# function describing system dynamics and cost function
self._stage_function = ca.Function(
"f", |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.mhe:[532:542]
==agentlib_mpc.utils.sampling:[154:168]
)
# extrapolate sequence with last available value if necessary
interpolated_trajectory = (
[values[0]] * number_of_missing_old_entries
+ sequence_new
+ [values[-1]] * number_of_missing_new_entries
)
return interpolated_trajectory |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[219:229]
==agentlib_mpc.modules.mpc.mpc_full:[89:97]
self.agent.data_broker.register_callback(
alias=var.alias,
source=var.source,
callback=self._callback_hist_vars,
name=var.name,
)
# registers callback which listens to alias/source of the state variable, but
# gets the name of the measured state as parameter, to correctly save it in the
# history |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[145:151]
==agentlib_mpc.modules.mpc.mpc:[177:183]
self.init_status = mpc_datamodels.InitStatus.during_update
opti_back = create_optimization_backend(
self.config.optimization_backend, self.agent.id
)
opti_back.register_logger(self.logger)
disc_opts = opti_back.config.discretization_options |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[79:87]
==agentlib_mpc.optimization_backends.casadi_.mhe:[181:189]
states=sys.states,
opt_vars=opt_vars_inside_inner,
opt_pars=opt_pars_inside_inner,
const=constant_over_inner,
)
# increment loop counter and time
self.k += 1 |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[66:75]
==agentlib_mpc.optimization_backends.casadi_.minlp:[95:104]
for delta_obj in delta_u_objectives:
self.objective_function += delta_u.get_objective(
sys, delta_obj, u_prev, uk, const_par
)
# perform inner collocation loop
opt_vars_inside_inner = [sys.algebraics, sys.outputs]
opt_pars_inside_inner = [sys.non_controlled_inputs]
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[35:52]
==agentlib_mpc.optimization_backends.casadi_.minlp:[62:80]
class DirectCollocation(basic.DirectCollocation):
def _discretize(self, sys: CasadiMINLPSystem):
"""
Defines a direct collocation discretization.
# pylint: disable=invalid-name
"""
# setup the polynomial base
collocation_matrices = self._collocation_polynomial()
# shorthands
n = self.options.prediction_horizon
ts = self.options.time_step
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
|
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[99:105]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[87:93]
self.model_constraints = Constraint(
function=ca.vertcat(*[c.function for c in model.get_constraints()]),
lb=ca.vertcat(*[c.lb for c in model.get_constraints()]),
ub=ca.vertcat(*[c.ub for c in model.get_constraints()]),
)
self.sim_step = model.make_predict_function_for_mpc() |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[252:259]
==agentlib_mpc.optimization_backends.casadi_.mhe:[217:224]
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
] |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[523:529]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[480:486]
system.objective.get_casadi_expression(),
*constraints_func,
*constraints_lb,
*constraints_ub,
]
output_denotations = [ |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[513:521]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[428:436]
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# create a dictionary which holds all the inputs for the sim step of the model |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[194:201]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[414:421]
constraints = {"model_constraints": system.model_constraints}
inputs = [
q.full_symbolic
for q in all_system_quantities.values()
if q.use_in_stage_function
] |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[94:100]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[98:104]
self.objective = model.objective
self.model_constraints = Constraint(
function=ca.vertcat(*[c.function for c in model.get_constraints()]),
lb=ca.vertcat(*[c.lb for c in model.get_constraints()]),
ub=ca.vertcat(*[c.ub for c in model.get_constraints()]),
) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[5:11]
==agentlib_mpc.optimization_backends.casadi_.mhe:[9:15]
from agentlib_mpc.data_structures.casadi_utils import (
Constraint,
LB_PREFIX,
UB_PREFIX,
DiscretizationMethod,
SolverFactory, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[439:446]
==agentlib_mpc.optimization_backends.casadi_.minlp:[174:181]
)
xk_end = fk["xf"]
# calculate model constraint
self.k += 1
self.pred_time = ts * self.k
xk = self.add_opt_var(sys.states)
vars_dict[sys.states.name][self.k] = xk |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[314:322]
==agentlib_mpc.optimization_backends.casadi_.basic:[451:460]
if sys.states.full_symbolic.shape[0] == 0:
return lambda *args, **kwargs: {"xf": ca.MX.sym("xk_end", 0)}
ode = sys.ode
# create inputs
x = sys.states.full_symbolic
p = ca.vertcat(
sys.controls.full_symbolic, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[220:226]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[318:324]
system.objective.get_casadi_expression(),
*constraints_func,
*constraints_lb,
*constraints_ub,
]
output_denotations = [ |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[210:218]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[268:276]
constraints_func = [c.function for c in constraints.values()]
constraints_lb = [c.lb for c in constraints.values()]
constraints_ub = [c.ub for c in constraints.values()]
constraint_denotations = list(constraints.keys())
constraint_lb_denotations = [LB_PREFIX + k for k in constraints]
constraint_ub_denotations = [UB_PREFIX + k for k in constraints]
# aggregate outputs |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.admm_dashboard:[19:37]
==agentlib_mpc.utils.plotting.interactive:[17:30]
except ImportError as e:
raise OptionalDependencyError(
dependency_name="interactive",
dependency_install="plotly, dash",
used_object="interactive",
) from e
def load_agent_data(directory: str) -> Dict[str, pd.DataFrame]:
"""
Load MPC data for multiple agents from files containing 'admm' in their name.
Args:
directory (str): Directory path containing the data files.
Returns:
Dict[str, pd.DataFrame]: Dictionary with agent names as keys and their data as values.
""" |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[102:108]
==agentlib_mpc.utils.plotting.mpc_dashboard:[317:323]
style={
"min-width": "600px",
"min-height": "400px",
"max-width": "900px",
"max-height": "450px",
}, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[51:57]
==agentlib_mpc.utils.plotting.mpc_dashboard:[289:295]
style={
"min-width": "600px",
"min-height": "400px",
"max-width": "900px",
"max-height": "450px",
}, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[444:450]
==agentlib_mpc.utils.plotting.mpc_dashboard:[277:283]
components.append(
html.Div(
[
dcc.Graph(
id=f"plot-{column}",
figure=plot_mpc_plotly( |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[90:96]
==agentlib_mpc.utils.plotting.mpc_dashboard:[224:230]
showlegend=True,
legend=dict(
groupclick="toggleitem",
itemclick="toggle",
itemdoubleclick="toggleothers",
), |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.mhe:[473:481]
==agentlib_mpc.utils.sampling:[103:111]
else:
raise TypeError(
f"Passed trajectory of type '{type(trajectory)}' " f"cannot be sampled."
)
target_grid = np.array(grid) + current
# expand scalar values
if len(source_grid) == 1: |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.machine_learning_plugins.physXAI.model_config_creation:[153:160]
==agentlib_mpc.models.serialized_ml_model:[612:618]
"coef": model.coef_.tolist(),
"intercept": model.intercept_.tolist(),
"n_features_in": model.n_features_in_,
"rank": model.rank_,
"singular": model.singular_.tolist(),
} |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.dmpc.admm.admm:[832:841]
==agentlib_mpc.modules.mpc.mpc_full:[111:120]
for hist_var in self._lags_dict_seconds:
past_values = self.history[hist_var]
if not past_values:
# if the history of a variable is empty, fallback to the scalar value
continue
# create copy to not mess up scalar value of original variable in case
# fallback is needed
updated_var = variables[hist_var].copy( |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[137:145]
==agentlib_mpc.modules.mpc.mpc:[288:293]
except (RuntimeError, ValueError) as err:
raise ConfigurationError(
f"The optimization backend of Agent {self.source} could not "
f"finish its setup!"
) from err |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.modules.mpc.minlp_mpc:[103:109]
==agentlib_mpc.modules.mpc.mpc:[423:428]
results_file = self.optimization_backend.config.results_file
if not results_file:
return
os.remove(results_file)
os.remove(mpc_datamodels.stats_path(results_file)) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[124:133]
==agentlib_mpc.optimization_backends.casadi_.minlp:[70:80]
collocation_matrices = self._collocation_polynomial()
# shorthands
n = self.options.prediction_horizon
ts = self.options.time_step
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[55:66]
==agentlib_mpc.optimization_backends.casadi_.minlp:[83:93]
const_par = self.add_opt_par(sys.model_parameters)
delta_u_objectives = delta_u.get_delta_u_objectives(sys)
# Formulate the NLP
# loop over prediction horizon
while self.k < n:
# New NLP variable for the control
u_prev = uk
uk = self.add_opt_var(sys.controls) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[120:131]
==agentlib_mpc.optimization_backends.casadi_.full:[43:52]
collocation_matrices = self._collocation_polynomial()
# shorthands
n = self.options.prediction_horizon
ts = self.options.time_step
# Initial State
x0 = self.add_opt_par(sys.initial_state)
xk = self.add_opt_var(sys.states, lb=x0, ub=x0, guess=x0)
# Parameters that are constant over the horizon |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.optimization_backends.backend:[64:69]
==agentlib_mpc.optimization_backends.casadi_.minlp_cia:[40:45]
if res_file and info.data["save_results"]:
if overwrite_result_file:
try:
os.remove(res_file)
os.remove(mpc_datamodels.stats_path(res_file)) |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.admm_dashboard:[532:537]
==agentlib_mpc.utils.plotting.interactive:[36:41]
xref="paper",
yref="paper",
x=0.5,
y=0.5,
showarrow=False, |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.admm_dashboard:[13:18]
==agentlib_mpc.utils.plotting.interactive:[12:17]
try:
import dash
from dash import html, dcc
from dash.dependencies import Input, Output, State
import plotly.graph_objects as go |
|
| 1 | 0 | refactor | duplicate-code |
R0801 | Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[209:214]
==agentlib_mpc.utils.plotting.mpc_dashboard:[172:177]
x=prediction.index,
y=prediction,
mode="lines",
line=dict(
color=f"rgb{prediction_color}", |
agentlib_mpc.modules.InputPrediction.try_predictor (agentlib_mpc/modules/InputPrediction/try_predictor.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 2 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.modules.utils.try_sensor' |
|
| 7 | 0 | convention | missing-class-docstring |
C0115 | TRYPredictorConfig | Missing class docstring |
| 70 | 0 | convention | missing-class-docstring |
C0115 | TRYPredictor | Missing class docstring |
| 74 | 4 | convention | missing-function-docstring |
C0116 | TRYPredictor.process | Missing function or method docstring |
| 80 | 4 | convention | missing-function-docstring |
C0116 | TRYPredictor.send_prediction | Missing function or method docstring |
| 87 | 4 | convention | missing-function-docstring |
C0116 | TRYPredictor.send_measurement | Missing function or method docstring |
agentlib_mpc.modules (agentlib_mpc/modules/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 11 | 0 | convention | missing-class-docstring |
C0115 | ModuleImport | Missing class docstring |
| 16 | 4 | convention | missing-function-docstring |
C0116 | ModuleImport.import_class | Missing function or method docstring |
agentlib_mpc.modules.data_source (agentlib_mpc/modules/data_source.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/data_source.py: Fatal error while checking 'agentlib_mpc/modules/data_source.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 5 | 0 | convention | wrong-import-order |
C0411 | standard import "import logging" should be placed before "import pandas as pd" |
|
| 6 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 122 | 0 | convention | line-too-long |
C0301 | Line too long (147/100) |
|
| 178 | 0 | convention | line-too-long |
C0301 | Line too long (101/100) |
|
| 180 | 0 | convention | line-too-long |
C0301 | Line too long (116/100) |
agentlib_mpc.modules.deactivate_mpc.deactivate_mpc (agentlib_mpc/modules/deactivate_mpc/deactivate_mpc.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'agentlib' |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/deactivate_mpc/deactivate_mpc.py: Fatal error while checking 'agentlib_mpc/modules/deactivate_mpc/deactivate_mpc.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
|
| 2 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core' |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 29 | 0 | convention | line-too-long |
C0301 | Line too long (139/100) |
|
| 33 | 0 | convention | line-too-long |
C0301 | Line too long (139/100) |
agentlib_mpc.modules.deactivate_mpc.fallback_pid (agentlib_mpc/modules/deactivate_mpc/fallback_pid.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/deactivate_mpc/fallback_pid.py: Fatal error while checking 'agentlib_mpc/modules/deactivate_mpc/fallback_pid.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
|
| 52 | 0 | convention | line-too-long |
C0301 | Line too long (115/100) |
|
| 93 | 0 | convention | line-too-long |
C0301 | Line too long (103/100) |
agentlib_mpc.modules.dmpc (agentlib_mpc/modules/dmpc/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
agentlib_mpc.modules.dmpc.admm.admm (agentlib_mpc/modules/dmpc/admm/admm.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/dmpc/admm/admm.py: Fatal error while checking 'agentlib_mpc/modules/dmpc/admm/admm.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-15.txt'. |
agentlib_mpc.modules.dmpc.admm.admm_coordinated (agentlib_mpc/modules/dmpc/admm/admm_coordinated.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/dmpc/admm/admm_coordinated.py: Fatal error while checking 'agentlib_mpc/modules/dmpc/admm/admm_coordinated.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
agentlib_mpc.modules.dmpc.admm.admm_coordinator (agentlib_mpc/modules/dmpc/admm/admm_coordinator.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/dmpc/admm/admm_coordinator.py: Fatal error while checking 'agentlib_mpc/modules/dmpc/admm/admm_coordinator.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-15.txt'. |
|
| 6 | 0 | convention | ungrouped-imports |
C0412 | Imports from package time are not grouped |
agentlib_mpc.modules.dmpc.coordinator (agentlib_mpc/modules/dmpc/coordinator.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/dmpc/coordinator.py: Fatal error while checking 'agentlib_mpc/modules/dmpc/coordinator.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
agentlib_mpc.modules.dmpc.employee (agentlib_mpc/modules/dmpc/employee.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | convention | ungrouped-imports |
C0412 | Imports from package logging are not grouped |
|
| 2 | 0 | convention | ungrouped-imports |
C0412 | Imports from package dataclasses are not grouped |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 7 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core' |
|
| 12 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core.datamodels' |
|
| 23 | 0 | convention | missing-class-docstring |
C0115 | MiniEmployeeConfig | Missing class docstring |
| 46 | 0 | convention | missing-class-docstring |
C0115 | MiniEmployee | Missing class docstring |
| 55 | 4 | convention | missing-function-docstring |
C0116 | MiniEmployee.process | Missing function or method docstring |
| 63 | 4 | convention | missing-function-docstring |
C0116 | MiniEmployee.register_callbacks | Missing function or method docstring |
| 89 | 0 | convention | line-too-long |
C0301 | Line too long (140/100) |
|
| 91 | 8 | warning | unnecessary-pass |
W0107 | MiniEmployee.pre_computation_hook | Unnecessary pass statement |
| 132 | 8 | warning | unnecessary-ellipsis |
W2301 | MiniEmployee.get_new_measurement | Unnecessary ellipsis constant |
| 170 | 8 | warning | unnecessary-ellipsis |
W2301 | MiniEmployee.shift_trajectories | Unnecessary ellipsis constant |
| 183 | 0 | convention | superfluous-parens |
C0325 | Unnecessary parens after 'not' keyword |
|
| 186 | 8 | convention | invalid-name |
C0103 | MiniEmployee.registration_callback | Attribute name "OptimOpts" doesn't conform to snake_case naming style |
| 186 | 8 | warning | attribute-defined-outside-init |
W0201 | MiniEmployee.registration_callback | Attribute 'OptimOpts' defined outside __init__ |
agentlib_mpc.modules.estimation.mhe (agentlib_mpc/modules/estimation/mhe.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/estimation/mhe.py: Fatal error while checking 'agentlib_mpc/modules/estimation/mhe.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
agentlib_mpc.modules.ml_model_simulator (agentlib_mpc/modules/ml_model_simulator.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 6 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 7 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core' |
|
| 8 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core.errors' |
|
| 9 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.modules.simulation.simulator' |
|
| 10 | 0 | error | import-error |
E0401 | Unable to import 'pydantic_core.core_schema' |
|
| 14 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 14 | 0 | convention | wrong-import-order |
C0411 | third party import "from pydantic import field_validator" should be placed before "from agentlib_mpc.models.casadi_ml_model import CasadiMLModel" |
|
| 14 | 0 | convention | ungrouped-imports |
C0412 | Imports from package pydantic are not grouped |
|
| 17 | 0 | convention | missing-class-docstring |
C0115 | MLModelSimulatorConfig | Missing class docstring |
| 26 | 0 | convention | line-too-long |
C0301 | Line too long (105/100) |
|
| 38 | 0 | convention | missing-class-docstring |
C0115 | MLModelSimulator | Missing class docstring |
| 49 | 4 | convention | missing-function-docstring |
C0116 | MLModelSimulator.register_callbacks | Missing function or method docstring |
agentlib_mpc.modules.ml_model_training.data_reduction (agentlib_mpc/modules/ml_model_training/data_reduction.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'sklearn' |
|
| 5 | 0 | convention | wrong-import-order |
C0411 | standard import "from abc import ABC, abstractmethod" should be placed before "import numpy as np" |
|
| 6 | 0 | error | import-error |
E0401 | Unable to import 'sklearn.gaussian_process.kernels' |
|
| 24 | 4 | convention | missing-function-docstring |
C0116 | InducingPoints.reduce | Missing function or method docstring |
| 33 | 0 | convention | missing-class-docstring |
C0115 | NystroemReducer | Missing class docstring |
| 34 | 23 | warning | redefined-outer-name |
W0621 | NystroemReducer.__init__ | Redefining name 'n_components' from outer scope (line 59) |
| 35 | 8 | refactor | super-with-arguments |
R1725 | NystroemReducer.__init__ | Consider using Python 3 style super() without arguments |
| 56 | 4 | error | import-error |
E0401 | Unable to import 'sklearn.gaussian_process' |
|
| 57 | 4 | error | import-error |
E0401 | Unable to import 'matplotlib.pyplot' |
|
| 59 | 4 | convention | invalid-name |
C0103 | Constant name "n_components" doesn't conform to UPPER_CASE naming style |
|
| 61 | 4 | convention | invalid-name |
C0103 | f | Function name "f" doesn't conform to snake_case naming style |
| 66 | 4 | convention | missing-function-docstring |
C0116 | get_score | Missing function or method docstring |
| 66 | 24 | warning | redefined-outer-name |
W0621 | get_score | Redefining name 'x_test' from outer scope (line 83) |
| 66 | 32 | warning | redefined-outer-name |
W0621 | get_score | Redefining name 'y_test' from outer scope (line 84) |
| 69 | 8 | convention | invalid-name |
C0103 | get_score | Variable name "s" doesn't conform to snake_case naming style |
| 75 | 13 | refactor | use-list-literal |
R1734 | Consider using [] instead of list() |
|
| 97 | 0 | convention | line-too-long |
C0301 | Line too long (122/100) |
agentlib_mpc.modules.ml_model_training.ml_model_trainer (agentlib_mpc/modules/ml_model_training/ml_model_trainer.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/ml_model_training/ml_model_trainer.py: Fatal error while checking 'agentlib_mpc/modules/ml_model_training/ml_model_trainer.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-15.txt'. |
|
| 515 | 0 | convention | superfluous-parens |
C0325 | Unnecessary parens after '=' keyword |
|
| 723 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
agentlib_mpc.modules.ml_model_training.setpoint_generator (agentlib_mpc/modules/ml_model_training/setpoint_generator.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/ml_model_training/setpoint_generator.py: Fatal error while checking 'agentlib_mpc/modules/ml_model_training/setpoint_generator.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-15.txt'. |
agentlib_mpc.modules.mpc.minlp_mpc (agentlib_mpc/modules/mpc/minlp_mpc.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 2 | 0 | convention | ungrouped-imports |
C0412 | Imports from package os are not grouped |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core.errors' |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
|
| 31 | 12 | convention | invalid-name |
C0103 | MINLPMPCConfig.validate_binary_bounds | Variable name "bc" doesn't conform to snake_case naming style |
| 34 | 12 | warning | logging-fstring-interpolation |
W1203 | MINLPMPCConfig.validate_binary_bounds | Use lazy % formatting in logging functions |
| 43 | 0 | convention | missing-class-docstring |
C0115 | MINLPMPC | Missing class docstring |
| 98 | 25 | error | not-an-iterable |
E1133 | MINLPMPC.set_actuation | Non-iterable value self.var_ref.binary_controls is used in an iterating context |
| 111 | 12 | convention | import-outside-toplevel |
C0415 | MINLPMPC.cleanup_results | Import outside toplevel (agentlib_mpc.optimization_backends.casadi_.minlp_cia.CasADiCIABackend) |
agentlib_mpc.modules.mpc.mpc (agentlib_mpc/modules/mpc/mpc.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/mpc/mpc.py: Fatal error while checking 'agentlib_mpc/modules/mpc/mpc.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
|
| 99 | 0 | convention | line-too-long |
C0301 | Line too long (121/100) |
agentlib_mpc.modules.mpc.mpc_full (agentlib_mpc/modules/mpc/mpc_full.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'agentlib.core' |
|
| 32 | 8 | warning | attribute-defined-outside-init |
W0201 | MPC._init_optimization | Attribute '_lags_dict_seconds' defined outside __init__ |
| 36 | 8 | warning | attribute-defined-outside-init |
W0201 | MPC._init_optimization | Attribute 'history' defined outside __init__ |
agentlib_mpc.modules.mpc.skippable_mixin (agentlib_mpc/modules/mpc/skippable_mixin.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/modules/mpc/skippable_mixin.py: Fatal error while checking 'agentlib_mpc/modules/mpc/skippable_mixin.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-14.txt'. |
agentlib_mpc.optimization_backends (agentlib_mpc/optimization_backends/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'pydantic' |
agentlib_mpc.optimization_backends.backend (agentlib_mpc/optimization_backends/backend.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/backend.py: Fatal error while checking 'agentlib_mpc/optimization_backends/backend.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-12.txt'. |
agentlib_mpc.optimization_backends.casadi_.admm (agentlib_mpc/optimization_backends/casadi_/admm.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 2 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 24 | 0 | convention | missing-class-docstring |
C0115 | CasadiADMMSystem | Missing class docstring |
| 24 | 0 | refactor | too-many-instance-attributes |
R0902 | CasadiADMMSystem | Too many instance attributes (8/7) |
| 33 | 4 | refactor | too-many-locals |
R0914 | CasadiADMMSystem.initialize | Too many local variables (18/15) |
| 118 | 0 | convention | missing-class-docstring |
C0115 | ADMMCollocation | Missing class docstring |
| 119 | 4 | refactor | too-many-locals |
R0914 | ADMMCollocation._discretize | Too many local variables (19/15) |
| 128 | 8 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 129 | 8 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 133 | 8 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 134 | 8 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 147 | 12 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 187 | 12 | convention | invalid-name |
C0103 | ADMMCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 197 | 0 | convention | missing-class-docstring |
C0115 | ADMMMultipleShooting | Missing class docstring |
| 198 | 4 | refactor | too-many-locals |
R0914 | ADMMMultipleShooting._discretize | Too many local variables (29/15) |
| 321 | 8 | convention | invalid-name |
C0103 | ADMMMultipleShooting._create_ode | Variable name "p" doesn't conform to snake_case naming style |
| 356 | 8 | convention | invalid-name |
C0103 | CasADiADMMBackend.__init__ | Attribute name "it" doesn't conform to snake_case naming style |
| 416 | 13 | warning | unspecified-encoding |
W1514 | CasADiADMMBackend.save_result_df | Using open without explicitly specifying an encoding |
| 416 | 48 | convention | invalid-name |
C0103 | CasADiADMMBackend.save_result_df | Variable name "f" doesn't conform to snake_case naming style |
| 420 | 13 | warning | unspecified-encoding |
W1514 | CasADiADMMBackend.save_result_df | Using open without explicitly specifying an encoding |
| 420 | 48 | convention | invalid-name |
C0103 | CasADiADMMBackend.save_result_df | Variable name "f" doesn't conform to snake_case naming style |
agentlib_mpc.optimization_backends.casadi_.basic (agentlib_mpc/optimization_backends/casadi_/basic.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 29 | 0 | convention | missing-class-docstring |
C0115 | BaseSystem | Missing class docstring |
| 29 | 0 | refactor | too-many-instance-attributes |
R0902 | BaseSystem | Too many instance attributes (11/7) |
| 105 | 0 | convention | missing-class-docstring |
C0115 | CollocationMatrices | Missing class docstring |
| 108 | 4 | convention | invalid-name |
C0103 | CollocationMatrices | Attribute name "B" doesn't conform to snake_case naming style |
| 109 | 4 | convention | invalid-name |
C0103 | CollocationMatrices | Attribute name "C" doesn't conform to snake_case naming style |
| 110 | 4 | convention | invalid-name |
C0103 | CollocationMatrices | Attribute name "D" doesn't conform to snake_case naming style |
| 113 | 0 | convention | missing-class-docstring |
C0115 | DirectCollocation | Missing class docstring |
| 114 | 4 | refactor | too-many-locals |
R0914 | DirectCollocation._discretize | Too many local variables (17/15) |
| 124 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 125 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 129 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 139 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 141 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "dk" doesn't conform to snake_case naming style |
| 166 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 251 | 4 | refactor | too-many-arguments |
R0913 | DirectCollocation._collocation_inner_loop | Too many arguments (7/5) |
| 251 | 4 | refactor | too-many-locals |
R0914 | DirectCollocation._collocation_inner_loop | Too many local variables (24/15) |
| 285 | 8 | convention | invalid-name |
C0103 | DirectCollocation._collocation_inner_loop | Variable name "ts" doesn't conform to snake_case naming style |
| 316 | 12 | convention | invalid-name |
C0103 | DirectCollocation._collocation_inner_loop | Variable name "xp" doesn't conform to snake_case naming style |
| 317 | 16 | convention | invalid-name |
C0103 | DirectCollocation._collocation_inner_loop | Variable name "r" doesn't conform to snake_case naming style |
| 318 | 16 | convention | invalid-name |
C0103 | DirectCollocation._collocation_inner_loop | Variable name "xp" doesn't conform to snake_case naming style |
| 347 | 8 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "d" doesn't conform to snake_case naming style |
| 354 | 8 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "C" doesn't conform to snake_case naming style |
| 357 | 8 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "D" doesn't conform to snake_case naming style |
| 360 | 8 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "B" doesn't conform to snake_case naming style |
| 366 | 12 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "p" doesn't conform to snake_case naming style |
| 367 | 16 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "r" doesn't conform to snake_case naming style |
| 369 | 20 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "p" doesn't conform to snake_case naming style |
| 378 | 16 | convention | invalid-name |
C0103 | DirectCollocation._collocation_polynomial | Variable name "r" doesn't conform to snake_case naming style |
| 395 | 0 | convention | missing-class-docstring |
C0115 | MultipleShooting | Missing class docstring |
| 396 | 4 | refactor | too-many-locals |
R0914 | MultipleShooting._discretize | Too many local variables (18/15) |
| 401 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 402 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 406 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 413 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 414 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "dk" doesn't conform to snake_case naming style |
| 415 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "zk" doesn't conform to snake_case naming style |
| 416 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "yk" doesn't conform to snake_case naming style |
| 437 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "fk" doesn't conform to snake_case naming style |
| 445 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 459 | 8 | convention | invalid-name |
C0103 | MultipleShooting._create_ode | Variable name "p" doesn't conform to snake_case naming style |
agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml (agentlib_mpc/optimization_backends/casadi_/casadi_admm_ml.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/casadi_admm_ml.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/casadi_admm_ml.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
agentlib_mpc.optimization_backends.casadi_.casadi_ml (agentlib_mpc/optimization_backends/casadi_/casadi_ml.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/casadi_ml.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/casadi_ml.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-12.txt'. |
agentlib_mpc.optimization_backends.casadi_.core.VariableGroup (agentlib_mpc/optimization_backends/casadi_/core/VariableGroup.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | convention | invalid-name |
C0103 | Module name "VariableGroup" doesn't conform to snake_case naming style |
|
| 5 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 11 | 0 | convention | missing-class-docstring |
C0115 | OptimizationQuantity | Missing class docstring |
| 33 | 0 | convention | missing-class-docstring |
C0115 | OptimizationVariable | Missing class docstring |
| 40 | 4 | refactor | too-many-arguments |
R0913 | OptimizationVariable.declare | Too many arguments (7/5) |
| 40 | 4 | refactor | too-many-locals |
R0914 | OptimizationVariable.declare | Too many local variables (22/15) |
| 144 | 0 | convention | missing-class-docstring |
C0115 | OptimizationParameter | Missing class docstring |
| 149 | 4 | refactor | too-many-arguments |
R0913 | OptimizationParameter.declare | Too many arguments (6/5) |
agentlib_mpc.optimization_backends.casadi_.core.casadi_backend (agentlib_mpc/optimization_backends/casadi_/core/casadi_backend.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/core/casadi_backend.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/core/casadi_backend.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
|
| 313 | 0 | convention | line-too-long |
C0301 | Line too long (183/100) |
agentlib_mpc.optimization_backends.casadi_.core.delta_u (agentlib_mpc/optimization_backends/casadi_/core/delta_u.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 2 | 0 | convention | wrong-import-order |
C0411 | standard import "import logging" should be placed before "import casadi as ca" |
|
| 7 | 0 | convention | missing-function-docstring |
C0116 | get_delta_u_objectives | Missing function or method docstring |
| 11 | 0 | convention | missing-function-docstring |
C0116 | get_objective | Missing function or method docstring |
| 11 | 42 | convention | invalid-name |
C0103 | get_objective | Argument name "uk" doesn't conform to snake_case naming style |
| 12 | 13 | warning | unused-variable |
W0612 | get_objective | Unused variable 'name' |
agentlib_mpc.optimization_backends.casadi_.core.discretization (agentlib_mpc/optimization_backends/casadi_/core/discretization.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/core/discretization.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/core/discretization.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
agentlib_mpc.optimization_backends.casadi_.core.system (agentlib_mpc/optimization_backends/casadi_/core/system.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/core/system.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/core/system.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
agentlib_mpc.optimization_backends.casadi_.full (agentlib_mpc/optimization_backends/casadi_/full.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 18 | 0 | convention | missing-class-docstring |
C0115 | FullSystem | Missing class docstring |
| 36 | 0 | convention | missing-class-docstring |
C0115 | DirectCollocation | Missing class docstring |
| 37 | 4 | refactor | too-many-locals |
R0914 | DirectCollocation._discretize | Too many local variables (18/15) |
| 47 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 48 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 52 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 53 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 65 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 91 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 101 | 0 | convention | missing-class-docstring |
C0115 | MultipleShooting | Missing class docstring |
| 102 | 4 | refactor | too-many-locals |
R0914 | MultipleShooting._discretize | Too many local variables (21/15) |
| 107 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 108 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 112 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 114 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 126 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 133 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "dk" doesn't conform to snake_case naming style |
| 134 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "zk" doesn't conform to snake_case naming style |
| 135 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "yk" doesn't conform to snake_case naming style |
| 152 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "fk" doesn't conform to snake_case naming style |
| 159 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
agentlib_mpc.optimization_backends.casadi_.mhe (agentlib_mpc/optimization_backends/casadi_/mhe.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/mhe.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/mhe.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
agentlib_mpc.optimization_backends.casadi_.minlp (agentlib_mpc/optimization_backends/casadi_/minlp.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'casadi' |
|
| 2 | 0 | error | import-error |
E0401 | Unable to import 'numpy' |
|
| 16 | 0 | convention | missing-class-docstring |
C0115 | CasadiMINLPSystem | Missing class docstring |
| 63 | 0 | convention | missing-class-docstring |
C0115 | DirectCollocation | Missing class docstring |
| 64 | 4 | refactor | too-many-locals |
R0914 | DirectCollocation._discretize | Too many local variables (19/15) |
| 74 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 75 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 79 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 81 | 8 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 93 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 94 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "wk" doesn't conform to snake_case naming style |
| 124 | 12 | convention | invalid-name |
C0103 | DirectCollocation._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 134 | 0 | convention | missing-class-docstring |
C0115 | MultipleShooting | Missing class docstring |
| 135 | 4 | refactor | too-many-locals |
R0914 | MultipleShooting._discretize | Too many local variables (19/15) |
| 140 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "n" doesn't conform to snake_case naming style |
| 141 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "ts" doesn't conform to snake_case naming style |
| 145 | 8 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
| 152 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "uk" doesn't conform to snake_case naming style |
| 153 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "wk" doesn't conform to snake_case naming style |
| 154 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "dk" doesn't conform to snake_case naming style |
| 155 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "zk" doesn't conform to snake_case naming style |
| 156 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "yk" doesn't conform to snake_case naming style |
| 172 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "fk" doesn't conform to snake_case naming style |
| 180 | 12 | convention | invalid-name |
C0103 | MultipleShooting._discretize | Variable name "xk" doesn't conform to snake_case naming style |
agentlib_mpc.optimization_backends.casadi_.minlp_cia (agentlib_mpc/optimization_backends/casadi_/minlp_cia.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/optimization_backends/casadi_/minlp_cia.py: Fatal error while checking 'agentlib_mpc/optimization_backends/casadi_/minlp_cia.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-13.txt'. |
|
| 28 | 29 | warning | anomalous-backslash-in-string |
W1401 | Anomalous backslash in string: '\ '. String constant might be missing an r prefix. |
agentlib_mpc.utils.__init__ (agentlib_mpc/utils/__init__.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/__init__.py: Fatal error while checking 'agentlib_mpc/utils/__init__.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
agentlib_mpc.utils.analysis (agentlib_mpc/utils/analysis.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/analysis.py: Fatal error while checking 'agentlib_mpc/utils/analysis.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-09.txt'. |
agentlib_mpc.utils.plotting.admm_animation (agentlib_mpc/utils/plotting/admm_animation.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/admm_animation.py: Fatal error while checking 'agentlib_mpc/utils/plotting/admm_animation.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-11.txt'. |
|
| 4 | 0 | convention | wrong-import-order |
C0411 | standard import "import functools" should be placed before "import matplotlib.pyplot as plt" |
|
| 5 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import matplotlib.pyplot as plt" |
|
| 5 | 0 | convention | ungrouped-imports |
C0412 | Imports from package pathlib are not grouped |
agentlib_mpc.utils.plotting.admm_consensus_shades (agentlib_mpc/utils/plotting/admm_consensus_shades.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 9 | 0 | refactor | too-many-locals |
R0914 | plot_consensus_shades | Too many local variables (17/15) |
| 12 | 4 | warning | unused-argument |
W0613 | plot_consensus_shades | Unused argument 'time_step' |
| 28 | 4 | warning | unused-variable |
W0612 | plot_consensus_shades.mean | Unused variable 'mean' |
| 31 | 4 | warning | unused-variable |
W0612 | plot_consensus_shades.local | Unused variable 'local' |
| 34 | 4 | warning | unused-variable |
W0612 | plot_consensus_shades.lmbda | Unused variable 'lmbda' |
| 41 | 4 | warning | unused-variable |
W0612 | plot_consensus_shades | Unused variable 'a_trajectory' |
| 42 | 4 | warning | unused-variable |
W0612 | plot_consensus_shades | Unused variable 'number_of_iterations' |
| 52 | 43 | error | undefined-variable |
E0602 | plot_consensus_shades | Undefined variable 'series' |
| 57 | 8 | warning | unused-variable |
W0612 | plot_consensus_shades | Unused variable 'prediction_color' |
agentlib_mpc.utils.plotting.admm_dashboard (agentlib_mpc/utils/plotting/admm_dashboard.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/admm_dashboard.py: Fatal error while checking 'agentlib_mpc/utils/plotting/admm_dashboard.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
|
| 1 | 0 | convention | wrong-import-order |
C0411 | standard import "import os" should be placed before "import matplotlib.pyplot as plt" |
|
| 2 | 0 | convention | wrong-import-order |
C0411 | standard import "import webbrowser" should be placed before "import matplotlib.pyplot as plt" |
|
| 2 | 0 | convention | ungrouped-imports |
C0412 | Imports from package webbrowser are not grouped |
|
| 3 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import matplotlib.pyplot as plt" |
|
| 3 | 0 | convention | ungrouped-imports |
C0412 | Imports from package pathlib are not grouped |
|
| 110 | 0 | convention | line-too-long |
C0301 | Line too long (105/100) |
|
| 122 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
agentlib_mpc.utils.plotting.admm_residuals (agentlib_mpc/utils/plotting/admm_residuals.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/admm_residuals.py: Fatal error while checking 'agentlib_mpc/utils/plotting/admm_residuals.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-11.txt'. |
|
| 1 | 0 | convention | wrong-import-order |
C0411 | standard import "from ast import literal_eval" should be placed before "import matplotlib.pyplot as plt" |
|
| 2 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import matplotlib.pyplot as plt" |
|
| 2 | 0 | convention | ungrouped-imports |
C0412 | Imports from package pathlib are not grouped |
|
| 144 | 0 | convention | line-too-long |
C0301 | Line too long (109/100) |
agentlib_mpc.utils.plotting.basic (agentlib_mpc/utils/plotting/basic.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/basic.py: Fatal error while checking 'agentlib_mpc/utils/plotting/basic.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-07.txt'. |
agentlib_mpc.utils.plotting.discretization_structure (agentlib_mpc/utils/plotting/discretization_structure.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/discretization_structure.py: Fatal error while checking 'agentlib_mpc/utils/plotting/discretization_structure.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
|
| 3 | 0 | error | import-error |
E0401 | Unable to import 'matplotlib.pyplot' |
|
| 4 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 57 | 0 | convention | line-too-long |
C0301 | Line too long (102/100) |
agentlib_mpc.utils.plotting.interactive (agentlib_mpc/utils/plotting/interactive.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | error | import-error |
E0401 | Unable to import 'pandas' |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/interactive.py: Fatal error while checking 'agentlib_mpc/utils/plotting/interactive.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
agentlib_mpc.utils.plotting.ml_model_test (agentlib_mpc/utils/plotting/ml_model_test.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/ml_model_test.py: Fatal error while checking 'agentlib_mpc/utils/plotting/ml_model_test.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
|
| 1 | 0 | convention | wrong-import-order |
C0411 | standard import "from pathlib import Path" should be placed before "import matplotlib.pyplot as plt" |
|
| 127 | 0 | convention | line-too-long |
C0301 | Line too long (103/100) |
agentlib_mpc.utils.plotting.mpc (agentlib_mpc/utils/plotting/mpc.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/mpc.py: Fatal error while checking 'agentlib_mpc/utils/plotting/mpc.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
agentlib_mpc.utils.plotting.mpc_dashboard (agentlib_mpc/utils/plotting/mpc_dashboard.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/plotting/mpc_dashboard.py: Fatal error while checking 'agentlib_mpc/utils/plotting/mpc_dashboard.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-10.txt'. |
agentlib_mpc.utils.sampling (agentlib_mpc/utils/sampling.py)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
| 1 | 0 | fatal | astroid-error |
F0002 | agentlib_mpc/utils/sampling.py: Fatal error while checking 'agentlib_mpc/utils/sampling.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2025-11-24-10-12-09.txt'. |
/home/runner/work/AgentLib-MPC/AgentLib-MPC/pylintrc (pylintrc)| Line | Col. | Type | Symbol | ID | Obj | Message |
|---|---|---|---|---|---|---|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'print-statement' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'parameter-unpacking' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'unpacking-in-except' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'old-raise-syntax' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'backtick' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'import-star-module-level' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'apply-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'basestring-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'buffer-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'cmp-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'coerce-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'execfile-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'file-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'long-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'raw_input-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'reduce-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'standarderror-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'unicode-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'xrange-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'coerce-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'delslice-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'getslice-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'setslice-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'no-absolute-import' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'old-division' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'dict-iter-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'dict-view-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'next-method-called' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'metaclass-assignment' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'indexing-exception' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'raising-string' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'reload-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'oct-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'hex-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'nonzero-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'cmp-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'input-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'round-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'intern-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'unichr-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'map-builtin-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'zip-builtin-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'range-builtin-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'filter-builtin-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'using-cmp-argument' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'div-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'idiv-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'rdiv-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'exception-message-attribute' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'invalid-str-codec' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'sys-max-int' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'bad-python3-import' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-string-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-str-translate-call' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-itertools-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-types-field' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'next-method-defined' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'dict-items-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'dict-keys-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'dict-values-not-iterating' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-operator-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-urllib-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'xreadlines-attribute' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'deprecated-sys-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'exception-escape' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'comprehension-escape' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. |
|
| 1 | 0 | refactor | useless-option-value |
R0022 | Useless option value for '--disable', 'no-self-use' was moved to an optional extension, see https://pylint.readthedocs.io/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. |
|
| 1 | 0 | warning | unknown-option-value |
W0012 | Unknown option value for '--disable', expected a valid pylint message and got 'long-suffix' |
|
| 1 | 0 | warning | unknown-option-value |
W0012 | Unknown option value for '--disable', expected a valid pylint message and got 'old-ne-operator' |
|
| 1 | 0 | warning | unknown-option-value |
W0012 | Unknown option value for '--disable', expected a valid pylint message and got 'old-octal-literal' |
|
| 1 | 0 | warning | unknown-option-value |
W0012 | Unknown option value for '--disable', expected a valid pylint message and got 'non-ascii-bytes-literal' |
|
| 1 | 0 | warning | unknown-option-value |
W0012 | Unknown option value for '--disable', expected a valid pylint message and got 'eq-without-hash' |
| Name | Count |
|---|---|
| refactor | 177 |
| warning | 29 |
| fatal | 42 |
| convention | 324 |
| error | 63 |
| Name | Count |
|---|---|
| useless-option-value | 67 |
| unknown-option-value | 5 |
| astroid-error | 42 |
| line-too-long | 78 |
| trailing-whitespace | 8 |
| missing-module-docstring | 42 |
| import-error | 61 |
| wrong-import-order | 31 |
| ungrouped-imports | 20 |
| too-many-locals | 13 |
| undefined-variable | 1 |
| unused-argument | 1 |
| unused-variable | 7 |
| invalid-name | 101 |
| missing-class-docstring | 26 |
| missing-function-docstring | 13 |
| trailing-newlines | 1 |
| bad-indentation | 2 |
| missing-final-newline | 1 |
| f-string-without-interpolation | 1 |
| too-many-branches | 1 |
| too-many-statements | 1 |
| too-many-instance-attributes | 2 |
| too-many-arguments | 3 |
| unspecified-encoding | 2 |
| anomalous-backslash-in-string | 1 |
| logging-fstring-interpolation | 1 |
| not-an-iterable | 1 |
| import-outside-toplevel | 1 |
| attribute-defined-outside-init | 3 |
| superfluous-parens | 2 |
| unnecessary-pass | 1 |
| unnecessary-ellipsis | 2 |
| redefined-outer-name | 3 |
| super-with-arguments | 1 |
| use-list-literal | 1 |
| duplicate-code | 88 |
| Name | Count |
|---|---|
| /home/runner/work/AgentLib-MPC/AgentLib-MPC/pylintrc | 72 |
| agentlib_mpc.utils.plotting.basic | 1 |
| agentlib_mpc.data_structures.mpc_datamodels | 1 |
| agentlib_mpc.data_structures.admm_datatypes | 1 |
| agentlib_mpc.data_structures.casadi_utils | 1 |
| agentlib_mpc.models.casadi_predictor | 31 |
| agentlib_mpc.models.serialized_ml_model | 31 |
| agentlib_mpc.models.casadi_ml_model | 8 |
| agentlib_mpc.models.casadi_model | 13 |
| agentlib_mpc.models | 1 |
| agentlib_mpc.utils.sampling | 2 |
| agentlib_mpc.utils.analysis | 2 |
| agentlib_mpc.utils.__init__ | 1 |
| agentlib_mpc.utils.plotting.interactive | 3 |
| agentlib_mpc.utils.plotting.admm_consensus_shades | 11 |
| agentlib_mpc.utils.plotting.mpc | 2 |
| agentlib_mpc.utils.plotting.mpc_dashboard | 2 |
| agentlib_mpc.utils.plotting.discretization_structure | 5 |
| agentlib_mpc.utils.plotting.ml_model_test | 4 |
| agentlib_mpc.utils.plotting.admm_dashboard | 9 |
| agentlib_mpc.utils.plotting.admm_residuals | 6 |
| agentlib_mpc.utils.plotting.admm_animation | 4 |
| agentlib_mpc.data_structures.ml_model_datatypes | 2 |
| agentlib_mpc.data_structures.interpolation | 9 |
| agentlib_mpc.data_structures.objective | 11 |
| agentlib_mpc.data_structures.coordinator_datatypes | 16 |
| agentlib_mpc.data_structures.__init__ | 1 |
| agentlib_mpc.machine_learning_plugins.physXAI.model_config_creation | 22 |
| agentlib_mpc.machine_learning_plugins.physXAI.model_generation | 15 |
| agentlib_mpc.machine_learning_plugins.physXAI | 1 |
| agentlib_mpc.optimization_backends.backend | 2 |
| agentlib_mpc.optimization_backends | 2 |
| agentlib_mpc.optimization_backends.casadi_.basic | 43 |
| agentlib_mpc.optimization_backends.casadi_.casadi_ml | 3 |
| agentlib_mpc.optimization_backends.casadi_.full | 23 |
| agentlib_mpc.optimization_backends.casadi_.admm | 22 |
| agentlib_mpc.optimization_backends.casadi_.minlp | 25 |
| agentlib_mpc.optimization_backends.casadi_.minlp_cia | 3 |
| agentlib_mpc.optimization_backends.casadi_.mhe | 2 |
| agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml | 2 |
| agentlib_mpc.optimization_backends.casadi_.core.VariableGroup | 9 |
| agentlib_mpc.optimization_backends.casadi_.core.casadi_backend | 3 |
| agentlib_mpc.optimization_backends.casadi_.core.system | 1 |
| agentlib_mpc.optimization_backends.casadi_.core.discretization | 1 |
| agentlib_mpc.optimization_backends.casadi_.core.delta_u | 7 |
| agentlib_mpc.modules.data_source | 9 |
| agentlib_mpc.modules.ml_model_simulator | 12 |
| agentlib_mpc.modules | 2 |
| agentlib_mpc.modules.deactivate_mpc.fallback_pid | 4 |
| agentlib_mpc.modules.deactivate_mpc.deactivate_mpc | 7 |
| agentlib_mpc.modules.mpc.mpc | 2 |
| agentlib_mpc.modules.mpc.minlp_mpc | 9 |
| agentlib_mpc.modules.mpc.mpc_full | 4 |
| agentlib_mpc.modules.mpc.skippable_mixin | 2 |
| agentlib_mpc.modules.estimation.mhe | 2 |
| agentlib_mpc.modules.dmpc.coordinator | 2 |
| agentlib_mpc.modules.dmpc.employee | 17 |
| agentlib_mpc.modules.dmpc | 1 |
| agentlib_mpc.modules.dmpc.admm.admm_coordinated | 1 |
| agentlib_mpc.modules.dmpc.admm.admm | 1 |
| agentlib_mpc.modules.dmpc.admm.admm_coordinator | 2 |
| agentlib_mpc.modules.ml_model_training.data_reduction | 18 |
| agentlib_mpc.modules.ml_model_training.setpoint_generator | 1 |
| agentlib_mpc.modules.ml_model_training.ml_model_trainer | 4 |
| agentlib_mpc.modules.InputPrediction.try_predictor | 10 |
| agentlib_mpc.modules.InputPrediction | 1 |
| agentlib_mpc.modules.InputPrediction.__init__ | 88 |
| Name | Count |
|---|---|
| pylintrc | 72 |
| agentlib_mpc/utils/plotting/basic.py | 1 |
| agentlib_mpc/data_structures/mpc_datamodels.py | 1 |
| agentlib_mpc/data_structures/admm_datatypes.py | 1 |
| agentlib_mpc/data_structures/casadi_utils.py | 1 |
| agentlib_mpc/models/casadi_predictor.py | 31 |
| agentlib_mpc/models/serialized_ml_model.py | 31 |
| agentlib_mpc/models/casadi_ml_model.py | 8 |
| agentlib_mpc/models/casadi_model.py | 13 |
| agentlib_mpc/models/__init__.py | 1 |
| agentlib_mpc/utils/sampling.py | 2 |
| agentlib_mpc/utils/analysis.py | 2 |
| agentlib_mpc/utils/__init__.py | 1 |
| agentlib_mpc/utils/plotting/interactive.py | 3 |
| agentlib_mpc/utils/plotting/admm_consensus_shades.py | 11 |
| agentlib_mpc/utils/plotting/mpc.py | 2 |
| agentlib_mpc/utils/plotting/mpc_dashboard.py | 2 |
| agentlib_mpc/utils/plotting/discretization_structure.py | 5 |
| agentlib_mpc/utils/plotting/ml_model_test.py | 4 |
| agentlib_mpc/utils/plotting/admm_dashboard.py | 9 |
| agentlib_mpc/utils/plotting/admm_residuals.py | 6 |
| agentlib_mpc/utils/plotting/admm_animation.py | 4 |
| agentlib_mpc/data_structures/ml_model_datatypes.py | 2 |
| agentlib_mpc/data_structures/interpolation.py | 9 |
| agentlib_mpc/data_structures/objective.py | 11 |
| agentlib_mpc/data_structures/coordinator_datatypes.py | 16 |
| agentlib_mpc/data_structures/__init__.py | 1 |
| agentlib_mpc/machine_learning_plugins/physXAI/model_config_creation.py | 22 |
| agentlib_mpc/machine_learning_plugins/physXAI/model_generation.py | 15 |
| agentlib_mpc/machine_learning_plugins/physXAI/__init__.py | 1 |
| agentlib_mpc/optimization_backends/backend.py | 2 |
| agentlib_mpc/optimization_backends/__init__.py | 2 |
| agentlib_mpc/optimization_backends/casadi_/basic.py | 43 |
| agentlib_mpc/optimization_backends/casadi_/casadi_ml.py | 3 |
| agentlib_mpc/optimization_backends/casadi_/full.py | 23 |
| agentlib_mpc/optimization_backends/casadi_/admm.py | 22 |
| agentlib_mpc/optimization_backends/casadi_/minlp.py | 25 |
| agentlib_mpc/optimization_backends/casadi_/minlp_cia.py | 3 |
| agentlib_mpc/optimization_backends/casadi_/mhe.py | 2 |
| agentlib_mpc/optimization_backends/casadi_/casadi_admm_ml.py | 2 |
| agentlib_mpc/optimization_backends/casadi_/core/VariableGroup.py | 9 |
| agentlib_mpc/optimization_backends/casadi_/core/casadi_backend.py | 3 |
| agentlib_mpc/optimization_backends/casadi_/core/system.py | 1 |
| agentlib_mpc/optimization_backends/casadi_/core/discretization.py | 1 |
| agentlib_mpc/optimization_backends/casadi_/core/delta_u.py | 7 |
| agentlib_mpc/modules/data_source.py | 9 |
| agentlib_mpc/modules/ml_model_simulator.py | 12 |
| agentlib_mpc/modules/__init__.py | 2 |
| agentlib_mpc/modules/deactivate_mpc/fallback_pid.py | 4 |
| agentlib_mpc/modules/deactivate_mpc/deactivate_mpc.py | 7 |
| agentlib_mpc/modules/mpc/mpc.py | 2 |
| agentlib_mpc/modules/mpc/minlp_mpc.py | 9 |
| agentlib_mpc/modules/mpc/mpc_full.py | 4 |
| agentlib_mpc/modules/mpc/skippable_mixin.py | 2 |
| agentlib_mpc/modules/estimation/mhe.py | 2 |
| agentlib_mpc/modules/dmpc/coordinator.py | 2 |
| agentlib_mpc/modules/dmpc/employee.py | 17 |
| agentlib_mpc/modules/dmpc/__init__.py | 1 |
| agentlib_mpc/modules/dmpc/admm/admm_coordinated.py | 1 |
| agentlib_mpc/modules/dmpc/admm/admm.py | 1 |
| agentlib_mpc/modules/dmpc/admm/admm_coordinator.py | 2 |
| agentlib_mpc/modules/ml_model_training/data_reduction.py | 18 |
| agentlib_mpc/modules/ml_model_training/setpoint_generator.py | 1 |
| agentlib_mpc/modules/ml_model_training/ml_model_trainer.py | 4 |
| agentlib_mpc/modules/InputPrediction/try_predictor.py | 10 |
| agentlib_mpc/modules/InputPrediction/__init__.py | 89 |