2005-08-02 Miroslav Fikar
* chap3.tex (section{Gradient Derivation}): missing term in (3.7)
and (3.11) : \frac{\partial G_i}{\partial \ve{p}^T}. Thanks to
.
2005-01-25 Miroslav Fikar
* fixed typo in documentation, Chapter 4.4, Example 5, equation
(4.3). Thanks to
2004-08-22 Miroslav Fikar
* slsqp.f (nlpslv): bug: g was dimensioned as g(ncst). Should be
g(mmax). Problems with some compilers.
2004-08-21 Miroslav Fikar VERSION 1.2
* adifyes.f: added support for automatic differentiation with
ADIFOR - introduced parameter INFO(16).
* nlpql.f (NLPSLV): bug: forgotten unshifted indices from
2003-02-07.
2004-08-16 Miroslav Fikar VERSION 1.1.2
* lambda.f (FLAM): bug: wrong indices in some function calls. Bug
introduced 2003-02-07.
2003-02-17 Miroslav Fikar
* adifno.f (processw, costwi, costwni): new file with added
internal subroutines that call their corresponding non-w
routines. No visible user change has been done. This will serve in
implementation if automatic differentiation with ADIFOR will be
used.
2003-02-07 Miroslav Fikar
* initdo.f, lambda.f, model.f, nlp.f, work.txt: shifted all
indices of iw(i>=30) to iw(i>=130) in order to have more place at
the beginning of iw for important constants. Cleaned files -
removed unused variables.
* work.txt: minor correction in documentation
2002-12-10 Miroslav Fikar VERSION 1.1.1
* nlp.f (NLPW): changed calculation of geom if ncyc=1 (division by
zero avoided). Thanks to Debasis Sarkar
.
2002-10-23 Miroslav Fikar VERSION 1.1
* DYNO: almost all routines changed with backward
incompatibility. Added two arguments to dyno, cost, process (and
many others: nmcont, nmpar that contain actual dimensions of CONT
and PAR. This prevents some compilers to issue errors with
dimensions like P(npar) when npar is zero. All dimensions now are
defined in terms of nmcont, nmpar that should be equal at least to
one or to the actual number of the corresponding parameters.
Documentation updated and added one example with parameter
estimation problem. Automatic differentiation with ADIFOR has not
been tested as I do not have decent Windows Fortran compiler.
2002-10-21 Miroslav Fikar
* dyno.f (dyno.txt): Documentation corrected, added work.txt to
user files.
2002-10-14 Miroslav Fikar VERSION 1.0.1
* nlpql.f (nlpslv): bug: iout used before initialised. Thanks to
* lambda.f (TRALAMW): fixed bug in gradient with respect to
parameters. Thanks to
2002-02-18 Miroslav Fikar VERSION 1.0
* initdo.f (DYNO): changed dimensions of infou(*) -> infou(15)
2002-01-30 Miroslav Fikar
* slsqp.f (nlpslv): bug: iout used before initialised. SLSQP made
as the default NLP solver. info(15): 0-SLSQP, 1-NLPQL.
2002-01-28 Miroslav Fikar
* slsqp.f (SLSQP): added a new NLP solver SLSQP. The choice is
made via info(15): 0-NLPQL, 1-SLSQP. Some changes in initdo.f,
nlp.f.
2002-01-17 Miroslav Fikar
* model.f (TRASTAW): minor bug when dealing with initial condition
removed. Wrong dimension from trastaw and tralamw of the result
array passed to process. Should not influence results.
* initdo.f (DYNO): added input argument RWORK(5) = t0: Initial
time of the simulation.
(DYNO): added input argument info(14) that contains integer
parameters previously specified in iwork(1:14). Backward
incompatibility.
2002-01-16 Miroslav Fikar
* initdo.f (DYNO): input argument IFAIL can also be -3. In that
case no optimisation is performed, only minimum memory needed is
returned in NRW, NIW, NLW.
2002-01-14 Miroslav Fikar
* ddassldo.f: activated parameter iw(14)=1. In that case DDASSL
solver is used. To use it, the file vodedo.f is to be replaced by
ddassldo.f in the makefile and add iw(14)=1 in the main
program. However, the first tests indicate that DDASSL is about
30% slower than VODE.
* vodedo.f (STEPSTAW,STEPLAMW): both subroutines have been moved
to vodedo.f from model.f, lambda.f so that IVP specific code is
together.
2001-12-12 Miroslav Fikar
* lambda.f (actstates): enlarged memory for intermediate states
with +10 elements for iw(5) and added stop statement in
actstates. It happened that the program got there. Needs to be
examined more carefully.
2001-12-11 Miroslav Fikar
* lambda.f (TRALAMW): Two minor bugs corriged: dX0dP was not
called with initial state as argument; if the last constraint was
not state dependent, the corresponding gradient was incorrect
(start time of integration of adjoints incorrect, introduced
2001-12-06).
* process.f (process): state0 nad dstate0 have been moved into
PROCESS with flags -1, -2, respectively. Modified accordingly
trastaw, tralamw.
2001-12-09 Miroslav Fikar
* process.f (dstate0): added support for unknown initial
states. These are no longer defined in the calling program but in
the routine STATE0. DSTATE0 contains partial derivatives of the
initial states with respect to the parameters. Initial states are
no longer loaded from INITDO3 but at the beginning of each
simulation from TRASTA. The partial derivatives are loaded from
TRALAM and an additional term for dJ/dP has been added:
lambda(0)*dx0/dP.
* lambda.f (TRALAM): support for the old TRALAMW has been removed.
* initdo.f (DYNO): Introduced parameter 14: choice of the IVP
solver. Currently only VODE is supported (iw(14)=0) but it is
expected that also DASSL will be possible to use.
* cost.f (costi): The subroutine represents only the integral part
of the cost function. Flag number have been changed as well as the
calling syntax. Files lambda.f, model.f changed accordingly.
2001-12-07 Miroslav Fikar
* lambda.f (TRALAMW): heavily overwritten due to changes in
COSTNI. Name exchanged between TRALAMW and TRALAMW1 so this is the
new one. Although it needs some more memory, it is more clear.
* cost.f (costni): Subroutine COST has been divided into two and
the new COSTNI - cost NonIntegral returns matrices with 3
dimensions and has only 5 flags (G, Gx, Gu, Gp, Gt). Syntax of
integral function that is in COST remained the same as that is how
it is needed in the program.
* lambda.f (CHKJAC): Support for Jac verification stopped. It did
not work reliably and has not been updated since long
time. Routine CHKJAC and routines called from it removed.
2001-12-06 Miroslav Fikar
* all: introduced parameter iwork(13). If 0 (default), works as
before, if 1, saves state trajectories only in backward pass when
integrating adjoint variables. And only for the actual time
stage. This results in huge memory savings, however, requires one
more call to state trajectory integration.
* Lambda.f contains a new subroutine tralamw1 that is codes for
this. It implements both new and old behaviour so that the
original tralamw is not anymore called.
* lambda.f (actstates) cannot anymore have lastpos = 0. (It did
not happen, but it has been reinforced).
* Model.f (TRAWRI) does almost nothing, because printing is now
directly in TRASTA. TRASTA has been rewritten and all trajectory
savings are moved to STEPSTA.
2001-10-23 Miroslav Fikar
* lambda.f (TRALAMW): bug removed. When npar <> 0, gradients w.r.t
u,p were incorrect. (do i=1,npar; djdu(flag+1,i)=...).
2001-10-22 Miroslav Fikar
* initdo.f (DYNO): default values for iwork, rwork are here. In
the main program it suffices to put 4 rwork and 12 iwork to zero
and to initialise only the non-zero entries. Backward
compatibility.
2001-10-17 Miroslav Fikar
* model.f (TRASTAW): added NTI at t=0. Initialisation bug
2001-10-05 Miroslav Fikar
* model.f, lambda.f: a new moving pointer iw(63) = NTI has been
introduced. The purpose is to know when integral cost/constraints
are evaluated, in which time interval we currently are. A possible
use is for integral fuctions defined only on some time segments
and zero elsewhere. NTI already worked for non-integral terms.
2001-10-01 Miroslav Fikar
* nlp.f (vartox, xtovar, nlpw): periodicity works better now.
Still some testing is necessary, as the important routines have
been changed. In addition, Nu mode (iwork(9)=3) is not more
needed, the same can be obtained with iwork(9)=0, iwork(10)=Nu.
2001-09-28 Miroslav Fikar
* cost.f (cost): the non-integral function G has now syntax
G(ti, xi, ui, p) - added ui(ncont, ntime) to be able to penalise
any control variable within the optimised trajectory. This is to
provide support for normalised times as well as discrete valued
integral functions = sums. All other (model.f, lambda.f) files
have been correspondingly changed.
* nlp.f (vartox): bug when multidimensional U removed
* nlp.f: Periodicity does not work anymore - It has to be
corrected.
2001-09-20 Miroslav Fikar
* nlp.f (NLPW): added user option to optimise only the first Nu
control segments, then leave constant control from the Nu-th
segment. Realised via indopt integer vector in NLPW. From the user
point of view, this is enabled by giving the MPC strategy iwork(9)
= 3 and iwork(10) = Nu.
2001-09-17 Miroslav Fikar
* all: implementation of interior point constraints. Affected are
(lambda.f, model.f, initdo.f, cost.f) and the files are
incompatible with the previous. Main change concerns format of the
cost.f, where additional input parameters are matrix of state
trajectories at the switching times XI and integer NTI that shows
at which time dG should be evaluated. Verification of Jacobians
does not work for interior constraints yet.
2001-09-16 Miroslav Fikar
* lambda.f (TRALAMW): Hamiltonian calculated differently : in
forward pass fti(-), fti(+) are saved and contain RHS of
(f,F). The change is for introduction of discontinuities in
lambdas causes by implementation of interior point
constraints. Affected are also (initdo.f, model.f, work.txt).
2001-09-15 Miroslav Fikar
* initdo.f, process.f: initial values of the states have been
moved to the main routine and thus removed from process. Call to
DYNO appropriately changed. This will be more suitable when
implementing MPC strategy. Incompatible with older versions.
2001-08-27 Miroslav Fikar
* initdo.f (DYNO): added lines to copy the optimal values of t,u,p
back to original vectors
2001-08-15 FIKAR Miroslav
* initdo.f (INITDO2): NLP: dg(mmax, nopt) was dimensioned as
dg(ncrit,nopt). If no constraints were present, dg overwrote next
vector - lambda in nlp and caused problems.
2001-08-14 FIKAR Miroslav
* nlp.f (vartox): fixed bug. For multiinput systems vartox did not
calculate correctly number of optimised variables.
2001-08-13 FIKAR Miroslav
* model.f (djidtk): serious bug in calculating the gradients with
respect to time removed.
2001-08-10 FIKAR Miroslav
* model.f (STEPSTAW): maximum integration step is limited by dt -
solver cannot take steps arbitrarily large - precision is improved
if path constraints are active.
* lambda.f (FINDIF): before, ndtime was set to 1 in order to speed
calculations with findif. This however resulted in incorrect path
constraints evaluations. Removed these statements.
2001-08-08 FIKAR Miroslav
* nlp.f (NLPW): bug in vartox, xtovar. Experimental support for
mesh-refinig technique as well as for the multirate
algotithm. Also experimental - periodicity.
2001-08-07 FIKAR Miroslav
* nlp.f (NLPW): minor bug - mnn2 is to be calculated from nreal
and not n only. Affects only changes introduced 2001-08-06.
2001-08-06 FIKAR Miroslav
* initdo.f (DYNO): added input option for ifail: 0 (normal
execution with nlp), -1(simulation of the initial trajectory),
-2(gradient check)
* nlp.f (NLPW): rewritten - it is now possible to specify which
variables are to be optimised (better than before). Subroutines
vartox and xtovar transform the original gradients to nlp
specification using INDOPT integer vector so it will be later
possible to implement the mesh-grid refining technique.
2001-08-04 FIKAR Miroslav
* all: code rewritten and it is incompatible with the older
versions. The changes include restructuralisation of initdo.f
where also nlp is called, different calling structure from the
main program which also takes care of initial, min/max values of
the optimised parameters, and many more. Method.f is not longer
needed. Process.f::process has no initialisations, only
derivatives and printouts (flag:-2,4,5,6 are not
needed). Moreover, a new argument - iout - has been added. The
same applies to cost.f::cost where no initialisations are
done. The calling syntax has been changed and for each call only
one partial derivative is read - new flag XUPT handles this. All
other files have been correspondingly changed.
2001-08-03 FIKAR Miroslav
* initdo.f (DYNO): restructuralised into 3 subroutines: problem
dimensions, worskpace allocation, initialisations.
* lambda.f: added support for path constraints and for constraints
that have not to be integrated. Path constraints are integrated
with the sufficiently small steps where the constraint is
non-zero. The vector ista(ncst+1) has been added and contains
information whether the constraint/cost contains states (0-1),
constains path formulations (0-2), or whether it should be
integrated very carefully along the whole trajectory (0-4).
* model.f, lambda.f: added support for approximation of states
using derivative information - lambda.f::actstates handles now
polynomials of the second and the third degrees. The choice of
approximation is also reflected in method.f and memery for
state derivatives trajectory is requested in initdo.f (only if
deg(poly) > 1 ).
2001-08-02 FIKAR Miroslav
* lambda.f (TRALAMW): bug initialising dg/d[x,u,p,t], x and u were
not set at t=tf, but at t = 0 (were not set at all)
(STEPLAMW, STEPLAM, TRALAM): path inequality constaints posed as
integral equality constraints have to be integrated very
carefully. Now all constraints are integrated with the same grid
as the state - it takes more time. This should be rewritten, only
difficult constraints should be handled that way.
2001-08-01 FIKAR Miroslav
* lambda.f (CHKGRD): bug in testing the corectness of dJdp
forgotten djdu term.
* nlp.f (NLP, NLPW, transf2): added option (method.f) to optimise
only times. Mainly gradient reshaping, plus length of pointers
shortened. Optimise: iw(21) = 0 (ti,ui,p), = 1 (ui,p), = 2 (ti)
2001-07-31 FIKAR Miroslav
* process.f, initdo.f (process): when loading initial, upper and
lower bound on control trajectory, the dimensions have been
reversed, eg. from DSYS(NTIME,NCONT) to DSYS(NCONT,NTIME). This is
more suitable when parameters are to be loaded from file (copied
from NLP results).
* all: added option (method.f) not to optimise times. Involved is
mainly nlp.f where pointers are to be redefined and gradients
reshaped correctly.
* model.f (GETDFFDX): works now not only with one (first)
integral constraint. Changed from:
call DCOPY (nsta, dsysx, 1, dffdx, ncst+1)
to:
call DCOPY (nsta, dsysx, 1, dffdx(1+(flag-10),1), ncst+1)
* all : added zeroing of partial derivatives before asking used
data - The user can now supply only nonzero terms. This is valid
for d[f,F]/d[x,u,p], dG/d[x,u,p,t]. Normal i.e. f, F, G remain to
be filled exactly.