# 线性规划和混合整数线性规划

## 函数

 `evaluate` Evaluate optimization expression `findindex` Find numeric index equivalents of named index variables `infeasibility` Constraint violation at a point `optimproblem` Create optimization problem `optimvar` Create optimization variables `prob2struct` Convert optimization problem or equation problem to solver form `solve` Solve optimization problem or equation problem
 `intlinprog` Mixed-integer linear programming (MILP) `linprog` Solve linear programming problems `mpsread` Read MPS file for LP and MILP optimization data

## 主题

### 基于问题的混合整数线性规划

Factory, Warehouse, Sales Allocation Model: Problem-Based

This example shows how to set up and solve a mixed-integer linear programming problem.

Traveling Salesman Problem: Problem-Based

This example shows how to use binary integer programming to solve the classic traveling salesman problem.

Optimal Dispatch of Power Generators: Problem-Based

This example shows how to schedule two gas-fired electric generators optimally, meaning to get the most revenue minus cost.

Office Assignments by Binary Integer Programming: Problem-Based

This example shows how to solve an assignment problem by binary integer programming using the optimization problem approach.

Mixed-Integer Quadratic Programming Portfolio Optimization: Problem-Based

This example shows how to solve a Mixed-Integer Quadratic Programming (MIQP) portfolio optimization problem using the problem-based approach.

Cutting Stock Problem: Problem-Based

This example shows how to solve a cutting stock problem using linear programming with an integer linear programming subroutine.

Minimize Makespan in Parallel Processing

Minimize the maximum time for a set of processors to complete a group of tasks.

Solve Sudoku Puzzles Via Integer Programming: Problem-Based

This example shows how to solve a Sudoku puzzle using binary integer programming.

### 基于求解器的混合整数线性规划

Factory, Warehouse, Sales Allocation Model: Solver-Based

Example of optimizing logistics in a small supply chain.

Optimal Dispatch of Power Generators: Solver-Based

Example showing how to schedule power generation when there is a cost for activation.

Office Assignments by Binary Integer Programming: Solver-Based

Solve an assignment problem using binary integer programming.

Mixed-Integer Quadratic Programming Portfolio Optimization: Solver-Based

Example showing how to optimize a portfolio, a quadratic programming problem, with integer and other constraints.

Cutting Stock Problem: Solver-Based

Solve a cutting stock problem using linear programming with an integer programming subroutine.

Solve Sudoku Puzzles Via Integer Programming: Solver-Based

Sudoku is a type of puzzle that you can solve using integer linear programming.

### 基于问题的线性规划

Set Up a Linear Program, Problem-Based

Linear problem formulation using the problem-based approach.

Maximize Long-Term Investments Using Linear Programming: Problem-Based

This example shows how to use the problem-based approach to solve an investment problem with deterministic returns over a fixed number of years `T`.

Create Multiperiod Inventory Model in Problem-Based Framework

This example shows how to create a multiperiod inventory model in the problem-based framework.

### 基于求解器的线性规划

Typical Linear Programming Problem

This example shows the solution of a typical linear programming problem.

Maximize Long-Term Investments Using Linear Programming: Solver-Based

Optimize a deterministic multiperiod investment problem using linear programming.

### 基于问题的算法

Problem-Based Optimization Algorithms

How the optimization functions and objects solve optimization problems.

Supported Operations on Optimization Variables and Expressions

Lists all available mathematical and indexing operations on optimization variables and expressions.

### 基于求解器的算法和选项

Linear Programming Algorithms

Minimizing a linear objective function in n dimensions with only linear and bound constraints.

Tuning Integer Linear Programming

Steps for improving solutions or solution time.

intlinprog Output Function and Plot Function Syntax

How to monitor the progress of the `intlinprog` solution process.

﻿