2006-03-30 Michal Kvasnica (51834e46631f [MPT_2_6]) * (extras/simulink/mpt_simInput_sfunc.m): mpt_simInput_sfunc: prepare variables for on-line MPC where appropriate Options.uprev and Options.reference is now used if we have an on- line controller which uses solvesdp(). 2006-03-29 Johan Loefberg (561cc028c065) * (examples/nonlin/nonlin1.m): nonlin1: add more comments 2006-03-29 Michal Kvasnica (1e47ce6a9d48) * (mpt_getInput.m): mpt_getInput: avoid using sdpsettings() using sdpsettings() is slow, therefore now we assign fields of YALMIP options directly. this patch also allows Options.uppersolver to be specified. 2006-03-29 Frank J. Christophersen (b16261a40bb7) * (extras/analysis/mpt_dlyap_infnorm.m): mpt_dlyap_infnorm: use algebraic tests instead of LPs instead of solving a sequence of LPs one only needs to check simple algebraic tests. 2006-03-29 Michal Kvasnica (040295a32d96) * (@polytope/plus.m, extras/analysis/mpt_reachXU.m, extras/auxiliary/mpt_yalmipTracking.m, extras/control/mldmpc/mpc_checkSysWeight.m, extras/simulink/mpt_exportST.m, mpt_computeTrajectory.m, mpt_ownmpc.m, mpt_simSys.m, mpt_sys.m): fix problems reported by mlint code checker 2006-03-29 Michal Kvasnica (0911648d9052) * (@polytope/Contents.m, Contents.m, history.txt, readme.txt): changes for MPT 2.6 2006-03-29 Michal Kvasnica (c77f516162fb) * (examples/ownmpc/softconstr5.m): softconstr5: new demo of soft constraints 2006-03-29 Michal Kvasnica (8edd54471f1e) * (examples/nonlin/duffing_oscilator.m, examples/nonlin/duffing_oscillator.m, examples/nonlin/nonlin1.m): duffing_oscillator: fix typo in file name 2006-03-29 Michal Kvasnica (3b60afaf29ac) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: fix tags for output equations for LTI systems 2006-03-29 Michal Kvasnica (618880482c61) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: add constraints on x_{N-1} changeset 0b72c666d2fa has broken enforcement of state constraints on x_{N-1}, fixed here. unit test modified: mpt_ownmpc_test16.m 2006-03-28 Johan Loefberg (3b0560acc262) * (examples/nonlin/nonlin1.m): nonlin1: show difference between local and global solver 2006-03-28 Michal Kvasnica (8497b20773a7) * (mpt_getInput.m): mpt_getInput: use smaller default value of Options.MaxSQPIter Value of Options.MaxSQPIter is one of the most important factors which influence convergence of the fmincon() solver. It was observed on the nonlin1.m demo that the default value was too high, which caused fmincon() to hang under R13. Therefore now we set a better upper bound on this option, calculated from the number of variables and constraints present in the problem. This patch also adds support for Options.lowersolver, which is propagated into sdpsettings('bmibnb.lowersolver', Options.lowersolver). For instance the nonline1.m demo does not currently work with NAG as a lower solver, but works fine with GLPK/CDD. 2006-03-28 Michal Kvasnica (ef0e41d20c86) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: bound slack variables we now add bounds on slack variables used to introduce soft constraints, such that we avoid warnings from implies() or iff(). unit test added: mpt_ownmpc_test18.m 2006-03-28 Michal Kvasnica (d60d206b6425) * (@mptctrl/subsref.m): mptctrl/subsref: return vector of NaNs if problem is infeasible if the u=ctrl(x0) syntax is used, we now return a vector of NaNs if the problem is infeasible. unit test added: mptctrl/subsref_test3.m 2006-03-28 Michal Kvasnica (8abcf4b40fe6) * (extras/control/mpt_optControl.m): mpt_optControl: reject probStruct.N=Inf 2006-03-28 Michal Kvasnica (d118ec6a238b) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: reject probStruct.subopt_lev > 0 suboptimal strategies are not handled by this function. unit test added: mpt_ownmpc_test17.m 2006-03-28 Michal Kvasnica (0b72c666d2fa) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: always add state constraint on x_N if state constraints are defined, we now always impose them on the last predicted state x_N as well. unit test added: mpt_ownmpc_test16.m 2006-03-28 Michal Kvasnica (901d9ce3dea9) * (examples/ownmpc/lyapunov1.m): lyapunov1: call mpt_lyapunov() directly with sysStruct as an input 2006-03-28 Mato Baotic (b2889eae7716) * (extras/graphics/mpt_plotPWA.m): mpt_plotPWA: support Options.rowindex In Options.rowindex one can specify which row of Fi{:}*x+Gi{:} should be plotted. The options defaults to 1 if it is not given. 2006-03-28 Michal Kvasnica (51350a781660) * (examples/nonlin/pw_nonlin.m): pw_nonlin: update help description 2006-03-28 Michal Kvasnica (aa74ddfca2a5) * (examples/nonlin/nonlin2.m, mpt_getInput.m): mpt_getInput: work around problems with fmincon on Matlab R13 fmincon in R13 sets the MaxSQPIter option to Inf, which very causes the solver to freeze. Matlab R14 uses a much better bound which is a function of the number of optimization variables and constraints. Therefore to prevent the cycling in R13/fmincon we now use the same settings as R14 does. If problems remain, one can set the option by changing Options.MaxSQPIter. 2006-03-28 Michal Kvasnica (d92b7ac76e0e) * (examples/nonlin/nonlin1.m, examples/nonlin/nonlin2.m, mpt_getInput.m): mpt_getInput: use the "global" solver for nonlinear problems by default According to Johan, it's better to always use the "global" nonlinear solver instead of the "local" version. However, it was observed on numerous cases that if fmincon() is used as the global solver, it very often just stalls under Matlab R13. No problems however when Matlab R14 is used. It is therefore recommended to always use Options.nlsolver='local' and Options.convertconvex=1 under Matlab R13. 2006-03-28 Michal Kvasnica (47f12391af2a) * (examples/ownmpc/lyapunov1.m, examples/ownmpc/moveblock1.m, examples/ownmpc/moveblock2.m, examples/ownmpc/ownmpc10.m, examples/ownmpc/ownmpc11.m, examples/ownmpc/softconstr1.m, examples/ownmpc/softconstr2.m, examples/ownmpc/softconstr3.m, examples/ownmpc/softconstr4.m, examples/ownmpc/softconstr5.m, examples/ownmpc/timevar1.m, examples/ownmpc/timevar2.m): added more demos 2006-03-28 Michal Kvasnica (6a53243bbaf7) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: return slacks as variables if mpt_yalmipcftoc() is used to design constraints and objective and constraint softening is enabled, we now return the slacks as variables, such that they can later be used in custom constraints. unit test added: mpt_ownmpc_test15.m 2006-03-28 Michal Kvasnica (089dad36110e) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: return only first Nc manipulated variables if move blocking is used via probStruct.Nc and we are only constructing constraints/objective for later use, we now return only firs Nc manipulated variables in V.u, since the rest is fixed to V.u{end}. unit test added: mpt_ownmpc_test14.m 2006-03-27 Michal Kvasnica (3374be93951f) * (mpt_getInput.m): mpt_getInput: handle cases with move blocking if mpt_yalmipcftoc() or mpt_ownmpc() were used to deal with move blocking by means of probStruct.Nc, we now create a proper open-loop optimizer which contains all control moves u_0...u_N-1. without this patch we would only return those control moves which correspond to free manipulated variables, which would result in open-loop sequence of wrong size. unit test added: mpt_getInput_test6.m 2006-03-27 Michal Kvasnica (1559dcb39dea) * (mpt_control.m): mpt_control: properly handle move blocking with MPT-native functions changeset cedc93418d40 breaked move blocking if mpt_optControl() is used. therefore now we verify the input structures again if MPT- native functions are to be used, this time with Options.useyalmip disabled. unit test added: mpt_control_test3.m 2006-03-27 Michal Kvasnica (892504abcb0a) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: fix indexing of bounds w/ control horizon if control horizon is given, indexing of variables was incorrect when setting bounds on manipulated variables. 2006-03-27 Michal Kvasnica (c5e02764e626) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: set bounds on "u" if move blocking is used bounds on manipulated variables must be set separatelly if a control horizon is used. 2006-03-27 Michal Kvasnica (cedc93418d40) * (extras/control/mpt_yalmipcftoc.m, mpt_control.m): allow control horizons with PWA systems or with linear costs mpt_verifyProbStruct would yell if control horizon is defined with PWA systems or with linear cost objectives. Therefore now we always use the Options.useyalmip=1 flag which tells the verification functions that it should allow these combinations. unit test added: mpt_control_test2 2006-03-27 Michal Kvasnica (591482daf718) * (mpt_getInput.m): mpt_getInput: check for correct dimension of x0 unit test changed: mpt_getInput_test3.m 2006-03-27 Michal Kvasnica (8b8f2d338948) * (extras/control/mpt_yalmipcftoc.m, mpt_ownmpc.m): mpt_ownmpc: keep flag about controller type a flag is now kept in the VARS structure which tells whether given constraints have been designed for on-line or for explicit controller. such flag is then used in the computation phase of mpt_ownmpc() such that the user does not have to provide the controller type again. example: [C, O, V] = mpt_ownmpc(sysStruct, probStruct, 'online'); ctrl = mpt_ownmpc(sysStruct, probStruct, C, O, V); notice that in the second command we don't need to specify the 'online' flag again, since it is kept in "V". user can of course override the default behavior e.g. by ctrl = mpt_ownmpc(sysStruct, probStruct, C, O, V, 'explicit'); unit test added: mpt_ownmpc_test13.m 2006-03-27 Michal Kvasnica (987869e88c1d) * (@mptctrl/mptctrl.m): mptctrl: cannot convert nonlinear systems into dummy controllers unit test added: mptctrl/mptctrl_test3.m 2006-03-27 Michal Kvasnica (67adbf5d8d97) * (examples/nonlin/duffing_oscilator.m, examples/nonlin/nonlin1.m, examples/nonlin/nonlin2.m, examples/nonlin/pw_nonlin.m, examples/ownmpc/ownmpc1.m, examples/ownmpc/ownmpc2.m, examples/ownmpc/ownmpc3.m, examples/ownmpc/ownmpc4.m, examples/ownmpc/ownmpc5.m, examples/ownmpc/ownmpc6.m, examples/ownmpc/ownmpc7.m, examples/ownmpc/ownmpc8.m, examples/ownmpc/ownmpc9.m): added more demos 2006-03-27 Helfried Peyrl (28e080a4af81) * (solvers/esp/esp_setdiff_c.mexmac, solvers/fourier/fourier.mexmac, solvers/glpkmex/glpkmex.mexmac): added mex files for the MacOS platform 2006-03-27 Michal Kvasnica (706ef5add0fe) * (mpt_getInput.m): mpt_getInput: support Options.convertconvex Options.convertconvex should be set to 0 for general nonlinear problems. However the default is currently 1, since otherwise the nonlin2.m demo stalls under Matlab 6.5/Win due to cycling in fmincon. 2006-03-24 Michal Kvasnica (9238a44eaf9b) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: set bounds on guards for piecewise nonlinear systems if system is piecewise nonlinear, we are using the implies() operator. this, however, gives a warning if the expression for guards is not bounded. currently YALMIP does not autopropagate bounds in "constraint" objects (it would be very difficult to do so, see comments in the patch). therefore to avoid the warnings we just set large bounds on the guards expressions. yes, this will probably lead to very poor big-M relaxation, but there is no clear better (and simple) way of doing it. 2006-03-24 Michal Kvasnica (b6fde4f36491) * (mpt_simSys.m): mpt_simSys: return correct mode for piecewise nonlinear systems 2006-03-24 Michal Kvasnica (22f145d1b7a3) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: use proper casting when checking sigmonials when checking whether nonlinearities contain sigmonial terms, we must do a set() casting because gaurds will be given as "constraint" objects, not as "set" objects; and there is no is() operator defined for the "constraint" class. 2006-03-24 Michal Kvasnica (0249c05418eb) * (mpt_sys.m): mpt_sys: respect value of Ts defined in a nonlinear function template 2006-03-23 Michal Kvasnica (41c78041763f) * (mpt_ownmpc.m): mpt_ownmpc: fix typo in name of a variable 2006-03-23 Michal Kvasnica (8eafaa43e22f) * (mpt_ownmpc.m): mpt_ownmpc: reject sigmonial constraints and objectives 2006-03-23 Michal Kvasnica (1154cb6767f3) * (extras/analysis/mpt_removeOverlaps.m): mpt_removeOverlaps: check that cost is always linear we know properly check that the cost does not contain any quadratic terms. unit test added: extras/analysis/mpt_removeOverlaps_test7.m 2006-03-23 Michal Kvasnica (1db4accb6fd4) * (mpt_lyapunov.m): mpt_lyapunov: reject controllers with overlapping partitions 2006-03-23 Michal Kvasnica (9ed2846429e0) * (extras/analysis/mpt_removeOverlaps.m): mpt_removeOverlaps: fix cases where input was an mpctrl object we failed to create a valid output if input was an mptctrl object. unit test added: extras/analysis/mpt_removeOverlaps_test6.m 2006-03-23 Michal Kvasnica (a1f62d9bedaf) * (@mptctrl/mptctrl.m): mptctrl: use solvesdp() if we have nonlinear constraints if users use mpt_ownmpc() and then add nonlinear constraints, we now give a warning and keep the constraints and objective as YALMIP variables. then in mpt_getInput() we use solvesdp() to solve the nonlinear problem. unit test added: mpt_ownmpc_test11.m 2006-03-22 Michal Kvasnica (a5f69f1a3b15) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: prevent warnings due to unbounded variables in implies() if implies() is used (for PWA or piecewise nonlinear systems), since March 22nd, 2006 YALMIP checks whether all variables are bounded. If not, a warning is given. In order to prevent these warnings, we now replace all +/- Inf bounds by +/- mptOptions.infbox to prevent such warnings. unit test added: mpt_ownmpc_test1.m 2006-03-23 Michal Kvasnica (7c2f0030ed7f) * (@polytope/plot.m, extras/graphics/mpt_plotPWA.m, extras/graphics/mpt_plotPWQ.m): allow to disbale usage of "drawnow" in plotting functions polytope/plot, mpt_plotPWA and mpt_plotPWQ now allow to supress usage of "drawnow" if Options.drawnow is set to 0 (1 is default). this leads to significant performance improvement e.g. when plotting a series of PWQ plots on top of each other. 2006-03-22 Michal Kvasnica (7e31c2521528) * (extras/graphics/mpt_plotPWQ.m): mpt_plotPWQ: fix wrong assignment of bounds 2006-03-17 Michal Kvasnica (2bbcd913c518) * (mpt_control.m): mpt_control: properly detect deltaY constraints we now only reject deltaY constraints for yalmip-based formulations if sysStruct.{dymax|dymin} are not set to +/- Inf. 2006-03-15 Michal Kvasnica (4b413136c4d1) * (extras/auxiliary/mpt_pwa2hys.m): mpt_pwa2hys: don't append an '.hys' extension twice if the filename is already provided including the '.hys' extension, we should not add the same twice. 2006-03-15 Michal Kvasnica (30faae4108a3) * (mpt_sys.m): mpt_sys: give nice error when input is an incomplete MLD structure if mpt_pwa2mld() is used, the resulting MLD structure does not have the field "rowinfo" set, therefore the automatic PWA conversion fails. if we detect such case, we now give a nice error message which tells the user what to do. unit test added: mpt_sys_test4.m 2006-03-10 Michal Kvasnica (afbb531e3c12) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: fix undefined variable 2006-03-10 Michal Kvasnica (8ad15f4b5373) * (@mptctrl/char.m, @mptctrl/mptctrl.m, extras/control/mpt_nonlinfcn.m, extras/control/mpt_yalmipcftoc.m, mpt_control.m, mpt_getInput.m, mpt_ownmpc.m, mpt_simSys.m, mpt_sys.m): MPC for nonlinear systems nonlinear (polynomial) systems are now supported for on-line MPC. to generate a system structure which describes a nonlinear system, one has to create a special function based on the mpt_nonlinfcn.m template and then call mpt_sys() as follows: sysStruct = mpt_sys(@function_name); such a system structure can then be used in mpt_control() and/or in mpt_ownmpc() to design on-line MPC problems. mpt_getInput() then solves a corresponding nonlinear optimization problem by calling solvesdp(). by default it uses a local solver, but the user can switch to a global solver by Options.nlsolver='global'. piecewise nonlinear systems are supported as well (see mpt_nonlinfcn for more details). 2006-03-10 Michal Kvasnica (aebc11922b45) * (@mptctrl/info.m): mptctrl/info: give more precise memory storage info 2006-03-10 Michal Kvasnica (5965c28483fd) * (extras/control/optmerge/polyinnerball.m): polyinnerball: only define tolerances when needed 2006-02-24 Michal Kvasnica (4579868be0b7) * (@mptctrl/info.m): mptctrl/info: give a more precise memory storage information we now take into account that each floating point number is represented by 8 bytes, and each integer by 4 bytes. 2006-02-23 Frank J. Christophersen (99a9ff10a485) * (extras/analysis/mpt_dlyap_infnorm.m): mpt_dlyap_infnorm: add Options.minimal 2006-02-22 Michal Kvasnica (4cc220b30253) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: replace +/-Inf bounds with +/- mptOptions.infbox 2006-02-22 Michal Kvasnica (b2df0c147d4b) * (solvers/clp/clp.m, solvers/clp/mexclp.cpp, solvers/clp/mexclp.dll): MEXCLP: updated to latest version 2006-02-21 Michal Kvasnica (5df99f8f466c) * (solvers/mpt_solveLP.m): mpt_solveLP: fix cases with no inequality constraints and with bounds if we have no inequality constraints, but do have bounds on variables, these bounds have not been correctly converted into constraints due to bogus detection of number of optimization variables. 2006-02-21 Michal Kvasnica (3f5de39790de) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: mark soft constraints in tags soft constraints are now marked by more descriptive tags in the set object. 2006-02-21 Michal Kvasnica (60c34385d4a1) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: take into account that there is no u(N) since we now have the variable "u" as a cell array of N elements (u_0 ... u_(N-1)), we do not have any u(N) in the formulation. therefore we must take this fact into account when requesting the open-loop solution from solvemp(). 2006-02-21 Michal Kvasnica (d0b76c50959f) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: handle cases with probStruct.N=1 we now always create sdpvar objects as cell arrays even if we have prediction horizon of 1. 2006-02-21 Michal Kvasnica (255b9ffece5d) * (@mptctrl/mptctrl.m, extras/control/mpt_yalmipcftoc.m, mpt_ownmpc.m): mpt_yalmipcftoc, mpt_ownmpc: do not return y(N), u(N), d(N) and z(N) only x(N) is used in the MPC formulation, therefore we now return V.y, V.u, V.d and V.z as (N-1) dimensional arrays. This makes it easy to enforce constraints like set(sum([V.u{:}])==0) without the need to remember not to count the last element. 2006-02-21 Michal Kvasnica (a811525f08ba) * (docs/mpt_probStruct.m): mpt_probStruct: update help description 2006-02-21 Michal Kvasnica (5f3acb4950ea) * (docs/mpt_probStruct.m, docs/mpt_sysStruct.m): mpt_sysStruct, mpt_probStruct: updated help description 2006-02-21 Michal Kvasnica (2135ad7b9526) * (@polytope/Contents.m, Contents.m, history.txt, mpt_init.m, readme.txt): bump version number to 2.6 2006-02-21 Michal Kvasnica (964b2ad03aae) * (extras/graphics/mpt_plotTimeTrajectory.m): mpt_plotTimeTrajectory: update help description 2006-02-21 Michal Kvasnica (494515d2458f) * (@mptctrl/info.m): mptctrl/info: update help description 2006-02-21 Michal Kvasnica (d379e1e11cd3) * (mpt_getInput.m): mpt_getInput: always pass a guess of feasible solution to solvers guess of the feasible solution (Options.usex0) is now always passed to respective solver. moreover, selection of different solvers can now be directly controlled from mpt_getInput() by specifying Options.{lpsolver|qpsolver|milpsolver|miqpsolver} 2006-02-21 Michal Kvasnica (b64e34eebfbd) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: add bounds to all variables for better scaling in case of on-line controllers we now add bounds to "uprev" and "reference" variables to achieve better scaling. if these bounds cannot be deduced (missing state/output/input constraints), a warning is given. 2006-02-20 Michal Kvasnica (201ac578b889) * (Contents.m, mpt_ownmpc.m): mpt_ownmpc: update help description 2006-02-20 Michal Kvasnica (678576512a9f) * (mpt_init.m): mpt_init: give more precise help when path is not set correctly to prevent problems like in issue196, we now give a more precise advice of what to do if path is not set to all subdirectories. 2006-02-20 Michal Kvasnica (9de9297c5ea4) * (mpt_owncost.m, mpt_ownmpc.m): mpt_owncost renamed to mpt_ownmpc 2006-02-20 Michal Kvasnica (23429f6b63a4) * (extras/auxiliary/mpt_verifySysStruct.m): mpt_verifySysStruct: do not require output constraints we now do not require output constraints to be given if state constraints are provided. unit test added: extras/auxiliary/mpt_verifySysStruct_test3.m 2006-02-20 Michal Kvasnica (e52db755f715) * (@mptctrl/mptctrl.m, mpt_control.m, mpt_owncost.m): mpt_control: support multi-model dynamics multi-model dynamics (sysStruct given as a cell array of system structures) can now be used in mpt_control() and mpt_owncost() unit test added: mpt_control_test1.m 2006-02-16 Michal Kvasnica (96b43d920192) * (@mptctrl/mptctrl.m, mpt_owncost.m): mpt_owncost: allow to generate on-line controllers to generate constraints and objective: [C,O,V]=mpt_owncost(sysStruct, probStruct, 'online') to generate an on-line controller based on custom constraints and objective: ctrl = mpt_owncost(sysStruct, probStruct, C, O, V, 'online') unit test added: mpt_owncost_test7.m 2006-02-16 Michal Kvasnica (9fbbf57b0ccc) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: do not use Rdu on u_N-u_{N-1} u_N is not used in the MPC setup, therefore we should not penalize the difference (u_N - u_{N-1}). 2006-02-08 Michal Kvasnica (1ec486dad0fe) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: prefer MLD models for on-line controllers from a large number of examples it seems that MLD models are more efficient to solve compared to the approach where we use one binary per region of a PWA model. therefore we now use the MLD representation by default for on-line controllers and give the user to force either PWA or MLD models by setting Options.force_pwa or Options.force_mld to 1. 2006-02-08 Michal Kvasnica (2a81f6ccb3dc) * (extras/auxiliary/sub_computeTrajectory.m): sub_computeTrajectory: handle open-loop solutions for PWA systems if an explicit solution for PWA systems has been computed by mpt_yalmipcftoc(), the full open-loop solution can be stored directly in ctrl.Fi and ctrl.Gi. therefore we now handle this case when computing open-loop trajectories. 2006-02-07 Michal Kvasnica (5d5db899b366) * (mpt_sys.m): mpt_sys: add missing brace 2006-02-07 Michal Kvasnica (1e40b41b1f55) * (mpt_init.m): mpt_init: set 'bnb.branchrule' to 'weight' to improve speed if YALMIP is used as an mixed-integer solver, for control problems it makes sense to use 'weight' as the default branching rule in the branch&bound algorithm. it should improve the runtime. for more info contact Johan Loefberg. 2006-02-06 Michal Kvasnica (fcf1d12a1c60) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: simplify expressions for output variables if the output equations are identical for all dynamics of a PWA system, we can now create a less complex model by avoiding dependence of the output variables on dynamics selectors. 2006-02-06 Michal Kvasnica (82ce6970f4ad) * (mpt_sys.m): mpt_sys: extend detection of cases where input is an MLD structure 2006-02-06 Michal Kvasnica (5f48b7aca289) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: switch to one-shot formulation if Options.details=1 we need to switch off the DP formulation if the user requires the full open-loop solution to be returned for PWA systems. unit test added: extras/control/mpt_yalmipcftoc_test2.m 2006-02-03 Michal Kvasnica (16ba8889534d) * (extras/auxiliary/mpt_yalmip2mpt.m): mpt_yalmip2mpt: work around model.integer_variables 2006-02-03 Michal Kvasnica (8709088d82db) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: make PWA tags more descriptive 2006-02-03 Michal Kvasnica (88b95e56979e) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: fix bogus indexing 2006-02-03 Michal Kvasnica (794d331c3bc6) * (@mptctrl/mptctrl.m, extras/control/mpt_yalmipcftoc.m, mpt_control.m, mpt_getInput.m): allow to use mpt_yalmipcftoc() to construct and solve on-line problems 2006-02-03 Michal Kvasnica (ef03682b1817) * (extras/graphics/mpt_plotTimeTrajectory.m): mpt_plotTimeTrajectory: allow to disable displaying of legends if Options.legend is set to 0, we do not display the legends. default is Options.legend=1. 2006-02-03 Michal Kvasnica (43cca4801f00) * (extras/auxiliary/mpt_yalmipDU.m, extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipDU/mpt_yalmipTracking: also augment soft constraints probStruct.{sxmax|symax} and probStruct.{Sx|Sy}, if present, need to be augmented in case of tracking or deltaU formulation. 2006-02-01 Michal Kvasnica (d9da330b7277) * (extras/auxiliary/sub_computeTrajectory.m, extras/simulink/mpt_simInput_sfunc.m): always use Options.Uprev in call of mpt_getInput() w/ online controllers Options.Uprev is now needed for general on-line controllers designed by means of mpt_yalmipcftoc() in order to guarantee satisfaction of deltaU constraints. 2006-02-01 Michal Kvasnica (4d05653156e5) * (extras/auxiliary/mpt_yalmip2mpt.m, mpt_owncost.m): mpt_yalmip2mpt: convert YALMIP-based constraints/objective to MPT format 2006-02-01 Michal Kvasnica (1687329da45f) * (solvers/mpt_solveMIQP.m): mpt_solveMIQP: fix typo in help description 2006-02-01 Michal Kvasnica (75e111ddac02) * (extras/auxiliary/mpt_yalmipDU.m, extras/control/mpt_yalmipcftoc.m): mpt_control: use mpt_yalmipDU() to deal with deltaU constraints 2006-02-01 Michal Kvasnica (9803cc356dcc) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: switch to tracking=1 if there is Rdu penalty 2006-02-01 Michal Kvasnica (c464379bdd85) * (mpt_control.m): mpt_control: switch tracking=2 to tracking=1 if there is Rdu penalty 2006-02-01 Michal Kvasnica (26504d3b049b) * (extras/auxiliary/mpt_verifySysStruct.m): mpt_verifySysStruct: improve verification of deltaU constraints 2006-02-01 Michal Kvasnica (ffe7d57fdc48) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: update help description 2006-02-01 Michal Kvasnica (79b8b374bd91) * (mpt_control.m): mpt_control: allow to call mpt_yalmipcftoc() mpt_yalmipcftoc() is used whenever we have boolean/integer inputs, or for 2-norm CFTOC problems for PWA systems. for certain setups we can use both mpt_yalmipcftoc() and MPTs native control functions; in that case Options.prefered='mpt' or Options.prefered='yalmip' can be used to switch to either of them. 2006-02-01 Michal Kvasnica (72b198e63053) * (mpt_owncost.m): mpt_owncost: display info about the problem being solved we now display a brief info about the problem which is to be solved. specificaly, we display number of optimization, parametric and integer variables involved in the optimization problem. 2006-01-31 Michal Kvasnica (ecfa96888985) * (extras/auxiliary/mpt_verifyProbStruct.m): mpt_verifyProbStruct: less verbose output 2006-01-31 Michal Kvasnica (26cf0644c209) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: improve verification of sysStruct and probStruct 2006-01-31 Michal Kvasnica (bc6e8ac169cb) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: fix wrong matrix dimensions 2006-01-27 Michal Kvasnica (3fe0efc40d62) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: remove a redundant subfunction mpt_defaultField() is now a default function. 2006-01-25 Michal Kvasnica (70ab07cbe2db) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: give better error messages 2006-01-25 Michal Kvasnica (d3ed1a892eb6) * (extras/auxiliary/mpt_yalmipTracking.m, extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc, mpt_yalmipTracking: use mpt_defaultField 2006-01-25 Michal Kvasnica (2c3041e4d4d3) * (extras/auxiliary/mpt_defaultField.m): mpt_defaultField: sets default value of a filed of a structure V = mpt_defaultField(S, fname, default) if "S" contains a field "fname" then that value is returned, otherwise it will return "default". 2006-01-24 Michal Kvasnica (f1f79234ab06) * (mpt_owncost.m): mpt_owncost: keep verification of sysStruct and probStruct silent in the second phase (computation of a controller) we should keep mpt_verifySysProb silent, since all necessary messages have already been displayed in the first phase (construction of constraints). 2006-01-24 Michal Kvasnica (1896c7afdf56) * (mpt_owncost.m): mpt_owncost: fix bogus indexing 2006-01-24 Michal Kvasnica (8d3a60186d3b) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: remove probStruct.Rdu after augmentation when augmenting the system/problem to cope with tracking we should remove probStruct.Rdu, since this term will be included in probStruct.R. keeping probStruct.Rdu would cause problems in mpt_yalmipcftoc() where we use it (if present) to penalize deltaU in open loop. 2006-01-24 Michal Kvasnica (4ebe51663889) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: fix augmentation of constraints 2006-01-24 Michal Kvasnica (3e657b411eb0) * (mpt_owncost.m): mpt_owncost: verify structures before computation starts we now verify the sysStruct and probStruct structures even before we start computing the explicit controller, otherwise it would be annoying to give an error after the (possible) long time of computation. 2006-01-24 Michal Kvasnica (11d65d80c6f8) * (mpt_owncost.m): mpt_owncost: fix undefined variable unit test added: mpt_owncost_test3.m 2006-01-24 Michal Kvasnica (5459d5d4f16f) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: more error checks, improved "no solving" mode * checks that probStruct.N is correctly defined * returns all necessary variables in the Options.dont_solve=1 mode. 2006-01-24 Michal Kvasnica (8d6ec7128ee7) * (mpt_owncost.m): mpt_owncost: improve handling of input/output arguments 2006-01-23 Michal Kvasnica (085835d91520) * (extras/auxiliary/mpt_yalmipTracking.m): mpt_yalmipTracking: augment system w/ tracking for mpt_yalmipcftoc() augmentes system dynamics to cope with tracking. the difference to mpt_prepareTracking is that we no longer create "Cy" and "Dy" fields of the system structure, but rather change cost matrices to penalize the difference (y-y_ref). 2006-01-23 Michal Kvasnica (7a017f0978d2) * (mpt_owncost.m): mpt_owncost: design your own cost read help file for description. 2006-01-23 Michal Kvasnica (08f4556f9a9c) * (extras/control/mpt_yalmipcftoc.m): mpt_yalmipcftoc: the almighty function read help file for description. 2006-01-23 Michal Kvasnica (2f73b9f6d5fc) * (extras/auxiliary/mpt_verifyProbStruct.m, extras/auxiliary/mpt_verifySysProb.m): mpt_verifyProbStruct: allow control horizon for PWA systems w/ yalmip don't throw an error if we use control horizon for PWA systems with mpt_yalmipcftoc. Options.useyalmip must be set to true for this feature (it's false by default). unit test added: extras/auxiliary/mpt_verifySysProb_test2.m 2006-01-23 Michal Kvasnica (93bbd7b2f2c5) * (extras/auxiliary/mpt_verifySysStruct.m): mpt_verifySysStruct: make output constraints optional if Options.ybounds_optional is set to true (it's false by default), output constraints are no longer mandatory and will be set to +/- Inf if they are not present in the system structure. unit test added: extras/auxiliary/mpt_verifySysStruct_test2.m 2006-01-23 Michal Kvasnica (1b1802dcdd69) * (extras/auxiliary/mpt_prepareTracking.m): mpt_prepareTracking: mark system as being augmented a flag is added to the augmented sysStruct such that we know at later stages that the system was augmented exactly by this function. 2006-01-23 Michal Kvasnica (35e01271c154) * (extras/analysis/mpt_computePWATset.m): mpt_computePWATset: include state constraints if present 2005-12-12 Michal Kvasnica (efce6abb1425) * (extras/analysis/mpt_computePWATset.m): mpt_computePWATset: respect user-provided Options 2005-12-10 Michal Kvasnica (6f4c27e57e83) * (extras/auxiliary/mpt_mergeCS.m): mpt_mergeCS: properly merge Pfinal fields 2006-01-27 Michal Kvasnica (6dcec4da92fa) * (extras/simulink/mpt_searchTree.c): mpt_searchTree.c: use different datatypes for RTW apparently "real_T" is needed instead of "double" when compiling with RTW/TLC. 2006-01-20 Michal Kvasnica (f8903f8d3326) * (extras/analysis/mpt_searchTree.m): mpt_searchTree: only modify original object in case of no outputs only modify the original object in caller's workspace if there are no output arguments from mpt_searchTree(). unit test added: extras/analysis/mpt_searchTree_test2.m 2006-01-20 Michal Kvasnica (52e610b2cd3e) * (mpt_lyapunov.m): mpt_lyapunov: allow sysStruct structures as inputs mpt_lyapunov(sysStruct, 'functiontype') is now an allowed syntax. the (autonomous) dynamical system is first converted into a dummy controller object using the "mptctrl(sysStruct)" syntax and then the computation of a given lyapunov function continues is a standard way. unit test added: extras/analysis/mpt_lyapunov_test6.m 2006-01-20 Michal Kvasnica (592f88c28215) * (extras/analysis/mpt_getCommonSOSLyapFct.m): mpt_getCommonSOSLyapFct: define missing variables in special cases if number of regions is equal to number of dynamics, certain variables have not been defined. unit test added: extras/analysis/mpt_lyapunov_test4.m 2006-01-20 Michal Kvasnica (2c7c8f2cd889) * (extras/analysis/mpt_getPWQLyapFct.m): mpt_getPWQLyapFct: skip verification if all regions contain the origin if all regions contain the origin in their interior, the SDP program we intend to solve for verification purposes becomes empty and YALMIP will complain. therefore we skip the verification in such case. unit test modified: extras/analysis/mpt_lyapunov_test3.m 2006-01-20 Michal Kvasnica (f9ad2223113d) * (extras/analysis/mpt_getQuadLyapFct.m): mpt_getQuadLyapFct: deal with cases with just one region the H-representation of a polytope was not converted to a cell array. the correct behavior is assured by using pelemfun(). unit test modified: extras/analysis/mpt_lyapunov_test3.m 2006-01-20 Michal Kvasnica (fa5c9aa9c4a6) * (extras/analysis/mpt_getPWALyapFct.m, extras/analysis/mpt_getPWPLyapFct.m, extras/analysis/mpt_getPWQLyapFct.m, extras/analysis/mpt_getQuadLyapFct.m): lyapunov functions: deal with special corner cases in cases where the explicit controller had as many regions as there are dynamics of the dynamical system, certain variables would be undefined. this patch fixes it. unit test added: extras/analysis/mpt_lyapunov_test3.m 2006-01-20 Michal Kvasnica (e77b1d046d04) * (@mptctrl/mptctrl.m): mptctrl: convert sysStruct structures into dummy controller objects mptctrl(sysStruct) will convert a system structure into a dummy explicit controller, where regions of the controller correspond to the partitions of a given LTI/PWA system. the conversion is done for the purpose of allowing stability analysis functions to investigate stability of autonomous systems. Note: only autonomous systems can be converted! unit test added: mptctrl/mptctrl_test2.m 2006-01-20 Michal Kvasnica (e8292128438b) * (extras/simulink/mpt_exportST.m, extras/simulink/mpt_searchTree.c): mpt_exportST: exports a binary search tree into a C-code creates a C-file which contains data of a given search tree, together with an algorithm needed to identify the optimal control law on-line. mpt_searchTree.c serves as a template, where the placeholder is then replaced by actual data of the binary search tree. unit test added: extras/simulink/mpt_exportST_test1.m 2006-01-20 Michal Kvasnica (6fe57323a98e) * (@mptctrl/info.m): mptctrl/info: displays detailed information about a given controller in addition to the char() method, this functions also displays memory requirements of a given explicit controller, details about which simplification has been used, and details about a binary search tree. unit test added: mptctrl/info_test1.m 2006-01-20 Michal Kvasnica (34bdfbea9ba2) * (extras/auxiliary/sub_computeTrajectory.m, mpt_computeTrajectory.m): mpt_computeTrajectory: adapt to new outputs returned by mpt_getInput adapt to new behavior of mpt_getInput() which now returns full details in a structure. 2006-01-20 Michal Kvasnica (b5541222c605) * (mpt_getInput.m): mpt_getInput: return # of operations spent in search tree evaluation mpt_getInput() now returns a 5th output as a structure which contains number of numerical operations (multiplications, additions, comparisons) which are spend in evaluation of a binary search tree. unit test added: mpt_getInput_test4.m 2006-02-16 Michal Kvasnica (909e1e8da817) * (extras/analysis/mpt_transmap.m): mpt_transmap: handle cases where there is no target fixed a condition which would always stop the function if we have no target partition. 2006-02-16 Michal Kvasnica (19057291710e) * (mpt_simSys.m): mpt_simSys: update help description desfription of the "mode" output was missing in the usage line, reported by S. Richter. 2006-02-16 Michal Kvasnica (d2399f30821b) * (extras/analysis/mpt_transmap.m): mpt_transmap: give a nice error if vertex enumeration fails we now point the user to updated help file where he will be noted how to change the vertex eneumration solver in case of problems. 2006-02-16 Michal Kvasnica (9fc09238689b) * (extras/analysis/mpt_getQuadLyapFct.m): mpt_getQuadLyapFct: reject PWA systems with noise PWA systems with noise are not supported. reported by A. Beccuti. 2006-02-16 Michal Kvasnica (109d0be048b0) * (extras/analysis/mpt_getCommonSOSLyapFct.m): mpt_getCommonSOSLyapFct: fix wrong boolean condition and indexing reported by A. Beccuti. 2006-02-14 Michal Kvasnica (e8f1f3ba9157) * (extras/control/mpt_constructMatrices.m): mpt_constructMatrices: all(X==0) changed to all(all(X==0)) as pointed out by Klaus Trangbaek, all() operates column-wise, hence it should be changed to all(all()) to get a scalar answer. fixes issue193 2006-02-08 Michal Kvasnica (3361db7eaa47) * (mpt_control.m): mpt_control: extend help description add links to 'help mpt_sysStruct' and 'help mpt_probStruct'. 2006-02-05 Miroslav Baric (658cf8407683) * (extras/analysis/mpt_removeOverlaps.m): mpt_removeOverlaps: always return correct details.keptParts details.keptParts was always returned as an empty vector, which was causing severe problems in mpt_optControlPWA when used with Options.details=1. unit test added: extras/analysis/mpt_removeOverlaps_test5.m 2006-02-01 Frank J. Christophersen (31eececacbcf) * (extras/auxiliary/mpt_norm2pwa.m): mpt_norm2pwa: change default settings unit test modified: exras/auxiliary/mpt_norm2pwa_test1.m unit test modified: exras/auxiliary/mpt_norm2pwa_test2.m 2006-02-01 Frank J. Christophersen (33b883e7c9fa) * (extras/graphics/mpt_plotPWA.m): mpt_plotPWA: fix missing subindexing 2006-02-01 Michal Kvasnica (56bbd11ac265) * (mpt_invariantSet.m): mpt_invariantSet: fix undefined variable when invariant set is empty 2006-01-24 Michal Kvasnica (fe4ccad27de4) * (Contents.m, docs/Contents.m, examples/Contents.m, examples/ballandplate/Contents.m, examples/ccode/Contents.m, examples/demos/Contents.m, examples/hysdel/Contents.m, examples/models/Contents.m, examples/reachdemo/Contents.m, examples/turbocar/Contents.m, examples/watertanks/Contents.m, extras/Contents.m, extras/analysis/Contents.m, extras/auxiliary/Contents.m, extras/control/Contents.m, extras/control/optmerge/Contents.m, extras/geometry/Contents.m, extras/graphics/Contents.m, extras/gui/Contents.m, extras/simulink/Contents.m, mpt_init.m, solvers/Contents.m): extend copyright to year 2006 2006-01-24 Johan Loefberg (a66c285afbd8) * (solvers/clp/mexclp.dll): MEXCLP recompiled with latest version of CLP 2006-01-24 Michal Kvasnica (862e89a24e10) * (mpt_init.m): mpt_init: bump version number to 2.5.1 2006-01-24 Michal Kvasnica (7e85e4357419) * (mpt_init.m): mpt_init: GLPK was not recognized as an LP solver 2006-01-24 Michal Kvasnica (1d9c35868c0a) * (mpt_getInput.m): mpt_getInput: inform the user if x0 violates state constraints especially in case of tracking it can happen that the user specifies a reference point which is outside of constraints. in such case we give nicer message indicating the cause why no region contains a given state. fixes issue163 unit test added: mpt_getInput_test5.m 2006-01-18 Michal Kvasnica (a7336bce66a2) * (extras/analysis/mpt_searchTree.m): mpt_searchTree: only modify original object in case of no outputs only assign the modified object into caller's workspace if there are no output arguments for the function call. unit test added: extras/analysis/mpt_searchTree_test2.m 2005-12-16 Michal Kvasnica (347e877f2f0c) * (mpt_lyapunov.m): mpt_lyapunov: fix crash when no lyapunov function was found if not lyapunov function of a given type could be found, we tried to use the variable "type" to display what type of function we tried to compute. but that variable was undefined. 2006-02-01 Frank J. Christophersen (34684e4de721) * (extras/analysis/mpt_dlyap_infnorm.m): mpt_dlyap_infnorm: computes PWL Lyapunov functions new supercool function for computing PWL Lyap function for unconstrained LTI of basically arbirtray size. solves Lyapunov-like equation for linear norms. 2006-01-31 Michal Kvasnica (c14b55e34403) * (@polytope/slice.m): polytope/slice: return indices of fully-dimensional cuts the slice() function now returns a 2nd output as a vector of indeces of polytopes where the cut lead to a fully-dimensional polytope. unit test added: polytope/slice_test1.m 2006-01-31 Michal Kvasnica (8adfebee6550) * (mpt_invariantSet.m): mpt_invariantSet: only consider first control move even for PWA systems when linking dynamics to regions for PWA systems, we always assumed that the controller only contains the first control move in Fi/Gi fields. However, if we would have a full open-loop control sequence available for PWA systems, we need to consider only the first move. 2006-01-09 Michal Kvasnica (1625dd1cf0d1) * (@polytope/or.m): polytope/or: fix handling of empty polytopes when computing unions of fully-dimensional polytopes with empty ones, we have been incorectly returning an empty polytope. unit test added: polytope/or_test1.m 2005-12-08 Johan Loefberg (dd8e49b00df2) * (extras/auxiliary/mpt_mplp_ver7.m, solvers/mpt_mpqp.m): mpt_mpqp, mpt_mplp: speed up the sub_whichquadrant() subfunction 2005-12-08 Michal Kvasnica (ebda772098ae) * (@polytope/isinside.m): polytope/isinside: speedup initializing a vector and using find() is much faster than adding elements on the fly. 2005-12-08 Michal Kvasnica (59532947036d) * (solvers/mpt_mpqp.m): mpt_mpqp: give warning when the mpQP is not positive definite unit test added: solvers/mpt_mpqp_test8.m 2005-12-07 Michal Kvasnica (c23c4a7c50ed) * (mpt_simplify.m): mpt_simplify: allow inputs which are not controller objects mpt_simplify() can now be used for objects which are not necessarily controller objects, but are, for instance, solution partitions which contain at least the fields Pn, Fi, Gi, Ai, Bi, and Ci. unit test added: mpt_simplify_test1.m 2005-12-07 Michal Kvasnica (b8269e89f659) * (extras/graphics/mpt_plotPWA.m, extras/graphics/mpt_plotPWQ.m): mpt_plotPWQ, mpt_plotPWA: improved handling of new plots / holded plots when mpt_plotPWQ() or mpt_plotPWA() are used several times, they would plot the result into the same window on top of the previous result, regardless of the status of 'hold on'. now we always clear the current (sub)plot, but respect the user's choice of 'hold on' or 'subplot()'. this patch also simplifies the messy code of mpt_plotPWQ: 1. manual computation of bounding boxes replaced by calling bounding_box() directly (note that it supports polytope arrays) 2. if there are overlapping regions, for a given point we now plot the minimal function value associated to that point 2005-12-07 Michal Kvasnica (31364f525789) * (mpt_simplify.m): mpt_simplify: update help description 2005-12-07 Michal Kvasnica (41cc427bd2e3) * (extras/control/mpt_optQuadCtrl.m): mpt_optQuadCtrl: properly deal with probStruct.y0bounds=1 do not impose constraints on y0 if user does not want to. unit test added: extras/control/mpt_optQuadCtrl_test7.m 2005-12-06 Michal Kvasnica (af2e36fa586f) * (@polytope/projection.m): polytope/projection: add protection against cycling the iterative-hull algorithm can cycle under certain occasions. this patch adds a protection by aborting if number of iterations exceedes certain limit. unit test added: polytope/projection_test14.m 2005-12-09 Michal Kvasnica (d51c41e6312d) * (@polytope/plot.m): polytope/plot: add Options.elevate if Options.elevate is set to true, each polytope of a 1D or 2D polytope array is "elevated" along the 2nd/3rd dimension with an increasing index of the polytope in a given array. Example: P = [unitbox(2) unitbox(2)]; plot(P, struct('elevate', 1)); view(3); 2005-12-06 Michal Kvasnica (4450aa16cc44) * (.hgtags): Added tag MPT_2_5 for changeset eed2f8dbdff4818ddda463984bf8bcdea4ea2d29 2005-12-06 Johan Loefberg (eed2f8dbdff4 [MPT_2_5]) * (extras/auxiliary/mpt_ineq2eq.m): mpt_ineq2eq: add a small tolerance when checking equalities some numerical issues have been observed under Matlab R12, therefore we add a small tolerance when pre-checking equalities. unit test added: extras/auxiliary/mpt_ineq2eq_test2.m