Global optimization: transfer variables to non-linear constraints

조회 수: 1 (최근 30일)
Kai Krickmann
Kai Krickmann 2020년 12월 3일
댓글: Kai Krickmann 2020년 12월 3일
Hey guys!
I have an optimization problem and would like to define a nonlinear constraint in the function provided for it (unitdisc).Unfortunately I am unable to transfer the variables as input or globally. Do you have any tips for solving this problem. It looks like this for me:
e = @(x) transpose((xd * x) + xc) * x;
nonlcon = @unitdisc; %Can I add here the Variables?
problem = createOptimProblem('fmincon','objective',e,'x0',Initv,'lb',lb,...
'ub',ub,'nonlcon',nonlcon,'options',options);
[x] = run(gs,problem);
% and then
function [c,ceq] = unitdiscc(x,a,b,c,d...)

채택된 답변

Stephan
Stephan 2020년 12월 3일
nonlcon = @(x)unitdiscc(x,a,b,c,d...)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by