isControllable 和 isObservable 枫叶函数:有没有办法让它们显示步骤?

发布于 2024-10-05 15:27:26 字数 77 浏览 3 评论 0原文

所以我们可以使用 isObservable 来处理某些系统,但我想知道我们是否可以让 tham 显示 staps 或做类似的事情。这可能吗?

So we can use isObservable to work with some systems but I wonder If we can make tham show staps or do something like that. Is that possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑忘罢 2024-10-12 15:27:26

我假设您实际上指的是 ObservableControllable 命令,它们是 DynamicSystems 包的一部分。

一些 Maple 例程具有所谓的 userinfo 消息,这些消息可以选择显示并且可以显示部分步骤。这些通常可以通过像 infolevel[DynamicSystems]:=6 这样的调用来启用,其中 6 是最高级别的详细信息。值越低,可能显示的细节越少。不幸的是,这些特定的 DynamicSystems 例程中似乎没有任何用户信息消息。所以这对你的情况没有直接帮助。

有时一个包会调用另一个包。当调用 Controllable 时,会在某个时刻调用例程 LinearAlgebra:-Rank。我猜您不希望在 Rank 中看到用户信息消息,这可以通过对 1 到 1 之间的某些 n 发出 infolevel[LinearAlgebra]:=n 来启用6.

另一种方法是将 printlevel 设置为高。但这样做会使所有 Maple 内部调用也变得冗长。例如,设置 printlevel:=20 的结果输出是巨大的。我怀疑您是否会发现这种方法有用。

另一种选择是将某些例程设置为选项trace。有时这样做需要知道适当的内部例程的名称。由于并非所有非导出模块本地变量默认情况下都是可见的,这一事实使情况变得更加复杂。您可以尝试先发出调用 trace(DynamicSystems::ControllableSS):,然后再在系统上调用 Controllable。这显示了一些中间结果,但这些结果对您来说可能没有多大意义,除非您知道哪些源代码行正在生成这些结果。您可以通过发出命令 showstat(DynamicSystems::ControllableSS); 查看源代码

,这是一个示例,

restart:
with( DynamicSystems ):
aSys := StateSpace( <<1,2>|<3,4>>, <<2,3>>, <<1,0>|<0,1>>, <<0,0>> ):
aSys:-a, aSys:-b, aSys:-c:
trace(DynamicSystems::ControllableSS):
Controllable( aSys );
showstat(DynamicSystems::ControllableSS);

通过查看 ControllableSS 例程的源代码,您可以推断出当指定楼梯方法时,它会调用DynamicSystems:-StaircaseTransformation。因此,在这里您也可以发出 showstat(DynamicSystems::StaircaseTransformation) 来查看该内部(本地)例程的来源。或者您也可以追踪该例程。

作为一般规则,您可以使用 :- 表示法引用模块或包的 exports。您可以使用 :: 表示法而不是 :- 将此类名称传递给 traceshowstat,除非您首先设置kernelopts(opaquemodules=false)。如果内部子模块成员的名称中包含多个 :- ,则必须使用圆括号分隔符通过 :: 语法来引用它。抱歉,这不是那么容易表达的。

I'm supposing that you are actually referring to the Observable and Controllable commands which are part of the DynamicSystems package.

Some Maple routines have so-called userinfo messages, which are optionally displayed and which can show partial steps. Those would typically be enabled with a call like infolevel[DynamicSystems]:=6 where 6 is the highest level of detail. With a lower value less detail might be displayed. Unfortunately, these particular DynamicSystems routines don't seem to have any userinfo messages in them. So this won't help directly in your case.

Sometimes one package calls another. The routine LinearAlgebra:-Rank is called, at some point, when Controllable is called. I'm guessing that you don't wish to see userinfo messages in Rank, which would be enabled by issuing infolevel[LinearAlgebra]:=n for some n between 1 and 6.

An alternative is to set printlevel high. But doing so will make all Maple internal calls also be verbose. The resulting output of setting, say, printlevel:=20 is overwhelming. I doubt that you'd find this approach useful.

Another alternative is to set certain routines as option trace. Sometimes doing so entails knowing the names of the appropriate internal routines. And this is made more complicated by the fact that not all non-exported module locals are visible by default. You could try first issuing the call, trace(DynamicSystems::ControllableSS): before invoking Controllable on your system. That shows some intermediary results, but those might not make much sense to you unless you know what source lines are generating those results. You can see the source by issuing the command, showstat(DynamicSystems::ControllableSS);

Here's an example,

restart:
with( DynamicSystems ):
aSys := StateSpace( <<1,2>|<3,4>>, <<2,3>>, <<1,0>|<0,1>>, <<0,0>> ):
aSys:-a, aSys:-b, aSys:-c:
trace(DynamicSystems::ControllableSS):
Controllable( aSys );
showstat(DynamicSystems::ControllableSS);

By looking at the source of the ControllableSS routine, you can deduce that it calls DynamicSystems:-StaircaseTransformation when the staircase method is specified. So here too you could issue showstat(DynamicSystems::StaircaseTransformation) to see the source of that internal (local) routine. Or you could trace that routine as well.

As a general rule, you can refer to exports of a module or package using the :- notation. And you can pass such names to trace and showstat using the :: notation instead of :-, unless you have first set kernelopts(opaquemodules=false). If an inner submodule member has more than one :- in its name then you'd have to use round-bracket delimiters to refer to it with the :: syntax. Sorry, that that's not so easy to express.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文