Pylint report from report.jinja2

Score

4.18 / 10 (previous score: 4.18 / 10)

Messages

Module 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

Module 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-10-31-10-47-04.txt'.

Module 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-10-31-10-47-04.txt'.

Module 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
5 0 error import-error E0401
Unable to import 'numpy'
7 0 error import-error E0401
Unable to import 'agentlib.core'
7 0 warning unused-import W0611
Unused Source imported from agentlib.core
29 4 convention invalid-name C0103 CoordinatorStatus
Class constant name "sleeping" doesn't conform to UPPER_CASE naming style
30 4 convention invalid-name C0103 CoordinatorStatus
Class constant name "init_iterations" doesn't conform to UPPER_CASE naming style
31 4 convention invalid-name C0103 CoordinatorStatus
Class constant name "optimization" doesn't conform to UPPER_CASE naming style
32 4 convention invalid-name C0103 CoordinatorStatus
Class constant name "updating" doesn't conform to UPPER_CASE naming style
39 4 convention invalid-name C0103 AgentStatus
Class constant name "pending" doesn't conform to UPPER_CASE naming style
40 4 convention invalid-name C0103 AgentStatus
Class constant name "standby" doesn't conform to UPPER_CASE naming style
41 4 convention invalid-name C0103 AgentStatus
Class constant name "ready" doesn't conform to UPPER_CASE naming style
42 4 convention invalid-name C0103 AgentStatus
Class constant name "busy" doesn't conform to UPPER_CASE naming style
54 4 convention missing-function-docstring C0116 OptimizationData.to_dict
Missing function or method docstring
62 4 convention missing-function-docstring C0116 OptimizationData.from_dict
Missing function or method docstring

Module 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

Module 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-10-31-10-47-07.txt'.

Module 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-10-31-10-47-04.txt'.

Module 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'

Module 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-10-31-10-47-05.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
453 0 convention line-too-long C0301
Line too long (131/100)

Module 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-10-31-10-47-05.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
529 0 convention line-too-long C0301
Line too long (101/100)

Module 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-10-31-10-47-04.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'

Module 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-10-31-10-47-05.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"
4 0 convention wrong-import-order C0411
standard import "import subprocess" should be placed before "import casadi as ca"
6 0 error import-error E0401
Unable to import 'numpy'
6 0 convention ungrouped-imports C0412
Imports from package numpy are not grouped
8 0 convention wrong-import-order C0411
standard import "from enum import Enum" should be placed before "import casadi as ca"
8 0 convention ungrouped-imports C0412
Imports from package enum are not grouped
9 0 convention wrong-import-order C0411
standard import "from copy import deepcopy" should be placed before "import casadi as ca"
10 0 error import-error E0401
Unable to import 'keras'
10 0 convention ungrouped-imports C0412
Imports from package keras are not grouped
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'
60 0 convention line-too-long C0301
Line too long (101/100)
115 0 convention line-too-long C0301
Line too long (112/100)
130 0 convention line-too-long C0301
Line too long (114/100)
144 0 convention line-too-long C0301
Line too long (107/100)
251 0 convention line-too-long C0301
Line too long (111/100)
256 0 convention line-too-long C0301
Line too long (102/100)
261 0 convention line-too-long C0301
Line too long (109/100)
317 0 convention line-too-long C0301
Line too long (101/100)
421 0 convention line-too-long C0301
Line too long (101/100)
555 0 convention line-too-long C0301
Line too long (264/100)

Module 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

Module 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_.casadi_admm_ml:[47:114]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[39:104]
        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,
        )
        self.r_del_u = OptimizationParameter.declare(
            denotation="r_del_u",
            variables=[CasadiParameter(name=r_del_u) for r_del_u in var_ref.r_del_u],
            ref_list=var_ref.r_del_u,
            use_in_stage_function=False,
            assert_complete=True,
        )
        self.cost_function = model.cost_func
        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()
        self.model = model
        self.lags_dict: dict[str, int] = model.lags_dict
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[33:89]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[114:168]
        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"],
        )
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[46:90]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[39:81]
        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",  # append the 0 as a convention to get initial guess
            variables=model.get_states(var_ref.states),
            ref_list=var_ref.states,
            use_in_stage_function=False,
            assert_complete=True,
        )

        # dynamics
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[446:497]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[296:347]
                    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.cost_function,
            *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_.basic:[208:275]
