1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>symphonymat</title>
<style type="text/css" media="all">
@import url("scilab_code.css");
@import url("xml_code.css");
@import url("c_code.css");
@import url("style.css");
</style>
</head>
<body>
<div class="manualnavbar">
<table width="100%"><tr>
<td width="30%">
<span class="previous"><a href="symphony.html"><< symphony</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="section_508f0b211d17ea6769714cc144e6b731.html">Symphony Native Functions >></a></span>
</td>
</tr></table>
<hr />
</div>
<span class="path"><a href="index.html">Symphony Toolbox</a> >> <a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a> > symphonymat</span>
<br /><br />
<div class="refnamediv"><h1 class="refname">symphonymat</h1>
<p class="refpurpose">Solves a mixed integer linear programming constrained optimization problem in intlinprog format.</p></div>
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
<div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span>
<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span>
<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span>
<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
<span class="default">[</span><span class="default">xopt</span><span class="default">,</span><span class="default">fopt</span><span class="default">,</span><span class="default">status</span><span class="default">,</span><span class="default">output</span><span class="default">] = </span><span class="functionid">symphonymat</span><span class="default">( ... )</span></pre></div></div>
<div class="refsection"><h3 class="title">Parameters</h3>
<dl><dt><span class="term">c :</span>
<dd><p class="para">a vector of double, contains coefficients of the variables in the objective</p></dd></dt>
<dt><span class="term">intcon :</span>
<dd><p class="para">Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable.</p></dd></dt>
<dt><span class="term">A :</span>
<dd><p class="para">Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has the size where columns equals to the number of variables.</p></dd></dt>
<dt><span class="term">b :</span>
<dd><p class="para">Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has size equals to the number of rows in A.</p></dd></dt>
<dt><span class="term">Aeq :</span>
<dd><p class="para">Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has the size where columns equals to the number of variables.</p></dd></dt>
<dt><span class="term">beq :</span>
<dd><p class="para">Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has size equals to the number of rows in Aeq.</p></dd></dt>
<dt><span class="term">lb :</span>
<dd><p class="para">Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt>
<dt><span class="term">ub :</span>
<dd><p class="para">Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt>
<dt><span class="term">options :</span>
<dd><p class="para">a list containing the the parameters to be set.</p></dd></dt>
<dt><span class="term">xopt :</span>
<dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt>
<dt><span class="term">fopt :</span>
<dd><p class="para">a double, the function value at x</p></dd></dt>
<dt><span class="term">status :</span>
<dd><p class="para">status flag returned from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.</p></dd></dt>
<dt><span class="term">output :</span>
<dd><p class="para">The output data structure contains detailed information about the optimization process. This version only contains number of iterations.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :</p>
<p class="para"><span><img src='./_LaTeX_symphonymat.xml_1.png' style='position:relative;top:51px;width:212px;height:110px'/></span></p>
<p class="para">The routine calls SYMPHONY written in C by gateway files for the actual computation.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// Objective function</span>
<span class="scilabcomment">// Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. </span><span class="scilabcomment">"</span><span class="scilabcomment">An application of mixed integer programming in a Swedish steel mill.</span><span class="scilabcomment">"</span><span class="scilabcomment"> Interfaces 7, no. 2 (1977): 39-43.</span>
<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Lower Bound of variable</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">8</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Upper Bound of variables</span>
<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabconstants">%inf</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Constraint Matrix</span>
<span class="scilabid">Aeq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
<span class="scilabnumber">5</span><span class="scilaboperator">*</span><span class="scilabnumber">0.05</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabnumber">0.05</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">0.08</span><span class="scilabdefault">,</span><span class="scilabnumber">0.07</span><span class="scilabdefault">,</span><span class="scilabnumber">0.06</span><span class="scilabdefault">,</span><span class="scilabnumber">0.03</span><span class="scilabdefault">;</span>
<span class="scilabnumber">5</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">0.06</span><span class="scilabdefault">,</span><span class="scilabnumber">0.07</span><span class="scilabdefault">,</span><span class="scilabnumber">0.08</span><span class="scilabdefault">,</span><span class="scilabnumber">0.09</span><span class="scilabdefault">;</span><span class="scilabopenclose">]</span>
<span class="scilabid">beq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">25</span><span class="scilabdefault">,</span> <span class="scilabnumber">1.25</span><span class="scilabdefault">,</span> <span class="scilabnumber">1.25</span><span class="scilabopenclose">]</span>
<span class="scilabid">intcon</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span> <span class="scilabnumber">3</span> <span class="scilabnumber">4</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Calling Symphony</span>
<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">Aeq</span><span class="scilabdefault">,</span><span class="scilabid">beq</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Press ENTER to continue</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Examples</h3>
<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// An advanced case where we set some options in symphony</span>
<span class="scilabcomment">// This problem is taken from</span>
<span class="scilabcomment">// P.C.Chu and J.E.Beasley</span>
<span class="scilabcomment">// </span><span class="scilabcomment">"</span><span class="scilabcomment">A genetic algorithm for the multidimensional knapsack problem</span><span class="scilabcomment">"</span><span class="scilabcomment">,</span>
<span class="scilabcomment">// Journal of Heuristics, vol. 4, 1998, pp63-86.</span>
<span class="scilabcomment">// The problem to be solved is:</span>
<span class="scilabcomment">// Max sum{j=1,...,n} p(j)x(j)</span>
<span class="scilabcomment">// st sum{j=1,...,n} r(i,j)x(j) </span><span class="scilabcomment"><</span><span class="scilabcomment">= b(i) i=1,...,m</span>
<span class="scilabcomment">// x(j)=0 or 1</span>
<span class="scilabcomment">// The function to be maximize i.e. P(j)</span>
<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilaboperator">*</span><span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">825</span> <span class="scilabnumber">1002</span> <span class="scilabnumber">860</span> <span class="scilabnumber">615</span> <span class="scilabnumber">540</span> <span class="scilabnumber">797</span> <span class="scilabnumber">616</span> <span class="scilabnumber">660</span> <span class="scilabnumber">707</span> <span class="scilabnumber">866</span> <span class="scilabnumber">647</span> <span class="scilabnumber">746</span> <span class="scilabnumber">1006</span> <span class="scilabnumber">608</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">877</span> <span class="scilabnumber">900</span> <span class="scilabnumber">573</span> <span class="scilabnumber">788</span> <span class="scilabnumber">484</span> <span class="scilabnumber">853</span> <span class="scilabnumber">942</span> <span class="scilabnumber">630</span> <span class="scilabnumber">591</span> <span class="scilabnumber">630</span> <span class="scilabnumber">640</span> <span class="scilabnumber">1169</span> <span class="scilabnumber">932</span> <span class="scilabnumber">1034</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">957</span> <span class="scilabnumber">798</span> <span class="scilabnumber">669</span> <span class="scilabnumber">625</span> <span class="scilabnumber">467</span> <span class="scilabnumber">1051</span> <span class="scilabnumber">552</span> <span class="scilabnumber">717</span> <span class="scilabnumber">654</span> <span class="scilabnumber">388</span> <span class="scilabnumber">559</span> <span class="scilabnumber">555</span> <span class="scilabnumber">1104</span> <span class="scilabnumber">783</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">959</span> <span class="scilabnumber">668</span> <span class="scilabnumber">507</span> <span class="scilabnumber">855</span> <span class="scilabnumber">986</span> <span class="scilabnumber">831</span> <span class="scilabnumber">821</span> <span class="scilabnumber">825</span> <span class="scilabnumber">868</span> <span class="scilabnumber">852</span> <span class="scilabnumber">832</span> <span class="scilabnumber">828</span> <span class="scilabnumber">799</span> <span class="scilabnumber">686</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">510</span> <span class="scilabnumber">671</span> <span class="scilabnumber">575</span> <span class="scilabnumber">740</span> <span class="scilabnumber">510</span> <span class="scilabnumber">675</span> <span class="scilabnumber">996</span> <span class="scilabnumber">636</span> <span class="scilabnumber">826</span> <span class="scilabnumber">1022</span> <span class="scilabnumber">1140</span> <span class="scilabnumber">654</span> <span class="scilabnumber">909</span> <span class="scilabnumber">799</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">1162</span> <span class="scilabnumber">653</span> <span class="scilabnumber">814</span> <span class="scilabnumber">625</span> <span class="scilabnumber">599</span> <span class="scilabnumber">476</span> <span class="scilabnumber">767</span> <span class="scilabnumber">954</span> <span class="scilabnumber">906</span> <span class="scilabnumber">904</span> <span class="scilabnumber">649</span> <span class="scilabnumber">873</span> <span class="scilabnumber">565</span> <span class="scilabnumber">853</span> <span class="scilabnumber">1008</span> <span class="scilabnumber">632</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//Constraint Matrix</span>
<span class="scilabid">A</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabcomment">//Constraint 1</span>
<span class="scilabnumber">42</span> <span class="scilabnumber">41</span> <span class="scilabnumber">523</span> <span class="scilabnumber">215</span> <span class="scilabnumber">819</span> <span class="scilabnumber">551</span> <span class="scilabnumber">69</span> <span class="scilabnumber">193</span> <span class="scilabnumber">582</span> <span class="scilabnumber">375</span> <span class="scilabnumber">367</span> <span class="scilabnumber">478</span> <span class="scilabnumber">162</span> <span class="scilabnumber">898</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">550</span> <span class="scilabnumber">553</span> <span class="scilabnumber">298</span> <span class="scilabnumber">577</span> <span class="scilabnumber">493</span> <span class="scilabnumber">183</span> <span class="scilabnumber">260</span> <span class="scilabnumber">224</span> <span class="scilabnumber">852</span> <span class="scilabnumber">394</span> <span class="scilabnumber">958</span> <span class="scilabnumber">282</span> <span class="scilabnumber">402</span> <span class="scilabnumber">604</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">164</span> <span class="scilabnumber">308</span> <span class="scilabnumber">218</span> <span class="scilabnumber">61</span> <span class="scilabnumber">273</span> <span class="scilabnumber">772</span> <span class="scilabnumber">191</span> <span class="scilabnumber">117</span> <span class="scilabnumber">276</span> <span class="scilabnumber">877</span> <span class="scilabnumber">415</span> <span class="scilabnumber">873</span> <span class="scilabnumber">902</span> <span class="scilabnumber">465</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">320</span> <span class="scilabnumber">870</span> <span class="scilabnumber">244</span> <span class="scilabnumber">781</span> <span class="scilabnumber">86</span> <span class="scilabnumber">622</span> <span class="scilabnumber">665</span> <span class="scilabnumber">155</span> <span class="scilabnumber">680</span> <span class="scilabnumber">101</span> <span class="scilabnumber">665</span> <span class="scilabnumber">227</span> <span class="scilabnumber">597</span> <span class="scilabnumber">354</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">597</span> <span class="scilabnumber">79</span> <span class="scilabnumber">162</span> <span class="scilabnumber">998</span> <span class="scilabnumber">849</span> <span class="scilabnumber">136</span> <span class="scilabnumber">112</span> <span class="scilabnumber">751</span> <span class="scilabnumber">735</span> <span class="scilabnumber">884</span> <span class="scilabnumber">71</span> <span class="scilabnumber">449</span> <span class="scilabnumber">266</span> <span class="scilabnumber">420</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">797</span> <span class="scilabnumber">945</span> <span class="scilabnumber">746</span> <span class="scilabnumber">46</span> <span class="scilabnumber">44</span> <span class="scilabnumber">545</span> <span class="scilabnumber">882</span> <span class="scilabnumber">72</span> <span class="scilabnumber">383</span> <span class="scilabnumber">714</span> <span class="scilabnumber">987</span> <span class="scilabnumber">183</span> <span class="scilabnumber">731</span> <span class="scilabnumber">301</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">718</span> <span class="scilabnumber">91</span> <span class="scilabnumber">109</span> <span class="scilabnumber">567</span> <span class="scilabnumber">708</span> <span class="scilabnumber">507</span> <span class="scilabnumber">983</span> <span class="scilabnumber">808</span> <span class="scilabnumber">766</span> <span class="scilabnumber">615</span> <span class="scilabnumber">554</span> <span class="scilabnumber">282</span> <span class="scilabnumber">995</span> <span class="scilabnumber">946</span> <span class="scilabnumber">651</span> <span class="scilabnumber">298</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//Constraint 2</span>
<span class="scilabnumber">509</span> <span class="scilabnumber">883</span> <span class="scilabnumber">229</span> <span class="scilabnumber">569</span> <span class="scilabnumber">706</span> <span class="scilabnumber">639</span> <span class="scilabnumber">114</span> <span class="scilabnumber">727</span> <span class="scilabnumber">491</span> <span class="scilabnumber">481</span> <span class="scilabnumber">681</span> <span class="scilabnumber">948</span> <span class="scilabnumber">687</span> <span class="scilabnumber">941</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">350</span> <span class="scilabnumber">253</span> <span class="scilabnumber">573</span> <span class="scilabnumber">40</span> <span class="scilabnumber">124</span> <span class="scilabnumber">384</span> <span class="scilabnumber">660</span> <span class="scilabnumber">951</span> <span class="scilabnumber">739</span> <span class="scilabnumber">329</span> <span class="scilabnumber">146</span> <span class="scilabnumber">593</span> <span class="scilabnumber">658</span> <span class="scilabnumber">816</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">638</span> <span class="scilabnumber">717</span> <span class="scilabnumber">779</span> <span class="scilabnumber">289</span> <span class="scilabnumber">430</span> <span class="scilabnumber">851</span> <span class="scilabnumber">937</span> <span class="scilabnumber">289</span> <span class="scilabnumber">159</span> <span class="scilabnumber">260</span> <span class="scilabnumber">930</span> <span class="scilabnumber">248</span> <span class="scilabnumber">656</span> <span class="scilabnumber">833</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">892</span> <span class="scilabnumber">60</span> <span class="scilabnumber">278</span> <span class="scilabnumber">741</span> <span class="scilabnumber">297</span> <span class="scilabnumber">967</span> <span class="scilabnumber">86</span> <span class="scilabnumber">249</span> <span class="scilabnumber">354</span> <span class="scilabnumber">614</span> <span class="scilabnumber">836</span> <span class="scilabnumber">290</span> <span class="scilabnumber">893</span> <span class="scilabnumber">857</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">158</span> <span class="scilabnumber">869</span> <span class="scilabnumber">206</span> <span class="scilabnumber">504</span> <span class="scilabnumber">799</span> <span class="scilabnumber">758</span> <span class="scilabnumber">431</span> <span class="scilabnumber">580</span> <span class="scilabnumber">780</span> <span class="scilabnumber">788</span> <span class="scilabnumber">583</span> <span class="scilabnumber">641</span> <span class="scilabnumber">32</span> <span class="scilabnumber">653</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">252</span> <span class="scilabnumber">709</span> <span class="scilabnumber">129</span> <span class="scilabnumber">368</span> <span class="scilabnumber">440</span> <span class="scilabnumber">314</span> <span class="scilabnumber">287</span> <span class="scilabnumber">854</span> <span class="scilabnumber">460</span> <span class="scilabnumber">594</span> <span class="scilabnumber">512</span> <span class="scilabnumber">239</span> <span class="scilabnumber">719</span> <span class="scilabnumber">751</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">708</span> <span class="scilabnumber">670</span> <span class="scilabnumber">269</span> <span class="scilabnumber">832</span> <span class="scilabnumber">137</span> <span class="scilabnumber">356</span> <span class="scilabnumber">960</span> <span class="scilabnumber">651</span> <span class="scilabnumber">398</span> <span class="scilabnumber">893</span> <span class="scilabnumber">407</span> <span class="scilabnumber">477</span> <span class="scilabnumber">552</span> <span class="scilabnumber">805</span> <span class="scilabnumber">881</span> <span class="scilabnumber">850</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//Constraint 3</span>
<span class="scilabnumber">806</span> <span class="scilabnumber">361</span> <span class="scilabnumber">199</span> <span class="scilabnumber">781</span> <span class="scilabnumber">596</span> <span class="scilabnumber">669</span> <span class="scilabnumber">957</span> <span class="scilabnumber">358</span> <span class="scilabnumber">259</span> <span class="scilabnumber">888</span> <span class="scilabnumber">319</span> <span class="scilabnumber">751</span> <span class="scilabnumber">275</span> <span class="scilabnumber">177</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">883</span> <span class="scilabnumber">749</span> <span class="scilabnumber">229</span> <span class="scilabnumber">265</span> <span class="scilabnumber">282</span> <span class="scilabnumber">694</span> <span class="scilabnumber">819</span> <span class="scilabnumber">77</span> <span class="scilabnumber">190</span> <span class="scilabnumber">551</span> <span class="scilabnumber">140</span> <span class="scilabnumber">442</span> <span class="scilabnumber">867</span> <span class="scilabnumber">283</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">137</span> <span class="scilabnumber">359</span> <span class="scilabnumber">445</span> <span class="scilabnumber">58</span> <span class="scilabnumber">440</span> <span class="scilabnumber">192</span> <span class="scilabnumber">485</span> <span class="scilabnumber">744</span> <span class="scilabnumber">844</span> <span class="scilabnumber">969</span> <span class="scilabnumber">50</span> <span class="scilabnumber">833</span> <span class="scilabnumber">57</span> <span class="scilabnumber">877</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">482</span> <span class="scilabnumber">732</span> <span class="scilabnumber">968</span> <span class="scilabnumber">113</span> <span class="scilabnumber">486</span> <span class="scilabnumber">710</span> <span class="scilabnumber">439</span> <span class="scilabnumber">747</span> <span class="scilabnumber">174</span> <span class="scilabnumber">260</span> <span class="scilabnumber">877</span> <span class="scilabnumber">474</span> <span class="scilabnumber">841</span> <span class="scilabnumber">422</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">280</span> <span class="scilabnumber">684</span> <span class="scilabnumber">330</span> <span class="scilabnumber">910</span> <span class="scilabnumber">791</span> <span class="scilabnumber">322</span> <span class="scilabnumber">404</span> <span class="scilabnumber">403</span> <span class="scilabnumber">519</span> <span class="scilabnumber">148</span> <span class="scilabnumber">948</span> <span class="scilabnumber">414</span> <span class="scilabnumber">894</span> <span class="scilabnumber">147</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">73</span> <span class="scilabnumber">297</span> <span class="scilabnumber">97</span> <span class="scilabnumber">651</span> <span class="scilabnumber">380</span> <span class="scilabnumber">67</span> <span class="scilabnumber">582</span> <span class="scilabnumber">973</span> <span class="scilabnumber">143</span> <span class="scilabnumber">732</span> <span class="scilabnumber">624</span> <span class="scilabnumber">518</span> <span class="scilabnumber">847</span> <span class="scilabnumber">113</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">382</span> <span class="scilabnumber">97</span> <span class="scilabnumber">905</span> <span class="scilabnumber">398</span> <span class="scilabnumber">859</span> <span class="scilabnumber">4</span> <span class="scilabnumber">142</span> <span class="scilabnumber">110</span> <span class="scilabnumber">11</span> <span class="scilabnumber">213</span> <span class="scilabnumber">398</span> <span class="scilabnumber">173</span> <span class="scilabnumber">106</span> <span class="scilabnumber">331</span> <span class="scilabnumber">254</span> <span class="scilabnumber">447</span> <span class="scilabdefault">;</span>
<span class="scilabcomment">//Constraint 4</span>
<span class="scilabnumber">404</span> <span class="scilabnumber">197</span> <span class="scilabnumber">817</span> <span class="scilabnumber">1000</span> <span class="scilabnumber">44</span> <span class="scilabnumber">307</span> <span class="scilabnumber">39</span> <span class="scilabnumber">659</span> <span class="scilabnumber">46</span> <span class="scilabnumber">334</span> <span class="scilabnumber">448</span> <span class="scilabnumber">599</span> <span class="scilabnumber">931</span> <span class="scilabnumber">776</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">263</span> <span class="scilabnumber">980</span> <span class="scilabnumber">807</span> <span class="scilabnumber">378</span> <span class="scilabnumber">278</span> <span class="scilabnumber">841</span> <span class="scilabnumber">700</span> <span class="scilabnumber">210</span> <span class="scilabnumber">542</span> <span class="scilabnumber">636</span> <span class="scilabnumber">388</span> <span class="scilabnumber">129</span> <span class="scilabnumber">203</span> <span class="scilabnumber">110</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">817</span> <span class="scilabnumber">502</span> <span class="scilabnumber">657</span> <span class="scilabnumber">804</span> <span class="scilabnumber">662</span> <span class="scilabnumber">989</span> <span class="scilabnumber">585</span> <span class="scilabnumber">645</span> <span class="scilabnumber">113</span> <span class="scilabnumber">436</span> <span class="scilabnumber">610</span> <span class="scilabnumber">948</span> <span class="scilabnumber">919</span> <span class="scilabnumber">115</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">967</span> <span class="scilabnumber">13</span> <span class="scilabnumber">445</span> <span class="scilabnumber">449</span> <span class="scilabnumber">740</span> <span class="scilabnumber">592</span> <span class="scilabnumber">327</span> <span class="scilabnumber">167</span> <span class="scilabnumber">368</span> <span class="scilabnumber">335</span> <span class="scilabnumber">179</span> <span class="scilabnumber">909</span> <span class="scilabnumber">825</span> <span class="scilabnumber">614</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">987</span> <span class="scilabnumber">350</span> <span class="scilabnumber">179</span> <span class="scilabnumber">415</span> <span class="scilabnumber">821</span> <span class="scilabnumber">525</span> <span class="scilabnumber">774</span> <span class="scilabnumber">283</span> <span class="scilabnumber">427</span> <span class="scilabnumber">275</span> <span class="scilabnumber">659</span> <span class="scilabnumber">392</span> <span class="scilabnumber">73</span> <span class="scilabnumber">896</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">68</span> <span class="scilabnumber">982</span> <span class="scilabnumber">697</span> <span class="scilabnumber">421</span> <span class="scilabnumber">246</span> <span class="scilabnumber">672</span> <span class="scilabnumber">649</span> <span class="scilabnumber">731</span> <span class="scilabnumber">191</span> <span class="scilabnumber">514</span> <span class="scilabnumber">983</span> <span class="scilabnumber">886</span> <span class="scilabnumber">95</span> <span class="scilabnumber">846</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">689</span> <span class="scilabnumber">206</span> <span class="scilabnumber">417</span> <span class="scilabnumber">14</span> <span class="scilabnumber">735</span> <span class="scilabnumber">267</span> <span class="scilabnumber">822</span> <span class="scilabnumber">977</span> <span class="scilabnumber">302</span> <span class="scilabnumber">687</span> <span class="scilabnumber">118</span> <span class="scilabnumber">990</span> <span class="scilabnumber">323</span> <span class="scilabnumber">993</span> <span class="scilabnumber">525</span> <span class="scilabnumber">322</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//Constrain 5</span>
<span class="scilabnumber">475</span> <span class="scilabnumber">36</span> <span class="scilabnumber">287</span> <span class="scilabnumber">577</span> <span class="scilabnumber">45</span> <span class="scilabnumber">700</span> <span class="scilabnumber">803</span> <span class="scilabnumber">654</span> <span class="scilabnumber">196</span> <span class="scilabnumber">844</span> <span class="scilabnumber">657</span> <span class="scilabnumber">387</span> <span class="scilabnumber">518</span> <span class="scilabnumber">143</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">515</span> <span class="scilabnumber">335</span> <span class="scilabnumber">942</span> <span class="scilabnumber">701</span> <span class="scilabnumber">332</span> <span class="scilabnumber">803</span> <span class="scilabnumber">265</span> <span class="scilabnumber">922</span> <span class="scilabnumber">908</span> <span class="scilabnumber">139</span> <span class="scilabnumber">995</span> <span class="scilabnumber">845</span> <span class="scilabnumber">487</span> <span class="scilabnumber">100</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">447</span> <span class="scilabnumber">653</span> <span class="scilabnumber">649</span> <span class="scilabnumber">738</span> <span class="scilabnumber">424</span> <span class="scilabnumber">475</span> <span class="scilabnumber">425</span> <span class="scilabnumber">926</span> <span class="scilabnumber">795</span> <span class="scilabnumber">47</span> <span class="scilabnumber">136</span> <span class="scilabnumber">801</span> <span class="scilabnumber">904</span> <span class="scilabnumber">740</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">768</span> <span class="scilabnumber">460</span> <span class="scilabnumber">76</span> <span class="scilabnumber">660</span> <span class="scilabnumber">500</span> <span class="scilabnumber">915</span> <span class="scilabnumber">897</span> <span class="scilabnumber">25</span> <span class="scilabnumber">716</span> <span class="scilabnumber">557</span> <span class="scilabnumber">72</span> <span class="scilabnumber">696</span> <span class="scilabnumber">653</span> <span class="scilabnumber">933</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">420</span> <span class="scilabnumber">582</span> <span class="scilabnumber">810</span> <span class="scilabnumber">861</span> <span class="scilabnumber">758</span> <span class="scilabnumber">647</span> <span class="scilabnumber">237</span> <span class="scilabnumber">631</span> <span class="scilabnumber">271</span> <span class="scilabnumber">91</span> <span class="scilabnumber">75</span> <span class="scilabnumber">756</span> <span class="scilabnumber">409</span> <span class="scilabnumber">440</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">483</span> <span class="scilabnumber">336</span> <span class="scilabnumber">765</span> <span class="scilabnumber">637</span> <span class="scilabnumber">981</span> <span class="scilabnumber">980</span> <span class="scilabnumber">202</span> <span class="scilabnumber">35</span> <span class="scilabnumber">594</span> <span class="scilabnumber">689</span> <span class="scilabnumber">602</span> <span class="scilabnumber">76</span> <span class="scilabnumber">767</span> <span class="scilabnumber">693</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">893</span> <span class="scilabnumber">160</span> <span class="scilabnumber">785</span> <span class="scilabnumber">311</span> <span class="scilabnumber">417</span> <span class="scilabnumber">748</span> <span class="scilabnumber">375</span> <span class="scilabnumber">362</span> <span class="scilabnumber">617</span> <span class="scilabnumber">553</span> <span class="scilabnumber">474</span> <span class="scilabnumber">915</span> <span class="scilabnumber">457</span> <span class="scilabnumber">261</span> <span class="scilabnumber">350</span> <span class="scilabnumber">635</span> <span class="scilabdefault">;</span>
<span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
<span class="scilabid">b</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">11927</span> <span class="scilabnumber">13727</span> <span class="scilabnumber">11551</span> <span class="scilabnumber">13056</span> <span class="scilabnumber">13460</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Lower Bound of variables</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Upper Bound of variables</span>
<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Lower Bound of constrains</span>
<span class="scilabid">intcon</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabskeyword">for</span> <span class="scilabid">i</span> <span class="scilaboperator">=</span> <span class="scilabnumber">1</span><span class="scilabspecial">:</span><span class="scilabid">nbVar</span>
<span class="scilabid">intcon</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabid">intcon</span> <span class="scilabid">i</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabskeyword">end</span>
<span class="scilabid">options</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">"</span><span class="scilabstring">time_limit</span><span class="scilabstring">"</span><span class="scilabdefault">,</span> <span class="scilabnumber">25</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// The expected solution :</span>
<span class="scilabcomment">// Output variables</span>
<span class="scilabid">xopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span><span class="scilabopenclose">]</span>
<span class="scilabcomment">// Optimal value</span>
<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">24381</span> <span class="scilabopenclose">]</span>
<span class="scilabcomment">// Calling Symphony</span>
<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">b</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Authors</h3>
<ul class="itemizedlist"><li class="member">Keyur Joshi, Saikiran, Iswarya, Harpreet Singh</li></ul></div>
<br />
<div class="manualnavbar">
<table width="100%">
<tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr>
<tr>
<td width="30%">
<span class="previous"><a href="symphony.html"><< symphony</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_19f4f1e5726c01d683e8b82be0a7e910.html">Symphony Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="section_508f0b211d17ea6769714cc144e6b731.html">Symphony Native Functions >></a></span>
</td>
</tr></table>
<hr />
</div>
</body>
</html>
|