Question on solver programs vs regular programs

Discussion around the Swiss Micros DM42 calculator.
Post Reply
kevinvinv
Posts: 20
Joined: Thu Jul 12, 2018 12:40 am

Question on solver programs vs regular programs

Post 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! :)
kevinvinv
Posts: 20
Joined: Thu Jul 12, 2018 12:40 am

Re: Question on solver programs vs regular programs

Post 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...
grsbanks
Posts: 1073
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: Question on solver programs vs regular programs

Post 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.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
kevinvinv
Posts: 20
Joined: Thu Jul 12, 2018 12:40 am

Re: Question on solver programs vs regular programs

Post 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...
mcc
Posts: 236
Joined: Fri Jun 23, 2017 5:10 am

Re: Question on solver programs vs regular programs

Post 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
DM 42 - SN: 00373, Firmware release v.:3.16. / DMCP 3.20. as compiled by SwissMicros
Dave Britten
Posts: 127
Joined: Wed Jun 14, 2017 9:27 pm

Re: Question on solver programs vs regular programs

Post 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".
Post Reply