fig20_9.pl
来自「超多的prolog源代码 具体内容见压缩包里面的programs.txt」· PL 代码 · 共 27 行
PL
27 行
% Figure 20.9 A qualitative model of bath tub.
% A bath tub model
landmarks( amount, [ zero, full, inf]).
landmarks( level, [ zero, top, inf]).
landmarks( flow, [ minf, zero, inflow, inf]).
correspond( amount:zero, level:zero).
correspond( amount:full, level:top).
legalstate( [ Level, Amount, Outflow, Netflow]) :-
mplus( Amount, Level),
mplus( Level, Outflow),
Inflow = flow:inflow/std, % Constant in-flow
sum( Outflow, Netflow, Inflow), % Netflow = Inflow - Outflow
deriv( Amount, Netflow),
not overflowing( Level). % Water not over the top
overflowing( level:top..inf/_). % Over the top
initial( [ level: zero/inc,
amount: zero/inc,
flow: zero/inc,
flow: inflow/dec ] ).
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?