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
e586e01d
Commit
e586e01d
authored
Dec 03, 2018
by
Simon Eismann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no exp
parent
b8de091f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
...c/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
+1
-8
No files found.
sources/qpme.simqpn.kernel/src/de/tud/cs/simqpn/kernel/loading/distributions/MARS.java
View file @
e586e01d
...
...
@@ -40,9 +40,6 @@
*/
package
de.tud.cs.simqpn.kernel.loading.distributions
;
import
cern.jet.random.Exponential
;
import
de.tud.cs.simqpn.kernel.RandomNumberGenerator
;
import
de.tud.cs.simqpn.kernel.SimQPNException
;
import
de.tud.cs.simqpn.kernel.entities.QPlace
;
public
class
MARS
implements
AbstractDistribution
{
...
...
@@ -69,11 +66,7 @@ public class MARS implements AbstractDistribution {
double
result
=
constant
;
for
(
int
i
=
0
;
i
<
functions
.
length
;
i
++)
result
+=
functions
[
i
].
calculate
(
qplace
.
getQueueTokenPop
()[
color
]);
try
{
return
new
Exponential
(
1
/
result
,
RandomNumberGenerator
.
nextRandNumGen
()).
nextDouble
();
}
catch
(
SimQPNException
e
)
{
return
-
1
;
}
return
result
;
}
private
void
createFunctions
(
String
[]
colors
)
{
...
...
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