Commit d2d1bf56 authored by Simon Trapp's avatar Simon Trapp

Started implementing WEKA

parent 5ab33293
......@@ -141,6 +141,7 @@
<eLiterals name="CONTINUOUS_EMPIRICAL" value="18" literal="ContinuousEmpirical"/>
<eLiterals name="DETERMINISTIC_CONCURRENCY" value="19" literal="DeterministicConcurrency"/>
<eLiterals name="MARS" value="20" literal="MARS"/>
<eLiterals name="WEKA" value="21" literal="WEKA"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="DistributionFunctionObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
......@@ -871,6 +872,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="concurrenciesFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="responsetimesFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="marsFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="wekaFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="QueueingPetriNet">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
......
......@@ -33,6 +33,7 @@
<genEnumLiterals ecoreEnumLiteral="qpme.ecore#//DistributionFunction/CONTINUOUS_EMPIRICAL"/>
<genEnumLiterals ecoreEnumLiteral="qpme.ecore#//DistributionFunction/DETERMINISTIC_CONCURRENCY"/>
<genEnumLiterals ecoreEnumLiteral="qpme.ecore#//DistributionFunction/MARS"/>
<genEnumLiterals ecoreEnumLiteral="qpme.ecore#//DistributionFunction/WEKA"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="qpme.ecore#//FlowDirection">
<genEnumLiterals ecoreEnumLiteral="qpme.ecore#//FlowDirection/IN"/>
......@@ -207,6 +208,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute qpme.ecore#//QueueingColorReference/concurrenciesFile"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute qpme.ecore#//QueueingColorReference/responsetimesFile"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute qpme.ecore#//QueueingColorReference/marsFile"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute qpme.ecore#//QueueingColorReference/wekaFile"/>
</genClasses>
<genClasses ecoreClass="qpme.ecore#//QueueingPetriNet">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference qpme.ecore#//QueueingPetriNet/colors"/>
......
......@@ -226,7 +226,15 @@ public enum DistributionFunction implements Enumerator {
* @generated
* @ordered
*/
MARS(20, "MARS", "MARS");
MARS(20, "MARS", "MARS"), /**
* The '<em><b>WEKA</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #WEKA_VALUE
* @generated
* @ordered
*/
WEKA(21, "WEKA", "WEKA");
/**
* The '<em><b>BETA</b></em>' literal value.
......@@ -543,6 +551,21 @@ public enum DistributionFunction implements Enumerator {
*/
public static final int MARS_VALUE = 20;
/**
* The '<em><b>WEKA</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>WEKA</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #WEKA
* @model
* @generated
* @ordered
*/
public static final int WEKA_VALUE = 21;
/**
* An array of all the '<em><b>Distribution Function</b></em>' enumerators.
* <!-- begin-user-doc -->
......@@ -572,6 +595,7 @@ public enum DistributionFunction implements Enumerator {
CONTINUOUS_EMPIRICAL,
DETERMINISTIC_CONCURRENCY,
MARS,
WEKA,
};
/**
......@@ -649,6 +673,7 @@ public enum DistributionFunction implements Enumerator {
case CONTINUOUS_EMPIRICAL_VALUE: return CONTINUOUS_EMPIRICAL;
case DETERMINISTIC_CONCURRENCY_VALUE: return DETERMINISTIC_CONCURRENCY;
case MARS_VALUE: return MARS;
case WEKA_VALUE: return WEKA;
}
return null;
}
......
......@@ -2001,6 +2001,15 @@ public interface ModelPackage extends EPackage {
*/
int QUEUEING_COLOR_REFERENCE__MARS_FILE = PLACE_COLOR_REFERENCE_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Weka File</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int QUEUEING_COLOR_REFERENCE__WEKA_FILE = PLACE_COLOR_REFERENCE_FEATURE_COUNT + 25;
/**
* The number of structural features of the '<em>Queueing Color Reference</em>' class.
* <!-- begin-user-doc -->
......@@ -2008,7 +2017,7 @@ public interface ModelPackage extends EPackage {
* @generated
* @ordered
*/
int QUEUEING_COLOR_REFERENCE_FEATURE_COUNT = PLACE_COLOR_REFERENCE_FEATURE_COUNT + 25;
int QUEUEING_COLOR_REFERENCE_FEATURE_COUNT = PLACE_COLOR_REFERENCE_FEATURE_COUNT + 26;
/**
* The meta object id for the '{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingPetriNetImpl <em>Queueing Petri Net</em>}' class.
......@@ -4748,6 +4757,17 @@ public interface ModelPackage extends EPackage {
*/
EAttribute getQueueingColorReference_MarsFile();
/**
* Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getWekaFile <em>Weka File</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Weka File</em>'.
* @see edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getWekaFile()
* @see #getQueueingColorReference()
* @generated
*/
EAttribute getQueueingColorReference_WekaFile();
/**
* Returns the meta object for class '{@link edu.kit.ipd.descartes.qpme.model.QueueingPetriNet <em>Queueing Petri Net</em>}'.
* <!-- begin-user-doc -->
......@@ -6757,6 +6777,14 @@ public interface ModelPackage extends EPackage {
*/
EAttribute QUEUEING_COLOR_REFERENCE__MARS_FILE = eINSTANCE.getQueueingColorReference_MarsFile();
/**
* The meta object literal for the '<em><b>Weka File</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute QUEUEING_COLOR_REFERENCE__WEKA_FILE = eINSTANCE.getQueueingColorReference_WekaFile();
/**
* The meta object literal for the '{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingPetriNetImpl <em>Queueing Petri Net</em>}' class.
* <!-- begin-user-doc -->
......
......@@ -37,6 +37,7 @@ package edu.kit.ipd.descartes.qpme.model;
* <li>{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getConcurrenciesFile <em>Concurrencies File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getResponsetimesFile <em>Responsetimes File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getMarsFile <em>Mars File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getWekaFile <em>Weka File</em>}</li>
* </ul>
*
* @see edu.kit.ipd.descartes.qpme.model.ModelPackage#getQueueingColorReference()
......@@ -1202,4 +1203,30 @@ public interface QueueingColorReference extends PlaceColorReference {
*/
void setMarsFile(String value);
/**
* Returns the value of the '<em><b>Weka File</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Weka File</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Weka File</em>' attribute.
* @see #setWekaFile(String)
* @see edu.kit.ipd.descartes.qpme.model.ModelPackage#getQueueingColorReference_WekaFile()
* @model
* @generated
*/
String getWekaFile();
/**
* Sets the value of the '{@link edu.kit.ipd.descartes.qpme.model.QueueingColorReference#getWekaFile <em>Weka File</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Weka File</em>' attribute.
* @see #getWekaFile()
* @generated
*/
void setWekaFile(String value);
} // QueueingColorReference
......@@ -1648,6 +1648,15 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
return (EAttribute)queueingColorReferenceEClass.getEStructuralFeatures().get(24);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getQueueingColorReference_WekaFile() {
return (EAttribute)queueingColorReferenceEClass.getEStructuralFeatures().get(25);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -2668,6 +2677,7 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
createEAttribute(queueingColorReferenceEClass, QUEUEING_COLOR_REFERENCE__CONCURRENCIES_FILE);
createEAttribute(queueingColorReferenceEClass, QUEUEING_COLOR_REFERENCE__RESPONSETIMES_FILE);
createEAttribute(queueingColorReferenceEClass, QUEUEING_COLOR_REFERENCE__MARS_FILE);
createEAttribute(queueingColorReferenceEClass, QUEUEING_COLOR_REFERENCE__WEKA_FILE);
queueingPetriNetEClass = createEClass(QUEUEING_PETRI_NET);
createEReference(queueingPetriNetEClass, QUEUEING_PETRI_NET__COLORS);
......@@ -3005,6 +3015,7 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
initEAttribute(getQueueingColorReference_ConcurrenciesFile(), ecorePackage.getEString(), "concurrenciesFile", null, 0, 1, QueueingColorReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getQueueingColorReference_ResponsetimesFile(), ecorePackage.getEString(), "responsetimesFile", null, 0, 1, QueueingColorReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getQueueingColorReference_MarsFile(), ecorePackage.getEString(), "marsFile", null, 0, 1, QueueingColorReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getQueueingColorReference_WekaFile(), ecorePackage.getEString(), "wekaFile", null, 0, 1, QueueingColorReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(queueingPetriNetEClass, QueueingPetriNet.class, "QueueingPetriNet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getQueueingPetriNet_Colors(), this.getColorsContainer(), null, "colors", null, 0, 1, QueueingPetriNet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
......@@ -3132,6 +3143,7 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
addEEnumLiteral(distributionFunctionEEnum, DistributionFunction.CONTINUOUS_EMPIRICAL);
addEEnumLiteral(distributionFunctionEEnum, DistributionFunction.DETERMINISTIC_CONCURRENCY);
addEEnumLiteral(distributionFunctionEEnum, DistributionFunction.MARS);
addEEnumLiteral(distributionFunctionEEnum, DistributionFunction.WEKA);
initEEnum(flowDirectionEEnum, FlowDirection.class, "FlowDirection");
addEEnumLiteral(flowDirectionEEnum, FlowDirection.IN);
......
......@@ -45,6 +45,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
* <li>{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingColorReferenceImpl#getConcurrenciesFile <em>Concurrencies File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingColorReferenceImpl#getResponsetimesFile <em>Responsetimes File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingColorReferenceImpl#getMarsFile <em>Mars File</em>}</li>
* <li>{@link edu.kit.ipd.descartes.qpme.model.impl.QueueingColorReferenceImpl#getWekaFile <em>Weka File</em>}</li>
* </ul>
*
* @generated
......@@ -712,6 +713,26 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
*/
protected String marsFile = MARS_FILE_EDEFAULT;
/**
* The default value of the '{@link #getWekaFile() <em>Weka File</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWekaFile()
* @generated
* @ordered
*/
protected static final String WEKA_FILE_EDEFAULT = null;
/**
* The cached value of the '{@link #getWekaFile() <em>Weka File</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWekaFile()
* @generated
* @ordered
*/
protected String wekaFile = WEKA_FILE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -1706,6 +1727,27 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.QUEUEING_COLOR_REFERENCE__MARS_FILE, oldMarsFile, marsFile));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getWekaFile() {
return wekaFile;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setWekaFile(String newWekaFile) {
String oldWekaFile = wekaFile;
wekaFile = newWekaFile;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.QUEUEING_COLOR_REFERENCE__WEKA_FILE, oldWekaFile, wekaFile));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -1764,6 +1806,8 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
return getResponsetimesFile();
case ModelPackage.QUEUEING_COLOR_REFERENCE__MARS_FILE:
return getMarsFile();
case ModelPackage.QUEUEING_COLOR_REFERENCE__WEKA_FILE:
return getWekaFile();
}
return super.eGet(featureID, resolve, coreType);
}
......@@ -1851,6 +1895,9 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
case ModelPackage.QUEUEING_COLOR_REFERENCE__MARS_FILE:
setMarsFile((String)newValue);
return;
case ModelPackage.QUEUEING_COLOR_REFERENCE__WEKA_FILE:
setWekaFile((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
......@@ -1938,6 +1985,9 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
case ModelPackage.QUEUEING_COLOR_REFERENCE__MARS_FILE:
setMarsFile(MARS_FILE_EDEFAULT);
return;
case ModelPackage.QUEUEING_COLOR_REFERENCE__WEKA_FILE:
setWekaFile(WEKA_FILE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
......@@ -2000,6 +2050,8 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
return RESPONSETIMES_FILE_EDEFAULT == null ? responsetimesFile != null : !RESPONSETIMES_FILE_EDEFAULT.equals(responsetimesFile);
case ModelPackage.QUEUEING_COLOR_REFERENCE__MARS_FILE:
return MARS_FILE_EDEFAULT == null ? marsFile != null : !MARS_FILE_EDEFAULT.equals(marsFile);
case ModelPackage.QUEUEING_COLOR_REFERENCE__WEKA_FILE:
return WEKA_FILE_EDEFAULT == null ? wekaFile != null : !WEKA_FILE_EDEFAULT.equals(wekaFile);
}
return super.eIsSet(featureID);
}
......@@ -2064,6 +2116,8 @@ public class QueueingColorReferenceImpl extends PlaceColorReferenceImpl implemen
result.append(responsetimesFile);
result.append(", marsFile: ");
result.append(marsFile);
result.append(", wekaFile: ");
result.append(wekaFile);
result.append(')');
return result.toString();
}
......
......@@ -96,7 +96,9 @@ public enum Distribution {
DETERMINISTIC_CONCURRENCY("DeterministicConcurrency", new DeterministicConcurrencyCreator(),
new String[] { "concurrenciesFile", "responsetimesFile" }, new String[] { "", "" }, true),
MARS("MARS", new MARSCreator(), new String[] { "marsFile" }, new String[] { "" }, true);
MARS("MARS", new MARSCreator(), new String[] { "marsFile" }, new String[] { "" }, true),
WEKA("WEKA", new WEKACreator(), new String[] { "wekaFile" }, new String[] { "" }, true);
public static final Distribution DEFAULT_DISTRIBUTION = EXPONENTIAL;
......
......@@ -64,8 +64,10 @@ public class MARS implements AbstractDistribution {
if (functions == null)
createFunctions(qplace.colors);
double result = constant;
for (int i = 0; i < functions.length; i++)
System.out.println("START");
for (int i = 0; i < functions.length; i++) {
result += functions[i].calculate(qplace.getQueueTokenPop(), color);
}
return result;
}
......@@ -111,6 +113,10 @@ public class MARS implements AbstractDistribution {
return 0.0;
return coefficient * (knot - tokenNumber);
}
public String toString() {
return coefficient + "*max(0," + knot + "-WC" + colorId + ")";
}
}
class RightFunction implements Function {
......@@ -131,9 +137,13 @@ public class MARS implements AbstractDistribution {
int tokenNumber = tokenNumbers[colorId];
if (colorId == mainColor)
tokenNumber = tokenNumber - 1;
if (tokenNumber < knot)
if (tokenNumber <= knot)
return 0.0;
return coefficient * (tokenNumber - knot);
}
public String toString() {
return coefficient + "*max(0,WC" + colorId + "-" + knot + ")";
}
}
}
/* ==============================================
* QPME : Queueing Petri net Modeling Environment
* ==============================================
*
* (c) Copyright 2003-2011, by Samuel Kounev and Contributors.
*
* Project Info: http://descartes.ipd.kit.edu/projects/qpme/
* http://www.descartes-research.net/
*
* All rights reserved. This software is made available under the terms of the
* Eclipse Public License (EPL) v1.0 as published by the Eclipse Foundation
* http://www.eclipse.org/legal/epl-v10.html
*
* This software is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License (EPL)
* for more details.
*
* You should have received a copy of the Eclipse Public License (EPL)
* along with this software; if not visit http://www.eclipse.org or write to
* Eclipse Foundation, Inc., 308 SW First Avenue, Suite 110, Portland, 97204 USA
* Email: license (at) eclipse.org
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* =============================================
*
* Original Author(s): Fabian Brosig
* Contributor(s):
*
* NOTE: The above list of contributors lists only the people that have
* contributed to this source file - for a list of ALL contributors to
* the project, please see the README.txt file.
*
* History:
* Date ID Description
* ---------- ---------------- ------------------------------------------------------------------
* 2013 Fabian Brosig Created.
*/
package de.tud.cs.simqpn.kernel.loading.distributions;
import de.tud.cs.simqpn.kernel.entities.QPlace;
public class WEKA implements AbstractDistribution {
public WEKA() {
// TODO
}
@Override
public double nextDouble(QPlace qplace, int color) {
return 0.0; // TODO
}
}
/* ==============================================
* QPME : Queueing Petri net Modeling Environment
* ==============================================
*
* (c) Copyright 2003-2011, by Samuel Kounev and Contributors.
*
* Project Info: http://descartes.ipd.kit.edu/projects/qpme/
* http://www.descartes-research.net/
*
* All rights reserved. This software is made available under the terms of the
* Eclipse Public License (EPL) v1.0 as published by the Eclipse Foundation
* http://www.eclipse.org/legal/epl-v10.html
*
* This software is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License (EPL)
* for more details.
*
* You should have received a copy of the Eclipse Public License (EPL)
* along with this software; if not visit http://www.eclipse.org or write to
* Eclipse Foundation, Inc., 308 SW First Avenue, Suite 110, Portland, 97204 USA
* Email: license (at) eclipse.org
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* =============================================
*
* Original Author(s): Jrgen Walter
* Contributor(s):
*
* NOTE: The above list of contributors lists only the people that have
* contributed to this source file - for a list of ALL contributors to
* the project, please see the README.txt file.
*
* History:
* Date ID Description
* ---------- ---------------- ------------------------------------------------------------------
* 2014/03/10 Jrgen Walter Extracted from NetLoader
*
*/
package de.tud.cs.simqpn.kernel.loading.distributions;
import java.util.LinkedList;
import java.util.List;
import de.tud.cs.simqpn.kernel.SimQPNException;
public class WEKACreator extends DistributionCreator {
double constant;
List<Double> coefficients = new LinkedList<Double>();
List<Double> knots = new LinkedList<Double>();
List<Integer> sides = new LinkedList<Integer>();
List<String> colorIds = new LinkedList<String>();
String marsFilename;
@Override
protected void loadParams() throws SimQPNException {
marsFilename = this.loadStringParam("wekaFile"); // TODO: model in memory laden
// loadMARSModelFromFile(marsFilename);
}
// private void loadMARSModelFromFile(String fileName) {
// coefficients.clear();
// knots.clear();
// sides.clear();
// colorIds.clear();
// try (BufferedReader br = new BufferedReader(new FileReader(new File(fileName)))) {
// String line = br.readLine();
// constant = Double.valueOf(line);
// while ((line = br.readLine()) != null) {
// String[] segments = line.split(" ");
// coefficients.add(Double.valueOf(segments[0]));
// knots.add(Double.valueOf(segments[1]));
// sides.add(Integer.valueOf(segments[2]));
// colorIds.add(segments[3]);
// }
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
@Override
public AbstractDistribution getDistribution() throws SimQPNException {
return new WEKA();
}
@Override
public double getMean() {
return -1.0;
}
@Override
public String getConstructionText() {
return "(" + marsFilename + ")";
}
@Override
public String getMeanComputationText() {
return "Returning placeholder -1 for mean of DeterministicConcurrency Distribution";
}
}
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