2 @plugin "../plugin.so" (SAbrFunctions).
\r
4 @define ANY -3000000.
\r
6 Object : Teoria (aka Teorias) {
\r
11 + to init named name (string) with-action action (string)
\r
12 executed k = 1 (int) succeeded p = 1 (int):
\r
13 ptr = TeoriaNew(name, action, k, p).
\r
15 + to set-dato-inicial name theName (string) value theValue (float):
\r
16 TeoriaSetDatoInicial(ptr, theName, theValue).
\r
18 + to set-dato-final name theName (string) value theValue (float):
\r
19 TeoriaSetDatoFinal(ptr, theName, theValue).
\r
22 return TeoriaGetNombre(ptr).
\r
25 return TeoriaGetAccion(ptr).
\r
30 - to set-ptr ptr p (pointer):
\r
35 Object : SistemaAutonomo {
\r
40 + to init with-max-pasos max-pasos = 4 (int) with-max-teorias max-teorias = 15 (int):
\r
41 ptr = SistemaAutonomoNew(max-pasos, max-teorias).
\r
43 + to add teoria theTeoria (object):
\r
44 SistemaAutonomoAddTeoria(ptr, (theTeoria get-ptr)).
\r
46 + to set-entorno value theValue (float) with-name theName (string):
\r
47 SistemaAutonomoSetValue(ptr, theName, theValue).
\r
49 + to set-dato-final value theValue (float) with-name theName (string):
\r
50 SistemaAutonomoSetDatoFinal(ptr, theName, theValue).
\r
52 + to update-entorno with entorno (hash):
\r
54 foreach nombre in keys(entorno): {
\r
55 self set-entorno value entorno{nombre} with-name nombre.
\r
58 + to update-datos-finales with datos-finales (hash):
\r
60 foreach nombre in keys(datos-finales): {
\r
61 self set-dato-final value datos-finales{nombre} with-name nombre.
\r
65 SistemaAutonomoPlan(ptr).
\r
67 + to has-next-theory:
\r
68 return SistemaAutonomoHasNextTheory(ptr).
\r
70 + to get-next-theory:
\r
73 t set-ptr ptr SistemaAutonomoGetNextTheory(ptr).
\r
76 + to validate theory theTheory (object):
\r
77 return SistemaAutonomoValidateTheory(ptr, (theTheory get-ptr)).
\r
80 SistemaAutonomoDelete(ptr).
\r