load_lp

load_lp(
filename: str | PathLike,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
) → tuple[Model, VariableGenerator]

Load an LP file and construct a model.

The LP format follows a supported subset of the Gurobi LP format.

パラメータ:
  • filename (str | PathLike) -- Path of the LP file to read.

  • penalty_formulation (Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation) -- Penalty formulation used for inequality constraints. Defaults to PenaltyFormulation.Default.

戻り値:

Loaded model and its associated variable generator.

戻り値の型:

tuple[Model, VariableGenerator]