==agentlib_mpc.optimization_backends.casadi_.mhe:[231:298]
        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,
            system.cost_function,
            *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:[248:286]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[125:163]
        du_weights = self.add_opt_par(sys.r_del_u)

        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:[344:392]
==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.optimization_backends.casadi_.full:[78:115]
==agentlib_mpc.optimization_backends.casadi_.minlp:[103:140]
            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:[116:150]
        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(
                f"Latest value of source grid %s is older than "
                f"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_.casadi_admm_ml:[326:355]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[175:204]
        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]

            # add penalty on control change between intervals
            u_prev = mx_dict[time - ts][sys.controls.name]
            uk = stage_mx[sys.controls.name]
            self.objective_function += ts * ca.dot(du_weights, (u_prev - uk) ** 2)

            # 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:[363:405]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[205:235]
            }

            # 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:
                        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 _construct_stage_function(self, system: CasadiADMMNNSystem):
        """
        Combine information from the model and the var_ref to create CasADi
        functions which describe the system dynamics and constraints at each
        stage of the optimization problem. Sets the stage function. It has
        all mpc variables as inputs, sorted by denotation (declared in
        self.declare_quantities) and outputs ode, cost function and 3 outputs
        per constraint (constraint, lb_constraint, ub_constraint).

        In the basic case, it has the form:
        CasadiFunction: ['x', 'z', 'u', 'y', 'd', 'p'] ->
            ['ode', 'cost_function', 'model_constraints',
            'ub_model_constraints', 'lb_model_constraints']

        Args:
            system
        """
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[495:519]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[256:280]
        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]

        # aggregate outputs
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[276:307]
==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})

        # Loop over collocation points
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[406:428]
==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:[157:182]
==agentlib_mpc.optimization_backends.casadi_.minlp:[102:127]
            }
            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)

1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[86:106]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[181:202]
        )

        # add admm terms to objective function
        admm_objective = 0
        rho = self.penalty_factor.full_symbolic[0]
        for i in range(len(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_objective += admm_lam * admm_out + rho / 2 * (admm_in - admm_out) ** 2

        for i in range(len(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_objective += admm_lam * admm_out + rho / 2 * (admm_in - admm_out) ** 2

        self.cost_function += admm_objective

    @property
    def variables(self) -> list[OptimizationVariable]:
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[158:182]
==agentlib_mpc.optimization_backends.casadi_.full:[78:102]
            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)

1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[309:325]
==agentlib_mpc.optimization_backends.casadi_.basic:[458:492]
            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

    def _construct_stage_function(self, system: BaseSystem):
        """
        Combine information from the model and the var_ref to create CasADi
        functions which describe the system dynamics and constraints at each
        stage of the optimization problem. Sets the stage function. It has
        all mpc variables as inputs, sorted by denotation (declared in
        self.declare_quantities) and outputs ode, cost function and 3 outputs
        per constraint (constraint, lb_constraint, ub_constraint).

        In the basic case, it has the form:
        CasadiFunction: ['x', 'z', 'u', 'y', 'd', 'p'] ->
            ['ode', 'cost_function', 'model_constraints',
            'ub_model_constraints', 'lb_model_constraints']

        Args:
            system
        """
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.full:[151:168]
==agentlib_mpc.optimization_backends.casadi_.minlp:[168:184]
            )
            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.utils.plotting.interactive:[340:359]
==agentlib_mpc.utils.plotting.mpc_dashboard:[331:357]
                )

    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 detect_index_type(data: pd.DataFrame) -> Tuple[bool, bool]:
    """
    Detect the type of index in the DataFrame.

    Args:
        data: DataFrame to check

    Returns:
        Tuple of (is_multi_index, is_datetime)
    """
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[83:95]
==agentlib_mpc.optimization_backends.casadi_.full:[25:38]
            variables=model.get_inputs(var_ref.controls),
            ref_list=var_ref.controls,
            use_in_stage_function=False,
            assert_complete=True,
        )
        self.r_del_u = OptimizationParameter.declare(
            denotation="r_del_u",
            variables=[CasadiParameter(name=r_del_u) for r_del_u in var_ref.r_del_u],
            ref_list=var_ref.r_del_u,
            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:[192:205]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[256:269]
        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:[169:205]
==agentlib_mpc.utils.plotting.mpc_dashboard:[227:262]
    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",  # Add this line
    )

    return fig


