Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:model_block-spring [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Model block-spring ======
 +{{tag>​model}}
 +===== Description =====
 +A qualitative model of the block-spring system.
 +
 +**Source**: ​ PROLOG programming for artificial intelligence,​ 3rd Edition, Harlow, 2001, ISBN 0-201-40375-7.
 +===== Download =====
 +Program source code: {{model_block-spring.pl}}
 +===== Listing =====
 +<code prolog>
 +% Figure 20.14  A qualitative model of the block-spring system.
 +
 +
 +% Model of block on spring
 +
 +landmarks( x, [ minf, zero, inf]). ​       % Position of block
 +landmarks( v, [ minf, zero, v0, inf]). ​   % Velocity of block
 +landmarks( a, [ minf, zero, inf]). ​       % Acceleration of block
 +
 +correspond( x:zero, a:zero).
 +
 +legalstate( [ X, V, A])  :-
 +  deriv( X, V),
 +  deriv( V, A),
 +  MinusA = a:_,
 +  sum( A, MinusA, a:​zero/​std), ​   % MinusA = -A
 +  mplus( X, MinusA). ​             % Spring pulling mass back
 +
 +initial( [ x:zero/inc, v:v0/std, a:​zero/​dec]).
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/model_block-spring.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0