Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qpme-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Descartes Research
qpme-core
Commits
d2d1bf56
Commit
d2d1bf56
authored
Apr 09, 2020
by
Simon Trapp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started implementing WEKA
parent
5ab33293
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
328 additions
and
5 deletions
+328
-5
sources/qpme.model/model/qpme.ecore
sources/qpme.model/model/qpme.ecore
+2
-0
sources/qpme.model/model/qpme.genmodel
sources/qpme.model/model/qpme.genmodel
+2
-0
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/DistributionFunction.java
...du/kit/ipd/descartes/qpme/model/DistributionFunction.java
+26
-1
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/ModelPackage.java
...el/src/edu/kit/ipd/descartes/qpme/model/ModelPackage.java
+29
-1
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/QueueingColorReference.java
.../kit/ipd/descartes/qpme/model/QueueingColorReference.java
+27
-0
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/impl/ModelPackageImpl.java
...u/kit/ipd/descartes/qpme/model/impl/ModelPackageImpl.java
+12
-0
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/impl/QueueingColorReferenceImpl.java
...descartes/qpme/model/impl/QueueingColorReferenceImpl.java
+54
-0
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/Distribution.java
.../cs/simqpn/kernel/loading/distributions/Distribution.java
+3
-1
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
...c/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
+12
-2
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/WEKA.java
...c/de/tud/cs/simqpn/kernel/loading/distributions/WEKA.java
+56
-0
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/WEKACreator.java
...d/cs/simqpn/kernel/loading/distributions/WEKACreator.java
+105
-0
No files found.
sources/qpme.model/model/qpme.ecore
View file @
d2d1bf56
...
...
@@ -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"
>
...
...
sources/qpme.model/model/qpme.genmodel
View file @
d2d1bf56
...
...
@@ -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"
/>
...
...
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/DistributionFunction.java
View file @
d2d1bf56
...
...
@@ -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
;
}
...
...
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/ModelPackage.java
View file @
d2d1bf56
...
...
@@ -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
+
2
5
;
int
QUEUEING_COLOR_REFERENCE_FEATURE_COUNT
=
PLACE_COLOR_REFERENCE_FEATURE_COUNT
+
2
6
;
/**
* 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 -->
...
...
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/QueueingColorReference.java
View file @
d2d1bf56
...
...
@@ -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
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/impl/ModelPackageImpl.java
View file @
d2d1bf56
...
...
@@ -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
);
...
...
sources/qpme.model/src/edu/kit/ipd/descartes/qpme/model/impl/QueueingColorReferenceImpl.java
View file @
d2d1bf56
...
...
@@ -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
();
}
...
...
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/Distribution.java
View file @
d2d1bf56
...
...
@@ -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
;
...
...
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
View file @
d2d1bf56
...
...
@@ -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
+
")"
;
}
}
}
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/WEKA.java
0 → 100644
View file @
d2d1bf56
/* ==============================================
* 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
}
}
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/WEKACreator.java
0 → 100644
View file @
d2d1bf56
/* ==============================================
* 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"
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment