API
Nosnoc Solver object
Nosnoc Options
- class nosnoc.nosnoc_opts.NosnocOpts(terminal_time: Union[float, int] = 1.0, use_fesd: bool = True, print_level: int = 0, max_iter_homotopy: int = 0, initialization_strategy: nosnoc.nosnoc_types.InitializationStrategy = <InitializationStrategy.ALL_XCURRENT_W0_START: 1>, irk_representation: nosnoc.nosnoc_types.IrkRepresentation = <IrkRepresentation.INTEGRAL: 1>, n_s: int = 2, irk_scheme: nosnoc.nosnoc_types.IrkSchemes = <IrkSchemes.RADAU_IIA: 1>, cross_comp_mode: nosnoc.nosnoc_types.CrossComplementarityMode = <CrossComplementarityMode.SUM_LAMBDAS_COMPLEMENT_WITH_EVERY_THETA: 2>, mpcc_mode: nosnoc.nosnoc_types.MpccMode = <MpccMode.SCHOLTES_INEQ: 1>, constraint_handling: nosnoc.nosnoc_types.ConstraintHandling = <ConstraintHandling.EXACT: 1>, pss_mode: nosnoc.nosnoc_types.PssMode = <PssMode.STEWART: 1>, use_upper_bound_h: bool = True, gamma_h: float = 1.0, smoothing_parameter: float = 10.0, fix_active_set_fe0: bool = False, N_finite_elements: int = 2, Nfe_list: list = <factory>, comp_tol: float = 1e-08, sigma_0: float = 1.0, sigma_N: float = 1e-08, homotopy_update_slope: float = 0.1, homotopy_update_exponent: float = 1.5, homotopy_update_rule: nosnoc.nosnoc_types.HomotopyUpdateRule = <HomotopyUpdateRule.LINEAR: 1>, step_equilibration: nosnoc.nosnoc_types.StepEquilibrationMode = <StepEquilibrationMode.HEURISTIC_DELTA: 2>, step_equilibration_sigma: float = 0.1, rho_h: float = 1.0, fb_ip_aug1_weight: float = 1.0, fb_ip_aug2_weight: float = 0.1, do_polishing_step: bool = False, N_stages: int = 1, equidistant_control_grid: bool = True, g_path_at_fe: bool = False, g_path_at_stg: bool = False, s_elastic_0: float = 1.0, s_elastic_max: float = 10.0, s_elastic_min: float = 0.0, objective_scaling_direct: bool = True, time_freezing: bool = False, time_freezing_tolerance: float = 0.001, speed_of_time_variables: nosnoc.nosnoc_types.SpeedOfTimeVariableMode = <SpeedOfTimeVariableMode.NONE: 1>, speed_of_time_min: float = 1.0, speed_of_time_max: float = 25.0, rootfinder_for_initial_z: bool = False)
-
- property nlp_max_iter
Maximum amount of iterations for the subsolver.
- property tol_ipopt
Ipopt tolerance.
Nosnoc Model
Nosnoc OCP
Nosnoc Types
- enum nosnoc.nosnoc_types.ConstraintHandling(value)
An enumeration.
Valid values are as follows:
- EXACT = <ConstraintHandling.EXACT: 1>
- LEAST_SQUARES = <ConstraintHandling.LEAST_SQUARES: 2>
- enum nosnoc.nosnoc_types.CrossComplementarityMode(value)
An enumeration.
Valid values are as follows:
- COMPLEMENT_ALL_STAGE_VALUES_WITH_EACH_OTHER = <CrossComplementarityMode.COMPLEMENT_ALL_STAGE_VALUES_WITH_EACH_OTHER: 1>
- SUM_LAMBDAS_COMPLEMENT_WITH_EVERY_THETA = <CrossComplementarityMode.SUM_LAMBDAS_COMPLEMENT_WITH_EVERY_THETA: 2>
- enum nosnoc.nosnoc_types.HomotopyUpdateRule(value)
An enumeration.
Valid values are as follows:
- LINEAR = <HomotopyUpdateRule.LINEAR: 1>
- SUPERLINEAR = <HomotopyUpdateRule.SUPERLINEAR: 2>
- enum nosnoc.nosnoc_types.InitializationStrategy(value)
An enumeration.
Valid values are as follows:
- ALL_XCURRENT_W0_START = <InitializationStrategy.ALL_XCURRENT_W0_START: 1>
- ALL_XCURRENT_WOPT_PREV = <InitializationStrategy.ALL_XCURRENT_WOPT_PREV: 2>
- EXTERNAL = <InitializationStrategy.EXTERNAL: 3>
- RK4_SMOOTHENED = <InitializationStrategy.RK4_SMOOTHENED: 4>
- enum nosnoc.nosnoc_types.IrkRepresentation(value)
An enumeration.
Valid values are as follows:
- INTEGRAL = <IrkRepresentation.INTEGRAL: 1>
- DIFFERENTIAL = <IrkRepresentation.DIFFERENTIAL: 2>
- DIFFERENTIAL_LIFT_X = <IrkRepresentation.DIFFERENTIAL_LIFT_X: 3>
- enum nosnoc.nosnoc_types.IrkSchemes(value)
An enumeration.
Valid values are as follows:
- RADAU_IIA = <IrkSchemes.RADAU_IIA: 1>
- GAUSS_LEGENDRE = <IrkSchemes.GAUSS_LEGENDRE: 2>
- enum nosnoc.nosnoc_types.MpccMode(value)
MpccMode determines how complementarities w_1^T w_2 =0 are handled MPCC (Mathematical Program with Complementarity Constraints)
SCHOLTES_EQ: w_1^T w_2 - sigma == 0 SCHOLTES_INEQ: w_1^T w_2 - sigma <= 0
ELASTIC*: - a bounded slack variable s_elastic is introduced. - bounds for s_elastic: [opts.s_elastic_min, opts.s_elastic_max] - s_elastic is initialized by opts.s_elastic_0
ELASTIC_INEQ: w_1^T w_2 - s_elastic * np.ones((n, 1)) < 0 ELASTIC_EQ: w_1^T w_2 - s_elastic * np.ones((n, 1)) == 0 ELASTIC_TWO_SIDED: w_1^T w_2 - s_elastic * np.ones((n, 1)) <= 0
w_1^T w_2 + s_elastic * np.ones((n, 1)) >= 0
Valid values are as follows:
- SCHOLTES_INEQ = <MpccMode.SCHOLTES_INEQ: 1>
- SCHOLTES_EQ = <MpccMode.SCHOLTES_EQ: 2>
- FISCHER_BURMEISTER = <MpccMode.FISCHER_BURMEISTER: 3>
- FISCHER_BURMEISTER_IP_AUG = <MpccMode.FISCHER_BURMEISTER_IP_AUG: 4>
- ELASTIC_INEQ = <MpccMode.ELASTIC_INEQ: 5>
- ELASTIC_EQ = <MpccMode.ELASTIC_EQ: 6>
- ELASTIC_TWO_SIDED = <MpccMode.ELASTIC_TWO_SIDED: 7>
- BOOLEAN = <MpccMode.BOOLEAN: 8>
- enum nosnoc.nosnoc_types.PssMode(value)
Mode to represent the Piecewise Smooth System (PSS).
Valid values are as follows:
- STEWART = <PssMode.STEWART: 1>
- STEP = <PssMode.STEP: 2>
- enum nosnoc.nosnoc_types.SpeedOfTimeVariableMode(value)
An enumeration.
Valid values are as follows:
- NONE = <SpeedOfTimeVariableMode.NONE: 1>
- LOCAL = <SpeedOfTimeVariableMode.LOCAL: 2>
- GLOBAL = <SpeedOfTimeVariableMode.GLOBAL: 3>
- enum nosnoc.nosnoc_types.Status(value)
An enumeration.
Valid values are as follows:
- SUCCESS = <Status.SUCCESS: 1>
- INFEASIBLE = <Status.INFEASIBLE: 2>
- enum nosnoc.nosnoc_types.StepEquilibrationMode(value)
An enumeration.
Valid values are as follows:
- HEURISTIC_MEAN = <StepEquilibrationMode.HEURISTIC_MEAN: 1>
- HEURISTIC_DELTA = <StepEquilibrationMode.HEURISTIC_DELTA: 2>
- L2_RELAXED_SCALED = <StepEquilibrationMode.L2_RELAXED_SCALED: 3>
- L2_RELAXED = <StepEquilibrationMode.L2_RELAXED: 4>
- DIRECT = <StepEquilibrationMode.DIRECT: 5>
- DIRECT_COMPLEMENTARITY = <StepEquilibrationMode.DIRECT_COMPLEMENTARITY: 6>
- HEURISTIC_DELTA_H_COMP = <StepEquilibrationMode.HEURISTIC_DELTA_H_COMP: 7>