Mercurial > hg > octave-nkf
changeset 5244:a34c3c5c37cf
[project @ 2005-03-25 03:29:52 by jwe]
author | jwe |
---|---|
date | Fri, 25 Mar 2005 03:30:12 +0000 |
parents | 28c69e8c0e85 |
children | 3589aff4a35d |
files | scripts/ChangeLog scripts/optimization/glpk.m scripts/optimization/glpkmex.m scripts/optimization/glpkparams.m src/ChangeLog src/Makefile.in |
diffstat | 6 files changed, 388 insertions(+), 297 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2005-03-24 John W. Eaton <jwe@octave.org> + + * optimization/glpkmex.m: Texinfoize Doc string. + * optimization/glpk.m: Likewise. + Allow VARTYPE and CTYPE to be row or column vectors of characters + (row vectors are orginary character strings). + * optimization/glpkparam.m: Delete. + 2005-03-24 Quentin Spencer <qspencer@ieee.org> * statistics/base/mean.m: Allow DIMS arg greater than the number
--- a/scripts/optimization/glpk.m +++ b/scripts/optimization/glpk.m @@ -17,130 +17,377 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## GLPK - An Octave Interface for the GNU GLPK library -## -## This routine calls the glpk library to solve an LP/MIP problem. By -## default, glpk solves the following standard LP: -## -## min C'*x -## +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{xopt}, @var{fmin}, @var{status}, @var{extra}] =} glpk (@var{c}, @var{a}, @var{b}, @var{lb}, @var{ub}, @var{ctype}, @var{vartype}, @var{sense}, @var{param}) +## Solve a linear program using the GNU GLPK library. Given three +## arguments, @code{glpk} solves the following standard LP: +## +## @example +## min C'*x +## @end example +## ## subject to -## -## A*x = b -## x >= 0 -## +## +## @example +## @group +## A*x = b +## x >= 0 +## @end group +## @end example +## ## but may also solve problems of the form -## -## [min|max] C'x -## +## +## @example +## [ min | max ] C'*x +## @end example +## ## subject to -## -## Ax ["="|"<="|">="] b -## {x <= UB} -## {x >= LB} -## -## The calling syntax is: -## [XOPT,FOPT,STATUS,EXTRA]=glpk(C,A,B,LB,UB,CTYPE,VARTYPE,SENSE,PARAM) -## -## For a quick reference to the syntax just type glpk at command prompt. -## -## The minimum number of input arguments is 4 (SENSE,C,A,B). In this case we -## assume all the constraints are '<=' and all the variables are continuous. -## -## --- INPUTS --- -## -## C: A column array containing the objective function -## coefficients. -## -## A: A matrix containing the constraints coefficients. -## -## B: A column array containing the right-hand side value for -## each constraint in the constraint matrix. -## -## LB: An array of at least length numcols containing the lower -## bound on each of the variables. -## -## UB: An array of at least length numcols containing the upper -## bound on each of the variables. -## -## CTYPE: A column array containing the sense of each constraint -## in the constraint matrix. -## CTYPE(i) = 'F' Free (unbounded) variable -## CTYPE(i) = 'U' "<=" Variable with upper bound -## CTYPE(i) = 'S' "=" Fixed Variable -## CTYPE(i) = 'L' ">=" Variable with lower bound -## CTYPE(i) = 'D' Double-bounded variable -## (This is case sensitive). -## -## VARTYPE: A column array containing the types of the variables. -## VARTYPE(i) = 'C' continuous variable -## VARTYPE(i) = 'I' Integer variable -## (This is case sensitive). +## +## @example +## @group +## A*x [ "=" | "<=" | ">=" ] b +## x >= LB +## x <= UB +## @end group +## @end example +## +## Input arguments: +## +## @table @var +## @item c +## A column array containing the objective function coefficients. +## +## @item a +## A matrix containing the constraints coefficients. +## +## @item b +## A column array containing the right-hand side value for each constraint +## in the constraint matrix. +## +## @item lb +## An array containing the lower bound on each of the variables. If +## @var{lb} is not supplied, the default lower bound for the variables is +## zero. +## +## @item ub +## An array containing the upper bound on each of the variables. If +## @var{ub} is not supplied, the default upper bound is assumed to be +## infinite. +## +## @item ctype +## An array of characters containing the sense of each constraint in the +## constraint matrix. Each element of the array may be one of the +## following values +## @table @code +## @item "F" +## Free (unbounded) variable (the constraint is ignored). +## @item "U" +## Variable with upper bound (@code{A(i,:)*x <= b(i)}). +## @item "S" +## Fixed Variable (@code{A(i,:)*x = b(i)}). +## @item "L" +## Variable with lower bound (@code{A(i,:)*x >= b(i)}). +## @item "D" +## Double-bounded variable (@code{A(i,:)*x >= -b(i)} @emph{and} +## (@code{A(i,:)*x <= b(i)}). +## @end table +## +## @item vartype +## A column array containing the types of the variables. +## @table @code +## @item "F" +## "C" +## Continuous variable. +## "I" +## Integer variable +## @end table +## +## @item sense +## If @var{sense} is 1, the problem is a minimization. If @var{sense} is +## -1, the problem is a maximization. The default value is 1. +## +## @item param +## A structure containing the following parameters used to define the +## behavior of solver. Missing elements in the structure take on default +## values, so you only need to set the elements that you wish to change +## from the default. +## +## Integer parameters: +## +## @table @code +## @item msglev (@code{LPX_K_MSGLEV}, default: 1) +## Level of messages output by solver routines: +## @table @asis +## @item 0 +## No output. +## @item 1 +## Error messages only. +## @item 2 +## Normal output . +## @item 3 +## Full output (includes informational messages). +## @end table +## +## @item scale (@code{LPX_K_SCALE}, default: 1) +## Scaling option: +## @table @asis +## @item 0 +## No scaling . +## @item 1 +## Equilibration scaling . +## @item 2 +## Geometric mean scaling, then equilibration scaling. +## @end table +## +## @item dual (@code{LPX_K_DUAL}, default: 0) +## Dual simplex option: +## @table @asis +## @item 0 +## Do not use the dual simplex. +## @item 1 +## If initial basic solution is dual feasible, use the dual simplex. +## @end table +## +## @item price (@code{LPX_K_PRICE}, default: 1) +## Pricing option (for both primal and dual simplex): +## @table @asis +## @item 0 +## Textbook pricing. +## @item 1 +## Steepest edge pricing. +## @end table +## +## @item round (@code{LPX_K_ROUND}, default: 0) +## Solution rounding option: +## @table @asis +## @item 0 +## Report all primal and dual values "as is". +## @item 1 +## Replace tiny primal and dual values by exact zero. +## @end table +## +## @item itlim (@code{LPX_K_ITLIM}, default: -1) +## Simplex iterations limit. If this value is positive, it is decreased by +## one each time when one simplex iteration has been performed, and +## reaching zero value signals the solver to stop the search. Negative +## value means no iterations limit. +## +## @item itcnt (@code{LPX_K_OUTFRQ}, default: 200) +## Output frequency, in iterations. This parameter specifies how +## frequently the solver sends information about the solution to the +## standard output. +## +## @item branch (@code{LPX_K_BRANCH}, default: 2) +## Branching heuristic option (for MIP only): +## @table @asis +## @item 0 +## Branch on the first variable. +## @item 1 +## Branch on the last variable. +## @item 2 +## Branch using a heuristic by Driebeck and Tomlin. +## @end table +## +## @item btrack (@code{LPX_K_BTRACK}, default: 2) +## Backtracking heuristic option (for MIP only): +## @table @asis +## @item 0 +## Depth first search. +## @item 1 +## Breadth first search. +## @item 2 +## Backtrack using the best projection heuristic. +## @end table +## +## @item presol (@code{LPX_K_PRESOL}, default: 1) +## If this flag is set, the routine lpx_simplex solves the problem using +## the built-in LP presolver. Otherwise the LP presolver is not used. +## +## @item lpsolver (default: 1) +## Select which solver to use. If the problem is a MIP problem this flag +## will be ignored. +## @table @asis +## @item 1 +## Revised simplex method. +## @item 2 +## Interior point method. +## @end table +## @item save (default: 0) +## If this parameter is nonzero, save a copy of the problem problem in +## CPLEX LP format to the file @file{"outpb.lp"}. There is currently no +## way to change the name of the output file. +## @end table +## +## Real parameters: +## +## @table @code +## @item relax (@code{LPX_K_RELAX}, default: 0.07) +## Relaxation parameter used in the ratio test. If it is zero, the textbook +## ratio test is used. If it is non-zero (should be positive), Harris' +## two-pass ratio test is used. In the latter case on the first pass of the +## ratio test basic variables (in the case of primal simplex) or reduced +## costs of non-basic variables (in the case of dual simplex) are allowed +## to slightly violate their bounds, but not more than +## @code{relax*tolbnd} or @code{relax*toldj (thus, @code{relax} is a +## percentage of @code{tolbnd} or @code{toldj}). +## +## @item tolbnd (@code{LPX_K_TOLBND}, default: 10e-7) +## Relative tolerance used to check ifthe current basic solution is primal +## feasible. It is not recommended that you change this parameter unless you +## have a detailed understanding of its purpose. +## +## @item toldj (@code{LPX_K_TOLDJ}, default: 10e-7) +## Absolute tolerance used to check if the current basic solution is dual +## feasible. It is not recommended that you change this parameter unless you +## have a detailed understanding of its purpose. +## +## @item tolpiv (@code{LPX_K_TOLPIV}, default: 10e-9) +## Relative tolerance used to choose eligible pivotal elements of the +## simplex table. It is not recommended that you change this parameter unless you +## have a detailed understanding of its purpose. +## +## @item objll (@code{LPX_K_OBJLL)}, default: -DBL_MAX +## Lower limit of the objective function. If on the phase II the objective +## function reaches this limit and continues decreasing, the solver stops +## the search. This parameter is used in the dual simplex method only. +## +## @item objul (@code{LPX_K_OBJUL}, default: +DBL_MAX) +## Upper limit of the objective function. If on the phase II the objective +## function reaches this limit and continues increasing, the solver stops +## the search. This parameter is used in the dual simplex only. +## +## @item tmlim (@code{LPX_K_TMLIM}, default: -1.0) +## Searching time limit, in seconds. If this value is positive, it is +## decreased each time when one simplex iteration has been performed by the +## amount of time spent for the iteration, and reaching zero value signals +## the solver to stop the search. Negative value means no time limit. +## +## @item outdly (@code{LPX_K_OUTDLY}, default: 0.0) +## Output delay, in seconds. This parameter specifies how long the solver +## should delay sending information about the solution to the standard +## output. Non-positive value means no delay. +## +## @item tolint (@code{LPX_K_TOLINT}, default: 10e-5) +## Relative tolerance used to check ifthe current basic solution is integer +## feasible. It is not recommended that you change this parameter unless +## you have a detailed understanding of its purpose. +## +## @item tolobj (@code{LPX_K_TOLOBJ}, default: 10e-7) +## Relative tolerance used to check if the value of the objective function +## is not better than in the best known integer feasible solution. It is +## not recommended that you change this parameter unless you have a +## detailed understanding of its purpose. +## @end table +## @end table +## +## Output values: +## +## @table @var +## @item xopt +## The optimizer (the value of the decision variables at the optimum). +## @item fopt +## The optimum value of the objective function. +## @item status +## Status of the optimization. +## +## Simplex Method: +## @table @asis +## @item 180 (@code{LPX_OPT}) +## Solution is optimal. +## @item 181 (@code{LPX_FEAS}) +## Solution is feasible. +## @item 182 (@code{LPX_INFEAS}) +## Solution is infeasible. +## @item 183 (@code{LPX_NOFEAS}) +## Problem has no feasible solution. +## @item 184 (@code{LPX_UNBND}) +## Problem has no unbounded solution. +## @item 185 (@code{LPX_UNDEF}) +## Solution status is undefined. +## @end table +## Interior Point Method: +## @table @asis +## @item 150 (@code{LPX_T_UNDEF}) +## The interior point method is undefined. +## @item 151 (@code{LPX_T_OPT}) +## The interior point method is optimal. +## @end table +## Mixed Integer Method: +## @table @asis +## @item 170 (@code{LPX_I_UNDEF}) +## The status is undefined. +## @item 171 (@code{LPX_I_OPT}) +## The solution is integer optimal. +## @item 172 (@code{LPX_I_FEAS}) +## Solution integer feasible but its optimality has not been proven +## @item 173 (@code{LPX_I_NOFEAS}) +## No integer feasible solution. +## @end table +## @noindent +## If an error occurs, @var{status} will contain one of the following +## codes: ## -## SENSE: indicates whether the problem is a minimization -## or maximization problem. -## SENSE = 1 minimize -## SENSE = -1 maximize. -## -## PARAM: A structure containing some parameters used to define -## the behavior of solver. For more details type -## HELP GLPKPARAMS. -## -## --- OUTPUTS --- -## -## XOPT: The optimizer. -## -## FOPT: The optimum. -## -## STATUS: Status of the optimization. -## -## - Simplex Method - -## Value Code -## 180 LPX_OPT solution is optimal -## 181 LPX_FEAS solution is feasible -## 182 LPX_INFEAS solution is infeasible -## 183 LPX_NOFEAS problem has no feasible solution -## 184 LPX_UNBND problem has no unbounded solution -## 185 LPX_UNDEF solution status is undefined -## -## - Interior Point Method - -## Value Code -## 150 LPX_T_UNDEF the interior point method is undefined -## 151 LPX_T_OPT the interior point method is optimal -## * Note that additional status codes may appear in -## the future versions of this routine * -## -## - Mixed Integer Method - -## Value Code -## 170 LPX_I_UNDEF the status is undefined -## 171 LPX_I_OPT the solution is integer optimal -## 172 LPX_I_FEAS solution integer feasible but -## its optimality has not been proven -## 173 LPX_I_NOFEAS no integer feasible solution -## -## EXTRA: A data structure containing the following fields: -## LAMBDA Dual variables -## REDCOSTS Reduced Costs -## TIME Time (in seconds) used for solving LP/MIP problem in seconds. -## MEM Memory (in bytes) used for solving LP/MIP problem. -## -## -## In case of error the glpk returns one of the -## following codes (these codes are in STATUS). For more informations on -## the causes of these codes refer to the GLPK reference manual. -## -## Value Code -## 204 LPX_E_FAULT unable to start the search -## 205 LPX_E_OBJLL objective function lower limit reached -## 206 LPX_E_OBJUL objective function upper limit reached -## 207 LPX_E_ITLIM iterations limit exhausted -## 208 LPX_E_TMLIM time limit exhausted -## 209 LPX_E_NOFEAS no feasible solution -## 210 LPX_E_INSTAB numerical instability -## 211 LPX_E_SING problems with basis matrix -## 212 LPX_E_NOCONV no convergence (interior) -## 213 LPX_E_NOPFS no primal feas. sol. (LP presolver) -## 214 LPX_E_NODFS no dual feas. sol. (LP presolver) +## @table @asis +## @item 204 (@code{LPX_E_FAULT}) +## Unable to start the search. +## @item 205 (@code{LPX_E_OBJLL}) +## Objective function lower limit reached. +## @item 206 (@code{LPX_E_OBJUL}) +## Objective function upper limit reached. +## @item 207 (@code{LPX_E_ITLIM}) +## Iterations limit exhausted. +## @item 208 (@code{LPX_E_TMLIM}) +## Time limit exhausted. +## @item 209 (@code{LPX_E_NOFEAS}) +## No feasible solution. +## @item 210 (@code{LPX_E_INSTAB}) +## Numerical instability. +## @item 211 (@code{LPX_E_SING}) +## Problems with basis matrix. +## @item 212 (@code{LPX_E_NOCONV}) +## No convergence (interior). +## @item 213 (@code{LPX_E_NOPFS}) +## No primal feasible solution (LP presolver). +## @item 214 (@code{LPX_E_NODFS}) +## No dual feasible solution (LP presolver). +## @end table +## @item extra +## A data structure containing the following fields: +## @table @code +## @item lambda +## Dual variables. +## @item redcosts +## Reduced Costs. +## @item time +## Time (in seconds) used for solving LP/MIP problem. +## @item mem +## Memory (in bytes) used for solving LP/MIP problem. +## @end table +## @end table +## +## Example: +## +## @example +## @group +## c = [10, 6, 4]'; +## a = [ 1, 1, 1; +## 10, 4, 5; +## 2, 2, 6]; +## b = [100, 600, 300]'; +## lb = [0, 0, 0]'; +## ub = []; +## ctype = "UUU"; +## vartype = "CCC"; +## s = -1; +## +## param.msglev = 1; +## param.itlim = 100; +## +## [xmin, fmin, status, extra] = ... +## glpk (c, a, b, lb, ub, ctype, vartype, s, param); +## @end group +## @end example +## @end deftypefn ## Author: Nicolo' Giorgetti <giorgetti@dii.unisi.it> ## Adapted-by: jwe @@ -216,7 +463,7 @@ if (isempty (ctype)) ctype = repmat ("S", nc, 1); elseif (! ischar (ctype) || all (size (ctype) > 1) || length (ctype) != nc) - error ("CTYPE must be a char valued %d by 1 column vector", nc); + error ("CTYPE must be a char valued vector of length %d", nc); return; elseif (! all (ctype == "F" | ctype == "U" | ctype == "S" | ctype == "L" | ctype == "D")) @@ -234,7 +481,7 @@ vartype = repmat ("C", nx, 1); elseif (! ischar (vartype) || all (size (vartype) > 1) || length (vartype) != nx) - error ("VARTYPE must be a char valued %d by 1 column vector", nx); + error ("VARTYPE must be a char valued vector of length %d", nx); return; elseif (! all (vartype == "C" | vartype == "I")) error ("VARTYPE must contain only C or I");
--- a/scripts/optimization/glpkmex.m +++ b/scripts/optimization/glpkmex.m @@ -17,10 +17,12 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## GLPKMEX - An Octave Interface for the GNU GLPK library -## -## This function is provided for compatibility with the old Matlab -## interface to GLPK. +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{xopt}, @var{fmin}, @var{status}, @var{extra}] =} glpk (@var{sense}, @var{c}, @var{a}, @var{b}, @var{ctype}, @var{lb}, @var{ub}, @var{vartype}, @var{param}, @var{lpsolver}, @var{save_pb}) +## This function is provided for compatibility with the old @sc{Matlab} +## interface to the GNU GLPK library. For Octave code, you should use +## the @code{glpk} function instead. +## @end deftypefn. function [xopt, fopt, status, extra] = glpkmex (varargin)
deleted file mode 100644 --- a/scripts/optimization/glpkparams.m +++ /dev/null @@ -1,169 +0,0 @@ -% GLPKMEX Parameters list -% -% This document describes all control parameters currently implemented -% in the GLPK, an Octave interface for the GLPK library. Symbolic names -% of control parameters and corresponding codes of GLPK are given on the -% left. Types, default values, and descriptions are given on the right. -% -% ----------------------- -% 1 Integer parameters -% ----------------------- -% -% msglev type: integer, default: 1 (LPX_K_MSGLEV) -% Level of messages output by solver routines: -% 0 no output -% 1 error messages only -% 2 normal output -% 3 full output (includes informational messages) -% -% scale type: integer, default: 1 (LPX_K_SCALE) -% Scaling option: -% 0 no scaling -% 1 equilibration scaling -% 2 geometric mean scaling, then equilibration scaling -% -% dual type: integer, default: 0 (LPX_K_DUAL) -% Dual simplex option: -% 0 do not use the dual simplex -% 1 if initial basic solution is dual feasible, use the -% dual simplex -% -% price type: integer, default: 1 (LPX_K_PRICE) -% Pricing option (for both primal and dual simplex): -% 0 textbook pricing -% 1 steepest edge pricing -% -% round type: integer, default: 0 (LPX_K_ROUND) -% Solution rounding option: -% 0 report all primal and dual values "as is" -% 1 replace tiny primal and dual values by exact zero -% -% itlim type: integer, default: -1 (LPX_K_ITLIM) -% Simplex iterations limit. If this value is positive, it is -% decreased by one each time when one simplex iteration has -% been performed, and reaching zero value signals the solver -% to stop the search. Negative value means no iterations limit. -% -% itcnt type: integer, initial: 0 (LPX_K_ITCNT) -% Simplex iterations count.This count is increased by one -% each time when one simplex iteration has beenperformed. -% -% outfrq type: integer, default: 200 (LPX_K_OUTFRQ) -% Output frequency, in iterations. This parameter specifies -% how frequently the solver sends information about the solution -% to the standard output. -% -% branch type: integer, default: 2 (LPX_K_BRANCH) -% Branching heuristic option (for MIP only): -% 0 branch on the first variable -% 1 branch on the last variable -% 2 branch using a heuristic by Driebeck and Tomlin -% -% btrack type: integer, default: 2 (LPX_K_BTRACK) -% Backtracking heuristic option (for MIP only): -% 0 depth first search -% 1 breadth first search -% 2 backtrack using the best projection heuristic -% -% presol type: int, default: 1 (LPX_K_PRESOL) -% If this flag is set, the routine lpx_simplex solves the -% problem using the built-in LP presolver. Otherwise the LP -% presolver is not used. -% -% lpsolver type: int, default: 1 -% Select which solver to use: -% 1 revised simplex method -% 2 interior point method -% If the problem is a MIP problem this flag will be ignored. -% -% save type: int, default 0 -% If this parameter is nonzero, save a copy of the problem -% problem in CPLEX LP format to the file "outpb.lp". There -% is currently no way to change the name of the output file. -% -% ----------------------- -% 2 Real parameters -% ----------------------- -% -% relax type: real, default: 0.07 (LPX_K_RELAX) -% Relaxation parameter used in the ratio test. If it is zero, the -% textbook ratio test is used. If it is non-zero (should be -% positive), Harris' two-pass ratio test is used. In the latter -% case on the first pass of the ratio test basic variables (in -% the case of primal simplex) or reduced costs of non-basic -% variables (in the case of dual simplex) are allowed to slightly -% violate their bounds, but not more than (RELAX ˇ TOLBND) or -% (RELAX ˇTOLDJ) (thus, RELAX is a percentage of TOLBND or TOLDJ). -% -% tolbnd type: real, default: 10e-7 (LPX_K_TOLBND) -% Relative tolerance used to check ifthe current basic solution -% is primal feasible (Do not change this parameter without detailed -% understanding its purpose). -% -% toldj type: real, default: 10e-7 (LPX_K_TOLDJ) -% Absolute tolerance used to check if the current basic solution -% is dual feasible (Do not change this parameter without detailed -% understanding its purpose). -% -% tolpiv type: real, default: 10e-9 (LPX_K_TOLPIV) -% Relative tolerance used to choose eligible pivotal elements of -% the simplex table (Do not change this parameter without detailed -% understanding its purpose). -% -% objll type: real, default: -DBL_MAX (LPX_K_OBJLL) -% Lower limit of the objective function.If on the phase II the -% objective function reaches this limit and continues decreasing, -% the solver stops the search.(Used in the dual simplex only) -% -% objul type: real, default: +DBL_MAX (LPX_K_OBJUL) -% Upper limit of the objective function. If on the phase II the -% objective function reaches this limit and continues increasing, -% the solver stops the search.(Used in the dual simplex only.) -% -% tmlim type: real, default: -1.0 (LPX_K_TMLIM) -% Searching time limit, in seconds. If this value is positive, -% it is decreased each time when one simplex iteration has been -% performed by the amount of time spent for the iteration, and -% reaching zero value signals the solver to stop the search. -% Negative value means no time limit. -% -% outdly type: real, default: 0.0 (LPX_K_OUTDLY) -% Output delay, in seconds. This parameter specifies how long -% the solver should delay sending information about the solution -% to the standard output. Non-positive value means no delay. -% -% tolint type: real, default: 10e-5 (LPX_K_TOLINT) -% Relative tolerance used to check ifthe current basic solution is -% integer feasible.(Do not change this parameter without detailed -% understanding its purpose). -% -% tolobj type: real, default: 10e-7 (LPX_K_TOLOBJ) -% Relative tolerance used to check if the value of the objective -% function is not better than in the best known integer feasible -% solution. (Do not change this parameter without detailed -% understanding its purpose) -% -% -% ----------------------- -% 3 Octave Example -% ----------------------- -% -% % Problem data -% s=-1; -% c=[10,6,4]'; -% a=[1,1,1;... -% 10,4,5;... -% 2,2,6]; -% b=[100,600,300]'; -% ctype=['U','U','U']'; -% lb=[0,0,0]'; -% ub=[]; -% vartype=['C','C','C']'; -% -% % Setting parameters -% param.msglev=1; % error messages only -% param.itlim=100; % Simplex iterations limit = 100 -% -% [xmin,fmin,status,lambda,extra]=glpkmex(s,c,a,b,ctype,lb,ub,vartype,param) -% -
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-03-24 John W. Eaton <jwe@octave.org> + * Makefile.in (install-oct): Always create $(octfiledir) and + install PKG_ADD file there. + * octave.cc (octave_main): Fix logic in test for exit after evaluating --eval option code.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -396,14 +396,14 @@ .PHONY: install-bin install-oct: PKG_ADD + $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octfiledir) + $(INSTALL_DATA) PKG_ADD $(DESTDIR)$(octfiledir)/PKG_ADD if [ -n "$(OCT_FILES)" ]; then \ - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octfiledir); \ xfiles="$(OCT_FILES)"; \ for f in $$xfiles; do \ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(octfiledir)/$$f; \ done; \ $(srcdir)/mk-oct-links $(DESTDIR)$(octfiledir) $(DLD_DEF_FILES); \ - $(INSTALL_DATA) PKG_ADD $(DESTDIR)$(octfiledir)/PKG_ADD; \ fi .PHONY: install-oct