Page 1 of 1

Question on solver programs vs regular programs

Posted: Tue Jul 17, 2018 7:09 pm
by kevinvinv
Hello,

All these years I've been a little befuddled about how to specify whether a program is a solver program or a regular (xeq) program.

Does anyone have a good way to keep things straight in this regard?

Thanks for your thoughts! :)

Re: Question on solver programs vs regular programs

Posted: Tue Jul 17, 2018 7:10 pm
by kevinvinv
I guess to clarify... I know how to write the two different programs... just not how to keep them best organized and denoted in the menus... so far I do something like s_myPgm to denote that it should be run with the solver... but this eats up precious space...

Re: Question on solver programs vs regular programs

Posted: Tue Jul 17, 2018 7:53 pm
by grsbanks
There is no real way to differentiate between Solver (or Integrator, for that matter) programs and "normal" programs.

In effect, all the Solver does is go through all the programs isolating those that begin with a bunch of MVAR instructions to list those alone in the initial Solver menu.

Re: Question on solver programs vs regular programs

Posted: Tue Jul 17, 2018 8:51 pm
by kevinvinv
Hmmm,,,, I'll have to try something then when I get a sec.

Are you saying if the first line is not MVAR then it wont show up in the Solver or Integrator menu? That would be a decent feature that I did not know about... I'll play around...

Re: Question on solver programs vs regular programs

Posted: Wed Jul 18, 2018 8:40 am
by mcc
Hi kevinvinv,

there is one feature which excludes a program as being useable for the solver (beside obvious reasons: An emultator
for "Mario Bros. something" implemented in FOCAL is not THAT adaquate for the solver... ;) :) :):

A program without a MVAR section in the beginning would not be "seen" by the solver, so you cannot use it.
But a regular program, with a fully implemented MVAR...VARM... sequence though will be "seen" by the solver
but it will halt at each iteration circle.

To fix that, you can write two programs:
One program "a" which is useable with the solver (that is includes only the MVAR commands) and another one "b", which
does a VARM "a" and therefore calls "a". The solver would only see "a" as that program contains the MVAR calls.

This way you can a "Master Control Program" (=> TRON ;) which only contains the VARM calls and a couple of "math drivers" ;) which does
the real work and are all useable by the solver program.

Cheers!
Meino

Re: Question on solver programs vs regular programs

Posted: Mon Jul 23, 2018 2:12 pm
by Dave Britten
That's a good idea, Meino. I've got a few I should probably do that to.

As far as naming convention, I'd suggest looking through the various special characters and picking one to use as a prefix on the label name to indicate "this is a solver program".