Question on solver programs vs regular programs

Discussion around the Swiss Micros DM42 calculator.
Post Reply
kevinvinv
Posts: 7
Joined: Wed Jul 11, 2018 10:40 pm

Question on solver programs vs regular programs

Post by kevinvinv » Tue Jul 17, 2018 5:09 pm

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: 7
Joined: Wed Jul 11, 2018 10:40 pm

Re: Question on solver programs vs regular programs

Post by kevinvinv » Tue Jul 17, 2018 5:10 pm

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: 665
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Question on solver programs vs regular programs

Post by grsbanks » Tue Jul 17, 2018 5:53 pm

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.
Not SwissMicros staff, just an enthusiast.

kevinvinv
Posts: 7
Joined: Wed Jul 11, 2018 10:40 pm

Re: Question on solver programs vs regular programs

Post by kevinvinv » Tue Jul 17, 2018 6:51 pm

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: 162
Joined: Fri Jun 23, 2017 3:10 am

Re: Question on solver programs vs regular programs

Post by mcc » Wed Jul 18, 2018 6:40 am

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 v.:3.9.1 / 3.9.1 as compiled by SwissMicros

Dave Britten
Posts: 34
Joined: Wed Jun 14, 2017 7:27 pm

Re: Question on solver programs vs regular programs

Post by Dave Britten » Mon Jul 23, 2018 12:12 pm

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