Rev | Line | |
---|
[37] | 1 | function Y=simplify(X) |
---|
| 2 | %SIMPLIFY Reduce PWA complexity |
---|
| 3 | |
---|
| 4 | % Author Johan Löfberg |
---|
| 5 | % $Id: simplify.m,v 1.1 2006/06/08 15:35:19 joloef Exp $ |
---|
| 6 | |
---|
| 7 | variables = getvariables(X); |
---|
| 8 | extstruct = yalmip('extstruct',variables(1)); |
---|
| 9 | if ~isempty(extstruct) |
---|
| 10 | if isequal(extstruct.fcn,'pwa_yalmip') |
---|
| 11 | extstruct.arg{1}{1}.Fi = extstruct.arg{1}{1}.Bi; |
---|
| 12 | extstruct.arg{1}{1}.Gi = extstruct.arg{1}{1}.Ci; |
---|
| 13 | simplified = mpt_simplify(extstruct.arg{1}{1}); |
---|
| 14 | simplified.Bi = simplified.Fi; |
---|
| 15 | simplified.Ci = simplified.Gi; |
---|
| 16 | Y = pwf(simplified,extstruct.arg{2},extstruct.arg{3}); |
---|
| 17 | end |
---|
| 18 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.