이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
OptimizationValues
설명
생성
solve
함수는 OptimizationValues
객체로 구성된 벡터를 다중 목적 함수 문제에 대한 해로 반환합니다.
optimvalues
함수를 사용하여 시작점 x0
에 대한 OptimizationValues
객체를 만듭니다.
속성
일반적으로 OptimizationValues
속성은 동적입니다. 즉, 이 속성은 최적화 변수의 이름, 목적 함수 또는 함수의 이름, 제약 조건의 이름일 수 있습니다.
하지만 명명되지 않은 목적 함수 또는 제약 조건도 사용할 수 있습니다. 그러한 경우 OptimizationValues
는 다음과 같은 속성을 할당합니다.
목적 함수 값으로, 실수형 배열로 반환되거나 지정됩니다.
데이터형: double
제약 조건 값으로, 실수형 배열로 반환되거나 지정됩니다.
데이터형: double
객체 함수
paretoplot | Pareto plot of multiobjective values |
예제
최적화 변수를 사용하여 다중 목적 함수 문제를 만들고 풉니다.
x = optimvar("x",LowerBound=-3,UpperBound=3); prob = optimproblem; prob.Objective = [x^2;(x-1)^2]; % Tradeoff region between x = 0 and x = 1 prob.Constraints.con1 = x^2 <= 1/2; % Demonstrate constraints prob.Constraints.con2 = x^2 >= 1/10; % Second constraint rng default % For reproducibility [sol,fval,exitflag,output] = solve(prob,Solver="paretosearch")
Solving problem using paretosearch. Pareto set found that satisfies the constraints. Optimization completed because the relative change in the volume of the Pareto set is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within 'options.ConstraintTolerance'.
sol = 1×60 OptimizationValues vector with properties: Variables properties: x: [0.7027 0.7014 0.3635 0.3491 0.5723 0.3177 0.4634 0.4400 0.6379 0.6402 0.3750 0.6057 0.6565 0.5483 0.6455 0.5518 0.3760 0.3232 0.6768 0.6357 0.5625 0.3952 0.3382 0.3857 0.5677 0.5170 0.5107 0.6241 0.6615 0.3295 0.6875 … ] (1×60 double) Objective properties: Objective: [2×60 double] Constraints properties: con1: [-0.0063 -0.0081 -0.3679 -0.3781 -0.1725 -0.3991 -0.2853 -0.3064 -0.0931 -0.0902 -0.3594 -0.1332 -0.0690 -0.1994 -0.0833 -0.1955 -0.3586 -0.3955 -0.0420 -0.0959 -0.1836 -0.3438 -0.3856 -0.3512 -0.1777 -0.2327 -0.2392 … ] (1×60 double) con2: [-0.3937 -0.3919 -0.0321 -0.0219 -0.2275 -9.3572e-04 -0.1147 -0.0936 -0.3069 -0.3098 -0.0406 -0.2668 -0.3310 -0.2006 -0.3167 -0.2045 -0.0414 -0.0045 -0.3580 -0.3041 -0.2164 -0.0562 -0.0144 -0.0488 -0.2223 -0.1673 -0.1608 … ] (1×60 double)
fval = 2×60
0.4937 0.4919 0.1321 0.1219 0.3275 0.1009 0.2147 0.1936 0.4069 0.4098 0.1406 0.3668 0.4310 0.3006 0.4167 0.3045 0.1414 0.1045 0.4580 0.4041 0.3164 0.1562 0.1144 0.1488 0.3223 0.2673 0.2608 0.3895 0.4375 0.1086 0.4727 0.2001 0.4395 0.2261 0.1658 0.4862 0.4270 0.3525 0.1057 0.2628 0.2197 0.4902 0.1760 0.3665 0.2411 0.1092 0.4911 0.1914 0.1182 0.3742
0.0884 0.0892 0.4051 0.4237 0.1829 0.4655 0.2880 0.3136 0.1311 0.1295 0.3906 0.1555 0.1180 0.2040 0.1257 0.2009 0.3893 0.4580 0.1045 0.1327 0.1914 0.3658 0.4380 0.3773 0.1869 0.2333 0.2394 0.1413 0.1146 0.4496 0.0977 0.3055 0.1136 0.2751 0.3514 0.0916 0.1201 0.1650 0.4555 0.2375 0.2822 0.0899 0.3369 0.1557 0.2591 0.4483 0.0895 0.3164 0.4307 0.1508
exitflag = SolverConvergedSuccessfully
output = struct with fields:
iterations: 20
funccount: 380
volume: 1.8611
averagedistance: 0.0101
spread: 0.3067
maxconstraint: 0
message: 'Pareto set found that satisfies the constraints. ↵↵Optimization completed because the relative change in the volume of the Pareto set ↵is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within ↵'options.ConstraintTolerance'.'
rngstate: [1×1 struct]
solver: 'paretosearch'
paretosearch
솔버가 16회의 반복으로 실현 가능한 해로 수렴됩니다. 해를 플로팅합니다.
paretoplot(sol)
다음과 같이 데이터팁을 사용하여 플롯에서 검토하기 위해 임의의 점을 선택합니다.
위 그림에 있는 점의 인덱스는 48입니다. 해 48을 검토합니다.
arbitrarysol = sol(48)
arbitrarysol = OptimizationValues with properties: Variables properties: x: 0.4375 Objective properties: Objective: [2×1 double] Constraints properties: con1: -0.3086 con2: -0.0914
제약 조건 값은 음수이며, 이는 그림에 있는 점이 실현 가능함을 의미합니다.
arbitrarysol.Objective
ans = 2×1
0.1914
0.3164
객체 값은 데이터팁의 값과 일치합니다.
제한 사항
OptimizationValues
객체는 가로 결합만 지원합니다. 다시 말해,OptimizationValues
객체로 구성된 행 벡터만 사용할 수 있습니다.
버전 내역
R2022a에 개발됨
참고 항목
도움말 항목
- Specify Start Points for MultiStart, Problem-Based (Global Optimization Toolbox)
- Pareto Front for Multiobjective Optimization, Problem-Based (Global Optimization Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)