source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/modules/parametric/mpt_enumeration_mpmilp.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 999 bytes
Line 
1function model = mpt_enumeration_mpmilp(Matrices,options)
2% Variable bounds when all binary variables are relaxed
3[global_lower,global_upper] = mpt_detect_and_improve_bounds(Matrices,Matrices.lb,Matrices.ub,Matrices.binary_var_index,options);
4
5Matrices.lb = global_lower;
6Matrices.ub = global_upper;
7if any(Matrices.lb(end-Matrices.nx+1:end) == Matrices.ub(end-Matrices.nx+1:end))
8    model = [];
9    return
10end
11
12% Enumerate a sufficent set of binary cases
13% (exploit SOS and pure binary constraints)
14[enums,Matrices] = mpt_enumerate_binary(Matrices);
15
16model = [];
17for i = 1:size(enums,2);
18    if options.verbose & rem(i,20)==0
19        disp(['Binary node ' num2str(i) '/' num2str(size(enums,2))]);
20    end
21    % Create node problem
22    lower = global_lower;
23    upper = global_upper;
24    lower(Matrices.binary_var_index) = enums(:,i);
25    upper(Matrices.binary_var_index) = enums(:,i);
26    % Pre-solve, solve and merge 
27    model = mpt_solvenode(Matrices,lower,upper,Matrices,model,options);   
28end
Note: See TracBrowser for help on using the repository browser.