Commit 50971350 authored by Falko Schumann's avatar Falko Schumann

Dokumentation der Regeln verbessert

parent 97a0f904
......@@ -33,7 +33,7 @@ import java.util.*;
import static de.bsvrz.iav.fuzzylib.fuzzylib.FuzzyLogikHandler.*;
/**
* Eine Regel leitet aus vorhandenn Termen einen neuen Term ab.
* Eine Regel leitet aus vorhandenen Termen einen neuen Term ab.
* <p>
* Eine Regel wird in der Form "Wenn Prämisse dann Konklusion mit
* Sicherheitsgrad" angegeben. Die Prämisse besteht aus belieben Operationen auf
......@@ -101,6 +101,11 @@ public final class Regel implements Ausdruck<TermLiteral> {
return praemisse + " -> " + konklusion + " (" + sicherheitsgrad + ")";
}
/**
* Builder für eine Regel.
*
* @author BitCtrl Systems GmbH, Falko Schumann
*/
public static class RegelBuilder {
private final Ausdruck<Double> praemisse;
......
......@@ -38,6 +38,9 @@ import static de.bsvrz.iav.fuzzylib.fuzzylib.FuzzyLogikHandler.*;
* <p>
* Die Regelbasis wertet alle enthaltenen Regeln aus und akkumuliert
* anschließend die abgeleiteten Terme zu Fuzzy-Variablen.
* <p>
* Eine Regelbasis ist nicht definiert ({@link #isNull()}), wenn sie keine Regel
* besitzt.
*
* @author BitCtrl Systems GmbH, Falko Schumann
* @see Regel
......
......@@ -54,7 +54,7 @@ term: Term</y:AttributeLabel>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="46.453125" x="41.2734375" xml:space="preserve" y="26.1328125">Literal<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="interface" use3DEffect="false">
<y:AttributeLabel xml:space="preserve">wert: Object (wozu?)</y:AttributeLabel>
<y:AttributeLabel xml:space="preserve">wert: Object</y:AttributeLabel>
<y:MethodLabel xml:space="preserve"/>
</y:UML>
</y:UMLClassNode>
......@@ -131,20 +131,35 @@ akkumulation: Operator</y:AttributeLabel>
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLClassNode>
<y:Geometry height="117.0" width="191.0" x="287.9999999999998" y="244.0"/>
<y:Geometry height="117.0" width="200.4826815642458" x="283.25865921787687" y="244.0"/>
<y:Fill color="#FFFFFF" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="41.0068359375" x="74.99658203125" xml:space="preserve" y="3.0">Regel<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="41.0068359375" x="79.7379228133729" xml:space="preserve" y="3.0">Regel<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="false">
<y:AttributeLabel xml:space="preserve">praemisse: Ausdruck
konklusion: TermSymbol
sicherheitsgrad: double
konklusion: TermVariable
sicherheitsgrad: Sicherheitsgrad
implikation: Operator</y:AttributeLabel>
<y:MethodLabel xml:space="preserve">interpret(Kontext): TermLiteral</y:MethodLabel>
</y:UML>
</y:UMLClassNode>
</data>
</node>
<node id="n8">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLClassNode>
<y:Geometry height="57.99664804469273" width="129.0" x="318.9999999999998" y="391.0"/>
<y:Fill color="#FFFFFF" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="108.380859375" x="10.3095703125" xml:space="preserve" y="3.0">Sicherheitsgrad<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="false">
<y:AttributeLabel xml:space="preserve">wert: double</y:AttributeLabel>
<y:MethodLabel xml:space="preserve"/>
</y:UML>
</y:UMLClassNode>
</data>
</node>
<edge id="e0" source="n2" target="n1">
<data key="d8" xml:space="preserve"/>
<data key="d10">
......@@ -234,7 +249,7 @@ implikation: Operator</y:AttributeLabel>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="diamond" target="none"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="40.6796875" x="27.233194986979015" xml:space="preserve" y="-21.06640625">regeln<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="12.0" distanceToCenter="true" position="left" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="40.6796875" x="24.862524595917563" xml:space="preserve" y="-21.06640625">regeln<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="12.0" distanceToCenter="true" position="left" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docbase="C:\Workspace\VRZ3\SWE5_IAV\src\de\bwl\rpt\ref95\iav\funktionen\fuzzy\doc-files"
sodipodi:docname="strahlensatzX.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="C:\Workspace\VRZ3\SWE5_IAV\src\de\bwl\rpt\ref95\iav\funktionen\fuzzy\doc-files\strahlensatzX.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
sodipodi:modified="TRUE">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="279.24823"
inkscape:cy="534.76254"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1280"
inkscape:window-height="943"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 370,453.79075 L 370,562.36218 L 162.85714,562.36218 L 370,453.79075 z "
id="path2164" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99729073px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 287.14286,562.00774 L 287.14286,497.35947"
id="path2166" />
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x="373"
y="577.37225"
id="text2168"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2170"
x="373"
y="577.37225">a</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x="260.28571"
y="577.37225"
id="text2172"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2174"
x="260.28571"
y="577.37225">return</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x="373.68359"
y="516.64789"
id="text2176"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2178"
x="373.68359"
y="516.64789">1</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x="155.35715"
y="577.37225"
id="text2180"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2182"
x="155.35715"
y="577.37225">z</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x="291.42856"
y="536.29077"
id="text2184"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan2186"
x="291.42856"
y="536.29077">y</tspan></text>
</g>
</svg>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment