Dear Dan,
Dear Martin,
I am extremely thankful to you for your so prompt messages and
instructions to load the additional files of the solver module. I tried
to do this (tests below in three different attempts), but I failed.
Perhaps, this is due to the set.lisp file (not properly loaded), perhaps
to some omission or some error. The "o" files are not present in the
Maxima 5.9.0 distribution, but, fortunately, the related "lisp" files are.
Could you, please, be so kind to help me further (perhaps through
a correction or addition in one of the three possible attempts below)?
Is there something more in the solver directory for me to load, please?
I have also understood that the files linsolve.mac, slvrtbox.mac and
slvrmsgs.mac files are autoloaded by the solver.mac file itself, but
I have not understood why I should write the command Solver
with a capital S, whereas Martin can use just the command solver.
I am grateful to you for your help. Many sincere thanks again!
Best regards,
Nikos
p.s. In fact, it seems that solver is a very powerful solving package,
but I have to study the extensive PDF manual (in German) too and
to understand which is the primary method of solution used in it.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(C1) load(comm);
(D1) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/src/comm.lisp
(C2) load(mutils);
(D2) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/src/mutils.lisp
(C3) load(set);
Load failed for C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/misc/set.lisp
-- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
(C4) load(misc);
(D4) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/misc.mac
(C5) load(solver);
(D5) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/solver.mac
(C10) Solver([x+y+x^2=a,x-y=b],[x,y],[a,b]);
MACSYMA was unable to evaluate the predicate:
ERREXP1
#0: SetupSolver(equations=[y+x^2+x = a,x-y = b],solverparams=[[x,y],[a,b]])
#1: SOLVER(equations=[y+x^2+x = a,x-y =
b],solverparams=[[x,y],[a,b]])(solver.mac line 451)
-- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(C1) EquationP(e):=if part(e,0) = "=" then true else false;
(D1) EquationP(e) := IF PART(e, 0) = "=" THEN TRUE ELSE FALSE
(C2) load(comm);
(D2) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/src/comm.lisp
(C3) load(mutils);
(D3) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/src/mutils.lisp
(C4) load(set);
Load failed for C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/misc/set.lisp
-- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
(C5) load(misc);
(D5) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/misc.mac
(C6) load(solver);
(D6) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/solver.mac
(C7) load(linsolve);
(D7) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/linsolve.mac
(C8) load(slvrtbox);
(D8) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/slvrtbox.mac
(C9) load(slvrmsgs);
(D9) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/slvrmsgs.mac
(C11) Solver([x+y+x^2 = a, x-y = b], [x,y], [a,b]);
Error: F- [or a callee] requires more than one argument.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by F-.
Broken at F-. Type :H for Help.
MAXIMA>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(C1) load(misc);
(D1) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/misc.mac
(C2) load(linsolve);
(D2) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/linsolve.mac
(C3) load(slvrtbox);
(D3) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/slvrtbox.mac
(C4) load(slvrmsgs);
(D4) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/slvrmsgs.mac
(C5) load(solver);
(D5) C:/MAXIMA/MAXIMA/share/maxima/5.9.0/share/algebra/solver.mac
(C6) Solver([x+y+x^2 = a, x-y = b], [x,y], [a,b]);
MACSYMA was unable to evaluate the predicate:
ERREXP1
#0: SetupSolver(equations=[y+x^2+x = a,x-y = b],solverparams=[[x,y],[a,b]])
#1: SOLVER(equations=[y+x^2+x = a,x-y =
b],solverparams=[[x,y],[a,b]])(solver.mac line 451)
-- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%''
----- Original Message -----
> --- "Martin RUBEY" <rubey@labri.fr> wrote:
> With some Help of Dan I got solver to work as follows:
> (C1) EquationP(e):=if part(e,0)="=" then true else false$
> (C1)
> (C2) load("/usr/labri/rubey/maxima/src/binary-gcl/comm.o")$
>
> (C3) load("/usr/labri/rubey/maxima/src/binary-gcl/mutils.o")$
>
> (C4) load("/usr/labri/rubey/maxima/src/binary-gcl/set.o")$
>
> (C5) load("algebra/solver/misc")$
>
> (C6) load("algebra/solver/solver")$
>
> (C7) solver([x+y+x^2=a,x-y=b],[x,y],[a,b]);
>
> (D7) [[x = - SQRT(b + a + 1) - 1, y = - SQRT(b + a + 1) - b - 1],
>
> [x = SQRT(b + a + 1) - 1, y = SQRT(b + a + 1) - b
> - 1]]
>
>
> Maybe you don't need to load the .o files manually anymore with 5.9.0.
> When using solver, be aware of
>
>
http://sourceforge.net/tracker/index.php?func=detail&aid=681613&group_id=493
3&atid=104933
>
> in short: don't use i,j,k as variable names (not sure about j), this is
> the 'dynamic scope problem' discussed at length on the list.
>
> Martin