- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在 Mac 和 Linux 上使用秒差距、直径和温度单位做关于未知区域行星问题的家庭作业或学校作业/作业演示。我将 FuzzyVariable 应用于行星名称和单位。
我添加了(import nrc.fuzzy.*)
。
;Distância do Coruscant
(defglobal ?*gVarDistanciaDeCoruscant* = (new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsecs"))
;Temperatura dos Planetas
(defglobal ?*gVarTemperatura* = (new nrc.fuzzy.FuzzyVariable "temperatura" 0 8000 "K"))
;Planetas Vizinhos
(defglobal ?*gVarPlanetasVizinhos* = (new nrc.fuzzy.FuzzyVariable "distanciaPlanetasVizinhos" 0.0 400000.0 "d"))
;Raio em termos de unidades coruscantenses
(defglobal ?*gVarTamanho* = (new nrc.fuzzy.FuzzyVariable "tamanho" 0 500 "EU"))
;Quando o planeta foi descoberto
(defglobal ?*gVarDescobertaTempo* = (new nrc.fuzzy.FuzzyVariable "descoberta" 50000BBY 400ABY))
(call nrc.fuzzy.FuzzyValue setMatchThreshold 0.1)
而终端,Jess给出了错误:
Jess reported an error in routine new
while executing (new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsec")
while executing definition for defglobal ?*gVarDistanciaDeCoruscant*
while executing (batch "/Users/UNISAL/Documents/AI/StarWars.clp").
Message: Class nrc.fuzzy.FuzzyVariable not found.
Program text: ( defglobal ?*gVarDistanciaDeCoruscant* = ( new nrc.fuzzy.FuzzyVariable "distanciaDeCoruscant" 0.0 30000.0 "parsec" ) ) at line 26 in file /Users/UNISAL/Documents/AI/StarWars.clp.
Nested exception is:
nrc.fuzzy.FuzzyVariable
我认为 Mac 和 Linux 没有这个 Jess 包。是否可以添加兼容 Mac 和 Linux 的遗漏包?
我需要向我的老师提交我的作业/作业演示以获得好成绩。
您可以查看整个文档:https://gist.github.com/gusbemacbe/8ad836256edcfb5edbffe206cad6c9e8
最佳答案
基础 Jess 发行版不包括 FuzzyJ;您必须单独安装它,将其包含在类路径中,然后使用 FuzzyMain 而不是标准的 Jess.Main 启动。你的导师应该告诉你这一切。如果您没有 FuzzyJ,您可以从 Jess 网站的“用户贡献”页面下载它:http://www.jessrules.com/contributions/ .
关于linux - Jess 在 Linux 和 macOS 上没有或找不到 FuzzyVariable 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46548031/
为简单起见,假设我有以下两个模板: (deftemplate JessObjA (declare (from-class JessObjA)) ) (deftemplate JessObjB (dec
在我看来,Jess 是一种动态改变我们在 Java 类中放入的内容的方法,当我面对 java Reflection 时,令人惊讶的是,它们似乎具有相同的目标。 如果这是真的,我什么时候应该使用其中一种
我正在尝试使用以下 JessTab 代码将本体中的个体与当前日期和时间值链接起来: (slot-insert$ TimeInstant_1 http://www.w3.org/2006/time#in
因此,当您在 Jess 中断言一个已断言的事实时,它会返回 FALSE,而不是断言返回该事实的 id。似乎在Java中你可以使用“findFactByFact”,我认为这是方法,但是如果我没有事实,我
在 Jess 中,假设我的事实库由几个名称-值对组成,例如 (node1 6.5) (node2 100) (node3 0.5) 如何在不手动撤回的情况下“更新”这些值,例如“node1”值从 6.
到目前为止,我对文件路径进行了硬编码,以便保存事实或将它们加载到内存中,但是当我使用 showSaveDialog() 请求文件并使用 getAbsolutePath 获取路径和名称时,我对代码进行了
我通过示例解释我的问题。 (deftemplate point (slot a)(slot b)) (assert (point (a 1)(b 1))) (assert (point (a 1
我用 Jess 编写了代码: ;;;************* ;;;* MODULES * ;;;************* (defmodule EXAMPLE) ;;;***********
我正在尝试在 Jess 中对数字列表求和,但我不确定如何去做: (deffunction sumAll ($?n) (return (+ ?n))) (sumAll 1 2 3) 上面的代码不起作用。
我已经定义了一个接受 lambda 的 bool Jess 函数,如下所示: (deffunction at-least(?n ?lambda $?values) (>= (length$ (
我必须从调用 Jess 脚本的 Java 类发送一些值,以便在 Jess 脚本中进行处理。 这是我到目前为止的代码: int val1=0; int val2=1; Rete engine = new
我已经在netbeans中将jess与java集成了。我想访问字符串变量中的输出。 当我(运行).clp 文件并为其提供输入时,它会显示输出,但我想在字符串变量中获取此输出。我怎样才能做到这一点??请
嗨,我已经用 JESS 编写了所有代码,现在我想在 Java 中使用该代码。我想知道是否需要像教科书中那样重新定义 deftemplate?或者是否可以使用该代码并进行一些细微的更改? 我有两个 cl
我正在通过 Apache Tomcat 服务器编写一个小型 Jess 应用程序。我正在使用 servlet 来获取用户的输入并输出 Jess 结果。我的文件位于 Tomcat 目录中 webapps
以下是我安装 Jess 插件的步骤: 1) 安装 eclipse ide (Oxygen)。 2) 从http://www.jessrules.com/jess/download.shtml下载jav
我对杰西是个新手。我试图运行 jess 手册中提供的示例,但失败了。任何人都可以帮助我完成有关如何运行随附的定价引擎示例的步骤。 手册 http://www.jessrules.com/jess/do
我很快就开始为我的计算机科学最后一年项目开发一个移动应用程序。关于使用什么来创建应用程序,我保持开放的选择。我听说 Phonegap 是一个非常方便的 API,但我仍然可以实现诸如 JESS rule
) 我正在写我的硕士论文,我必须使用 JESS 平台。我想问一个问题。 例如,我有一个名为“Main”的 Java 类: public class Main { private String
通过阅读大量文档,我了解了 2 个规则引擎 JESS(工作流程引擎)并垂涎欲滴,所以您能建议我哪一个更好吗? 我的要求是,我正在检查源代码,如果缺少任何标准方法或方法,请获取日志或报告或任何类型的标志
我有一个用 Jess(Java 库之一)编写的界面,它有一个面板和一个组合框 我想让它作为小程序运行。这样我就可以将它嵌入到网络上! 这是我的 applet.java, package uges.ap
我是一名优秀的程序员,十分优秀!