def plot_admm_plotly(
    series: pd.Series,
    plot_actual_values: bool = True,
    plot_predictions: bool = False,
    step: bool = False,
    convert_to: Literal["seconds", "minutes", "hours", "days"] = "seconds",
):
    """
    Args:
        series: A column of the MPC results Dataframe
        fig: Plotly figure to plot on
        plot_actual_values: whether the closed loop actual values at the start of each
         optimization should be plotted (default True)
        plot_predictions: whether all predicted trajectories should be plotted
        step: whether to use a step plot or a line plot
        convert_to: Will convert the index of the returned series to the specified unit
         (seconds, minutes, hours, days)

    Returns:
        None
    """
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[202:224]
==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

    @property
    def sim_step_quantities(
        self,
    ) -> dict[str, Union[OptimizationParameter, OptimizationVariable]]:
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[310:324]
==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:[397:411]
==agentlib_mpc.optimization_backends.casadi_.minlp:[132:146]
        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:[323:334]
==agentlib_mpc.utils.plotting.mpc_dashboard:[292:303]
                                ),
                                style={
                                    "min-width": "600px",
                                    "min-height": "400px",
                                    "max-width": "900px",
                                    "max-height": "450px",
                                },
                            ),
                        ],
                        className="draggable",
                    )
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[95:107]
==agentlib_mpc.utils.plotting.mpc_dashboard:[158:172]
            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:[15:27]
==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:[411:424]
==agentlib_mpc.optimization_backends.casadi_.full:[129:143]
            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,
                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:[70:82]
==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:[420:433]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[272:284]
        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:[189:199]
==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:[157:168]
==agentlib_mpc.optimization_backends.casadi_.basic:[148:159]
            }
            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:[434:444]
==agentlib_mpc.optimization_backends.casadi_.full:[148:157]
            fk = opt_integrator(
                x0=xk,
                p=ca.vertcat(uk, dk, const_par, zk, yk),
            )
            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.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:[331:341]
==agentlib_mpc.modules.mpc.mpc:[402:412]
        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.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.modules.minlp_mpc:[81:96]
==agentlib_mpc.modules.mpc.mpc:[228:245]
        )

        # 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.minlp_mpc:[65:77]
==agentlib_mpc.modules.mpc.mpc:[214:226]
            ("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.optimization_backends.casadi_.admm:[114:128]
==agentlib_mpc.optimization_backends.casadi_.full:[49:66]
        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)
        du_weights = self.add_opt_par(sys.r_del_u)

        # Formulate the NLP
        # loop over prediction horizon
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[439:458]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[357:376]
                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:[298:308]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[163:175]
        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:[101:118]
==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:[411:422]
==agentlib_mpc.optimization_backends.casadi_.minlp:[147:158]
            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:[149:159]
==agentlib_mpc.optimization_backends.casadi_.full:[78:88]
            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.minlp_mpc:[57:64]
==agentlib_mpc.modules.mpc.mpc:[207:214]
        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_.casadi_admm_ml:[405:413]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[255:263]
        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:[528:537]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[479:488]
            "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:[138:148]
==agentlib_mpc.optimization_backends.casadi_.minlp:[91:101]
            dk = self.add_opt_par(sys.non_controlled_inputs)

            # perform inner collocation loop
            opt_vars_inside_inner = [sys.algebraics, sys.outputs]
            opt_pars_inside_inner = []

            constant_over_inner = {
                sys.controls: uk,
                sys.non_controlled_inputs: dk,
                sys.model_parameters: const_par,
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[397:405]
==agentlib_mpc.optimization_backends.casadi_.full:[107:115]
        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:[225:234]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[329:338]
            "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:[152:166]
            )

        # 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.dmpc.coordinator:[6:13]
==agentlib_mpc.modules.dmpc.employee:[4:11]
from pydantic import Field

