<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>qassign</TITLE>
  <TYPE>Scilab function</TYPE>
  <DATE>September 1996</DATE>
  <SHORT_DESCRIPTION name="qassign"> solves a quadratic assignment problem</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[crit,order] = qassign(c,f,d)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>c</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>f</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>d</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>crit</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real scalar</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>order</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer row vector</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>qassign</VERB> solves the quadratic assignment problem i.e.
    minimize the global criterium:
    <VERB> crit = e(1)+...+e(n) </VERB> 
    where
    <VERB> e(i) = c(i,l(i))+ fd(i) </VERB> 
    where
    <VERB> fd(i) = f(i,1)*d(l(i),l(1))+...+f(i,n)*d(l(i),l(n)) </VERB></P>
    <P><VERB>c</VERB>, <VERB>f</VERB> and <VERB>d</VERB> are n x n real arrays; their diagonal entries
    are zero.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
n=15;
d=100*rand(15,15);
d=d-diag(diag(d));
c=zeros(n,n);f=c;
f(2:n,1)=ones(1:n-1)';
[crit,order]=qassign(c,f,d)
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>knapsack</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
