필터 지우기
필터 지우기

how to define connection factors for supply chain for GA/fmincon optimization?

조회 수: 1 (최근 30일)
Aimen Mujahid
Aimen Mujahid 2017년 5월 25일
답변: Alan Weiss 2017년 6월 2일
function [Xmd]=checkb(Q) Xmd(1,1)=Q(1);% connection b/w manufacturer 1 and distributer 1 Xmd(2,1)=Q(2);% connection b/w manufacturer 2 and distributer 1 Xmd(3,1)=Q(3);% connection b/w manufacturer 3 and distributer 1 Xmd(1,2)=Q(4);% connection b/w manufacturer 1 and distributer 2 Xmd(2,2)=Q(5);% connection b/w manufacturer 2 and distributer 2 Xmd(3,2)=Q(6);% connection b/w manufacturer 3 and distributer 2
%it should be in binary 0 or 1
  댓글 수: 5
Alan Weiss
Alan Weiss 2017년 5월 26일
편집: Alan Weiss 2017년 5월 26일
Please mark your code with the {} Code button so that we can read it. Seriously, I am not going to try to decode your question until you format it properly.
Alan Weiss
MATLAB mathematical toolbox documentation
Aimen Mujahid
Aimen Mujahid 2017년 6월 1일
if true
function [Xmd]=checkb(Q) Xmd(1,1)=Q(1);
Xmd(2,1)=Q(2);
Xmd(3,1)=Q(3);
Xmd(1,2)=Q(4);
Xmd(2,2)=Q(5);
Xmd(3,2)=Q(6);
end
end

댓글을 달려면 로그인하십시오.

답변 (1개)

Alan Weiss
Alan Weiss 2017년 6월 2일
Is that supposed to be an objective function? Your function returns a 3-by-2 matrix that is simply a reshaping of the inputs. An objective function must be scalar-valued, not vector or matrix valued.
If you want to ask about how to write an objective function, see Writing Scalar Objective Functions. If you want to know something else, then please ask more explicitly.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by