~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to demos/optimization/lmitool/linprog.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 function [x,cout]=linprog(A,b,C,d,c,x0)
 
2
// Copyright INRIA
 
3
// Generated by lmitool on Thu Feb 02 16:32:14 MET 1995
 
4
 Mbound = 1e3;
 
5
 abstol = 1e-10;
 
6
 nu = 10;
 
7
 maxiters = 100;
 
8
 reltol = 1.e-10;
 
9
 options=[Mbound,abstol,nu,maxiters,reltol];
 
10
 /////////////////DO NOT REMOVE THIS LINE
 
11
 x_init=x0;
 
12
 [nx,nx]=size(A);
 
13
 /////////////////DO NOT REMOVE THIS LINE
 
14
 XLIST0=list(x_init)
 
15
 [XLIST,cout]=lmisolver(XLIST0,linprog_eval,options)
 
16
 [x]=XLIST(:)
 
17
 /////////////////EVALUATION FUNCTION////////////////////////////
 
18
 function [LME,LMI,OBJ]=linprog_eval(XLIST)
 
19
 [x]=XLIST(:)
 
20
 /////////////////DO NOT REMOVE THIS LINE
 
21
 LME=C*x+d
 
22
 LMI=vec2list(A*x+b,[ones(nx,1),ones(nx,1)])
 
23
 OBJ=c'*x