PWL for MILP of Quadratic Functions

Definition of Aeq, Beq, Aineq, Bineq to formulate a MILP problem of a quadratic function f(x)=x^2, using Piece-Wise Linearization.
70 download
Aggiornato 2 nov 2021

Visualizza la licenza

This simple function [f_approx,f,Aeq,beq,Aineq,bineq]=quadaprox_CPLEX(x,xmax,Y) returns the matrices Aeq,beq,Aineq,bineq to formulate a MILP of a Piece-Wise Linearization of the quadratic function f(x)=x^2. It also returns the approximated value f_approx (using the CPLEX library) and the real value f evaluated at x, where xmax is the maximum value of x and Y is the number of PWL pieces.
The MILP problem formulation is presented in the Image.
If you don't use CPLEX to solve MILP, then use the function [Aeq,beq,Aineq,bineq]=quadaprox(P,Pmax,Y), but it won't calculate the approximat value.

Cita come

Edwin David Erazo Caicedo (2025). PWL for MILP of Quadratic Functions (https://it.mathworks.com/matlabcentral/fileexchange/78583-pwl-for-milp-of-quadratic-functions), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2020a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
2.0.0

1

1.0.0