【问题标题】:Jess doesn't have or doesn't find FuzzyVariable package on Linux and macOSJess 在 Linux 和 macOS 上没有或找不到 FuzzyVariable 包
【发布时间】:2017-10-03 15:18:56
【问题描述】:

我正在 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

【问题讨论】:

  • 很可能 CLASSPATH 未设置为包含 nrc.fuzzy.FuzzyVariable

标签: linux macos jess


【解决方案1】:

基本的 Jess 发行版不包括 FuzzyJ;您必须单独安装它,将其包含在类路径中,然后使用 FuzzyMain 而不是标准的 Jess.Main 启动。你的导师应该告诉你这一切。如果您没有 FuzzyJ,您可以从 Jess 网站的“用户贡献”页面下载它:http://www.jessrules.com/contributions/

【讨论】:

  • 我阅读了安装说明,但我很困惑。它要求我提取fuzzyJ12.jar 并复制其中一个类吗?或者只是在clp文件中添加一个fuzzyJ12.jar的类路径?
  • “类路径”是指您在启动程序时提供给 Java 的信息;在阅读 Jess 脚本时,为时已晚。您不提取 jar 文件。
  • 我的老师失败了。我读到将 Fuzzy 的 jar 添加到 Jess,我必须使用 Eclipse 和 JessIDE 插件,但是当我将 JessIDE 功能和插件复制到 Eclipse 的功能和插件文件夹时,JessIDE 没有出现。我输入了myusername/.p2/pool/pluginsEclipse.app/...Eclipse/plugins
猜你喜欢
  • 2011-11-06
  • 1970-01-01
  • 2015-09-27
  • 2013-07-17
  • 2020-10-03
  • 2017-06-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多