class adapt{
        attributes
            real KEL, KCP, KPC;
            real[5] X1, X2, T1, R;
	    real[4] DX1, DX2;

        constraints
            forall I in 2..5:
                DX1[I-1] = (X1[I] - X1[I-1]) / (T1[I] - T1[I-1]);
            forall K in 2..5:
                DX2[K-1] = (X2[K] - X2[K-1]) / (T1[K] - T1[K-1]);
            forall J in 2..5:
                DX1[J-1] = (-(KEL+KCP)*X1[J-1]) + (KPC * X2[J-1]) + R[J-1];
            forall L in 2..5:
                DX2[L-1] = (KCP * X1[L-1]) - (KPC * X2[L-1]);

            output(X1);
	    output(X2);

        predicates
            output([]) :- nl.
            output([H|T]) :- format('~4F',H), print('   '), output(T).

        constructors adapt(X1,X2){
            KEL = 0.50;
            KCP = 0.20;
            KPC = 0.10;
            T1 = [0.00, 1.00, 6.00, 12.00, 13.00];
            R = [1000.00, 0.00, 0.00, 500.00, 0.00];
	    X1[1] = 0.0;
	    X2[1] = 0.0;
        }
}

$
['/projects/tambay/CobToSicstus/translator'], cob2clpr('adapt', 'adapt.clpr'). 
 
['adapt.clpr'], adapt(_,_). 

The differential equation considered is on Page 7 of the ADAPT Manual. 

I have not made any subclasses yet , to keep the program simple and
straight-forward.
I have not used the output equation yet, as i am tryin to print the
values of X1 and X2 at various times first.