from agentlib.core import (
    BaseModule,
    BaseModuleConfig,
    AgentVariable,
    Agent,
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[221:231]
==agentlib_mpc.modules.mpc.mpc_full:[120:128]
            self.agent.data_broker.register_callback(
                alias=var.alias,
                source=var.source,
                callback=self._callback_hist_vars,
                name=var.name,
            )

    def _after_config_update(self):
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.modules.estimation.mhe:[147:153]
==agentlib_mpc.modules.mpc.mpc:[161:167]
        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:[81:89]
==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:[41:58]
==agentlib_mpc.optimization_backends.casadi_.minlp:[62:81]
class DirectCollocation(basic.DirectCollocation):
    def _discretize(self, sys: FullSystem):
        """
        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_ml:[256:263]
==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:[521:527]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[472:478]
            system.cost_function,
            *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:[511:519]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[420:428]
        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:[192:199]
==agentlib_mpc.optimization_backends.casadi_.casadi_admm_ml:[406:413]
        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:[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:[437:444]
==agentlib_mpc.optimization_backends.casadi_.minlp:[168:175]
            )
            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_.basic:[118:133]
==agentlib_mpc.optimization_backends.casadi_.minlp:[70:85]
        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
        const_par = self.add_opt_par(sys.model_parameters)

        # Formulate the NLP
        # loop over prediction horizon
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.admm:[300:308]
==agentlib_mpc.optimization_backends.casadi_.basic:[449:458]
        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:[218:224]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[322:328]
            system.cost_function,
            *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:[208:216]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[272: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
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.optimization_backends.casadi_.basic:[92:98]
==agentlib_mpc.optimization_backends.casadi_.casadi_ml:[95:101]
        self.cost_function = model.cost_func
        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.utils.plotting.admm_dashboard:[19:37]
==agentlib_mpc.utils.plotting.interactive:[18:27]
except ImportError as e:
    raise OptionalDependencyError(
        dependency_name="interactive",
        dependency_install="plotly, dash",
        used_object="interactive",
    ) from e


def make_figure_plotly() -> go.Figure:
1 0 refactor duplicate-code R0801
Similar lines in 2 files
==agentlib_mpc.utils.plotting.interactive:[466:472]
==agentlib_mpc.utils.plotting.mpc_dashboard:[321:327]
        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:[381:387]
==agentlib_mpc.utils.plotting.mpc_dashboard:[293:299]
        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.optimization_backends.casadi_.mhe:[473:481]
==agentlib_mpc.utils.sampling:[101:109]
    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.modules.dmpc.admm.admm:[832:841]
==agentlib_mpc.modules.mpc.mpc_full:[146:155]
        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:[139:147]
==agentlib_mpc.modules.mpc.mpc:[272:277]
        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.minlp_mpc:[103:109]
==agentlib_mpc.modules.mpc.mpc:[407:412]
        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:[114:123]
==agentlib_mpc.optimization_backends.casadi_.minlp:[70:81]
        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_.basic:[118:129]
==agentlib_mpc.optimization_backends.casadi_.full:[49:58]
        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.backend:[65:70]
==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:[13:18]
==agentlib_mpc.utils.plotting.interactive:[13:18]
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:[125:130]
==agentlib_mpc.utils.plotting.mpc_dashboard:[176:181]
                    x=prediction.index,
                    y=prediction,
                    mode="lines",
                    line=dict(
                        color=f"rgb{prediction_color}",

Module 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

Module 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

Module 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-10-31-10-47-10.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)

Module 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-10-31-10-47-10.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)

Module 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-10-31-10-47-10.txt'.
56 0 convention line-too-long C0301
Line too long (115/100)
97 0 convention line-too-long C0301
Line too long (103/100)

Module 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

Module 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-10-31-10-47-12.txt'.

Module 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-10-31-10-47-11.txt'.

Module 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-10-31-10-47-12.txt'.
6 0 convention ungrouped-imports C0412
Imports from package time are not grouped
599 0 convention superfluous-parens C0325
Unnecessary parens after 'not' keyword
631 0 convention superfluous-parens C0325
Unnecessary parens after 'not' keyword

Module 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-10-31-10-47-11.txt'.
204 0 convention superfluous-parens C0325
Unnecessary parens after 'not' keyword

Module 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'
7 0 warning unused-import W0611
Unused BaseModule imported from agentlib.core
7 0 warning unused-import W0611
Unused BaseModuleConfig imported from agentlib.core
14 0 error import-error E0401
Unable to import 'agentlib.core.datamodels'
25 0 convention missing-class-docstring C0115 MiniEmployeeConfig
Missing class docstring
48 0 convention missing-class-docstring C0115 MiniEmployee
Missing class docstring
57 4 convention missing-function-docstring C0116 MiniEmployee.process
Missing function or method docstring
65 4 convention missing-function-docstring C0116 MiniEmployee.register_callbacks
Missing function or method docstring
91 0 convention line-too-long C0301
Line too long (140/100)
93 8 warning unnecessary-pass W0107 MiniEmployee.pre_computation_hook
Unnecessary pass statement
134 8 warning unnecessary-ellipsis W2301 MiniEmployee.get_new_measurement
Unnecessary ellipsis constant
172 8 warning unnecessary-ellipsis W2301 MiniEmployee.shift_trajectories
Unnecessary ellipsis constant
185 0 convention superfluous-parens C0325
Unnecessary parens after 'not' keyword
188 8 convention invalid-name C0103 MiniEmployee.registration_callback
Attribute name "OptimOpts" doesn't conform to snake_case naming style
188 8 warning attribute-defined-outside-init W0201 MiniEmployee.registration_callback
Attribute 'OptimOpts' defined outside __init__

Module 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-10-31-10-47-11.txt'.

Module agentlib_mpc.modules.minlp_mpc (agentlib_mpc/modules/minlp_mpc.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 logging" should be placed before "import pandas as pd"
2 0 convention wrong-import-order C0411
standard import "import os" should be placed before "import pandas as pd"
4 0 error import-error E0401
Unable to import 'pydantic'
11 0 error no-name-in-module E0611
No name 'BaseMPCConfig' in module 'agentlib_mpc.modules.mpc'
11 0 error no-name-in-module E0611
No name 'BaseMPC' in module 'agentlib_mpc.modules.mpc'
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
103 4 convention missing-function-docstring C0116 MINLPMPC.cleanup_results
Missing function or method docstring

Module agentlib_mpc.modules.ml_model_simulator (agentlib_mpc/modules/ml_model_simulator.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 'pydantic'
2 0 error import-error E0401
Unable to import 'agentlib.core'
3 0 error import-error E0401
Unable to import 'agentlib.core.errors'
4 0 error import-error E0401
Unable to import 'agentlib.modules.simulator'
5 0 error import-error E0401
Unable to import 'pydantic_core.core_schema'
9 0 error import-error E0401
Unable to import 'pydantic'
9 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"
12 0 convention missing-class-docstring C0115 MLModelSimulatorConfig
Missing class docstring
28 0 convention missing-class-docstring C0115 MLModelSimulator
Missing class docstring
39 4 convention missing-function-docstring C0116 MLModelSimulator.register_callbacks
Missing function or method docstring

Module 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)

Module 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-10-31-10-47-12.txt'.
515 0 convention superfluous-parens C0325
Unnecessary parens after '=' keyword
723 0 convention line-too-long C0301
Line too long (102/100)

Module agentlib_mpc.modules.ml_model_training.setpoint_generator (agentlib_mpc/modules/ml_model_training/setpoint_generator.py)

Line Col. Type Symbol ID Obj Message
7 0 error import-error E0401
Unable to import 'agentlib.core'
42 4 convention missing-function-docstring C0116 SetPointGenerator.register_callbacks
Missing function or method docstring
44 4 convention missing-function-docstring C0116 SetPointGenerator.process
Missing function or method docstring

Module 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-10-31-10-47-10.txt'.

Module agentlib_mpc.modules.mpc.mpc_full (agentlib_mpc/modules/mpc/mpc_full.py)

Line Col. Type Symbol ID Obj Message
1 0 fatal astroid-error F0002
agentlib_mpc/modules/mpc/mpc_full.py: Fatal error while checking 'agentlib_mpc/modules/mpc/mpc_full.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-10-31-10-47-11.txt'.

Module 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-10-31-10-47-11.txt'.

Module 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'

Module 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-10-31-10-47-07.txt'.

Module 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'
22 0 convention missing-class-docstring C0115 CasadiADMMSystem
Missing class docstring
22 0 refactor too-many-instance-attributes R0902 CasadiADMMSystem
Too many instance attributes (9/7)
107 0 convention missing-class-docstring C0115 ADMMCollocation
Missing class docstring
108 4 refactor too-many-locals R0914 ADMMCollocation._discretize
Too many local variables (18/15)
118 8 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "n" doesn't conform to snake_case naming style
119 8 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "ts" doesn't conform to snake_case naming style
123 8 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
124 8 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "uk" doesn't conform to snake_case naming style
136 12 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "uk" doesn't conform to snake_case naming style
173 12 convention invalid-name C0103 ADMMCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
183 0 convention missing-class-docstring C0115 ADMMMultipleShooting
Missing class docstring
184 4 refactor too-many-locals R0914 ADMMMultipleShooting._discretize
Too many local variables (28/15)
307 8 convention invalid-name C0103 ADMMMultipleShooting._create_ode
Variable name "p" doesn't conform to snake_case naming style
342 8 convention invalid-name C0103 CasADiADMMBackend.__init__
Attribute name "it" doesn't conform to snake_case naming style
402 13 warning unspecified-encoding W1514 CasADiADMMBackend.save_result_df
Using open without explicitly specifying an encoding
402 48 convention invalid-name C0103 CasADiADMMBackend.save_result_df
Variable name "f" doesn't conform to snake_case naming style
406 13 warning unspecified-encoding W1514 CasADiADMMBackend.save_result_df
Using open without explicitly specifying an encoding
406 48 convention invalid-name C0103 CasADiADMMBackend.save_result_df
Variable name "f" doesn't conform to snake_case naming style

Module 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'
28 0 convention missing-class-docstring C0115 BaseSystem
Missing class docstring
28 0 refactor too-many-instance-attributes R0902 BaseSystem
Too many instance attributes (11/7)
99 8 warning attribute-defined-outside-init W0201 BaseSystem.initialize
Attribute 'time' defined outside __init__
103 0 convention missing-class-docstring C0115 CollocationMatrices
Missing class docstring
106 4 convention invalid-name C0103 CollocationMatrices
Attribute name "B" doesn't conform to snake_case naming style
107 4 convention invalid-name C0103 CollocationMatrices
Attribute name "C" doesn't conform to snake_case naming style
108 4 convention invalid-name C0103 CollocationMatrices
Attribute name "D" doesn't conform to snake_case naming style
111 0 convention missing-class-docstring C0115 DirectCollocation
Missing class docstring
112 4 refactor too-many-locals R0914 DirectCollocation._discretize
Too many local variables (17/15)
122 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "n" doesn't conform to snake_case naming style
123 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "ts" doesn't conform to snake_case naming style
127 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
137 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "uk" doesn't conform to snake_case naming style
139 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "dk" doesn't conform to snake_case naming style
164 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
249 4 refactor too-many-arguments R0913 DirectCollocation._collocation_inner_loop
Too many arguments (7/5)
249 4 refactor too-many-locals R0914 DirectCollocation._collocation_inner_loop
Too many local variables (24/15)
283 8 convention invalid-name C0103 DirectCollocation._collocation_inner_loop
Variable name "ts" doesn't conform to snake_case naming style
314 12 convention invalid-name C0103 DirectCollocation._collocation_inner_loop
Variable name "xp" doesn't conform to snake_case naming style
315 16 convention invalid-name C0103 DirectCollocation._collocation_inner_loop
Variable name "r" doesn't conform to snake_case naming style
316 16 convention invalid-name C0103 DirectCollocation._collocation_inner_loop
Variable name "xp" doesn't conform to snake_case naming style
345 8 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "d" doesn't conform to snake_case naming style
352 8 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "C" doesn't conform to snake_case naming style
355 8 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "D" doesn't conform to snake_case naming style
358 8 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "B" doesn't conform to snake_case naming style
364 12 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "p" doesn't conform to snake_case naming style
365 16 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "r" doesn't conform to snake_case naming style
367 20 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "p" doesn't conform to snake_case naming style
376 16 convention invalid-name C0103 DirectCollocation._collocation_polynomial
Variable name "r" doesn't conform to snake_case naming style
393 0 convention missing-class-docstring C0115 MultipleShooting
Missing class docstring
394 4 refactor too-many-locals R0914 MultipleShooting._discretize
Too many local variables (18/15)
399 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "n" doesn't conform to snake_case naming style
400 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "ts" doesn't conform to snake_case naming style
404 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style
411 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "uk" doesn't conform to snake_case naming style
412 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "dk" doesn't conform to snake_case naming style
413 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "zk" doesn't conform to snake_case naming style
414 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "yk" doesn't conform to snake_case naming style
435 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "fk" doesn't conform to snake_case naming style
443 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style
457 8 convention invalid-name C0103 MultipleShooting._create_ode
Variable name "p" doesn't conform to snake_case naming style

Module 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-10-31-10-47-09.txt'.

Module 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-10-31-10-47-08.txt'.

Module 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)

Module 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-10-31-10-47-10.txt'.

Module 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-10-31-10-47-10.txt'.

Module 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-10-31-10-47-10.txt'.

Module 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'
17 0 convention missing-class-docstring C0115 FullSystem
Missing class docstring
39 8 warning attribute-defined-outside-init W0201 FullSystem.initialize
Attribute 'time' defined outside __init__
42 0 convention missing-class-docstring C0115 DirectCollocation
Missing class docstring
43 4 refactor too-many-locals R0914 DirectCollocation._discretize
Too many local variables (17/15)
53 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "n" doesn't conform to snake_case naming style
54 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "ts" doesn't conform to snake_case naming style
58 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
59 8 convention invalid-name C0103 DirectCollocation._discretize
Variable name "uk" doesn't conform to snake_case naming style
70 12 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 "xk" doesn't conform to snake_case naming style
103 0 convention missing-class-docstring C0115 MultipleShooting
Missing class docstring
104 4 refactor too-many-locals R0914 MultipleShooting._discretize
Too many local variables (20/15)
109 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "n" doesn't conform to snake_case naming style
110 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "ts" doesn't conform to snake_case naming style
114 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style
116 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "uk" doesn't conform to snake_case naming style
127 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "uk" doesn't conform to snake_case naming style
130 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "dk" doesn't conform to snake_case naming style
131 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "zk" doesn't conform to snake_case naming style
132 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "yk" doesn't conform to snake_case naming style
149 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "fk" doesn't conform to snake_case naming style
156 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style

Module 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-10-31-10-47-09.txt'.

Module 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'
17 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 (17/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
88 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "uk" doesn't conform to snake_case naming style
89 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "wk" doesn't conform to snake_case naming style
92 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "dk" doesn't conform to snake_case naming style
118 12 convention invalid-name C0103 DirectCollocation._discretize
Variable name "xk" doesn't conform to snake_case naming style
128 0 convention missing-class-docstring C0115 MultipleShooting
Missing class docstring
129 4 refactor too-many-locals R0914 MultipleShooting._discretize
Too many local variables (19/15)
134 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "n" doesn't conform to snake_case naming style
135 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "ts" doesn't conform to snake_case naming style
139 8 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style
146 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "uk" doesn't conform to snake_case naming style
147 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "wk" doesn't conform to snake_case naming style
148 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "dk" doesn't conform to snake_case naming style
149 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "zk" doesn't conform to snake_case naming style
150 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "yk" doesn't conform to snake_case naming style
166 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "fk" doesn't conform to snake_case naming style
174 12 convention invalid-name C0103 MultipleShooting._discretize
Variable name "xk" doesn't conform to snake_case naming style

Module 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-10-31-10-47-09.txt'.
28 29 warning anomalous-backslash-in-string W1401
Anomalous backslash in string: '\ '. String constant might be missing an r prefix.

Module 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-10-31-10-47-06.txt'.

Module 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-10-31-10-47-06.txt'.

Module 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-10-31-10-47-07.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

Module 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'

Module 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-10-31-10-47-07.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)

Module 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-10-31-10-47-07.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)

Module 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-10-31-10-47-03.txt'.

Module 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-10-31-10-47-07.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)

Module 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-10-31-10-47-06.txt'.

Module 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-10-31-10-47-07.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)

Module 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-10-31-10-47-06.txt'.

Module 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-10-31-10-47-07.txt'.
3 0 convention ungrouped-imports C0412
Imports from package pathlib are not grouped

Module 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-10-31-10-47-05.txt'.

Module /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'

Metrics

Count per types

Name Count
refactor 167
warning 28
fatal 40
convention 255
error 55

Count per messages

Name Count
useless-option-value 67
unknown-option-value 5
astroid-error 40
missing-module-docstring 39
import-error 52
line-too-long 27
wrong-import-order 29
ungrouped-imports 18
too-many-locals 11
undefined-variable 1
unused-argument 1
unused-variable 6
invalid-name 96
missing-class-docstring 26
missing-function-docstring 14
unused-import 3
trailing-newlines 1
too-many-instance-attributes 2
attribute-defined-outside-init 3
too-many-arguments 3
unspecified-encoding 2
anomalous-backslash-in-string 1
no-name-in-module 2
logging-fstring-interpolation 1
superfluous-parens 5
unnecessary-pass 1
unnecessary-ellipsis 2
redefined-outer-name 3
super-with-arguments 1
use-list-literal 1
duplicate-code 82

Count per modules

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 6
agentlib_mpc.models.serialized_ml_model 29
agentlib_mpc.models.casadi_ml_model 8
agentlib_mpc.models.casadi_model 10
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 3
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.coordinator_datatypes 14
agentlib_mpc.data_structures.__init__ 1
agentlib_mpc.optimization_backends.backend 2
agentlib_mpc.optimization_backends 2
agentlib_mpc.optimization_backends.casadi_.basic 44
agentlib_mpc.optimization_backends.casadi_.casadi_ml 3
agentlib_mpc.optimization_backends.casadi_.full 24
agentlib_mpc.optimization_backends.casadi_.admm 21
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 2
agentlib_mpc.optimization_backends.casadi_.core.system 1
agentlib_mpc.optimization_backends.casadi_.core.discretization 1
agentlib_mpc.modules.data_source 9
agentlib_mpc.modules.minlp_mpc 10
agentlib_mpc.modules.ml_model_simulator 11
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 1
agentlib_mpc.modules.mpc.mpc_full 1
agentlib_mpc.modules.mpc.skippable_mixin 2
agentlib_mpc.modules.estimation.mhe 2
agentlib_mpc.modules.dmpc.coordinator 3
agentlib_mpc.modules.dmpc.employee 19
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 4
agentlib_mpc.modules.ml_model_training.data_reduction 18
agentlib_mpc.modules.ml_model_training.setpoint_generator 3
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__ 82

Count per path

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 6
agentlib_mpc/models/serialized_ml_model.py 29
agentlib_mpc/models/casadi_ml_model.py 8
agentlib_mpc/models/casadi_model.py 10
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 3
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/coordinator_datatypes.py 14
agentlib_mpc/data_structures/__init__.py 1
agentlib_mpc/optimization_backends/backend.py 2
agentlib_mpc/optimization_backends/__init__.py 2
agentlib_mpc/optimization_backends/casadi_/basic.py 44
agentlib_mpc/optimization_backends/casadi_/casadi_ml.py 3
agentlib_mpc/optimization_backends/casadi_/full.py 24
agentlib_mpc/optimization_backends/casadi_/admm.py 21
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 2
agentlib_mpc/optimization_backends/casadi_/core/system.py 1
agentlib_mpc/optimization_backends/casadi_/core/discretization.py 1
agentlib_mpc/modules/data_source.py 9
agentlib_mpc/modules/minlp_mpc.py 10
agentlib_mpc/modules/ml_model_simulator.py 11
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 1
agentlib_mpc/modules/mpc/mpc_full.py 1
agentlib_mpc/modules/mpc/skippable_mixin.py 2
agentlib_mpc/modules/estimation/mhe.py 2
agentlib_mpc/modules/dmpc/coordinator.py 3
agentlib_mpc/modules/dmpc/employee.py 19
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 4
agentlib_mpc/modules/ml_model_training/data_reduction.py 18
agentlib_mpc/modules/ml_model_training/setpoint_generator.py 3
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 83