Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplekit-ruby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sanchez, Paul
simplekit-ruby
Commits
8308cc54
Commit
8308cc54
authored
10 years ago
by
pjs
Browse files
Options
Downloads
Patches
Plain Diff
lint-based cleanups
parent
b3eff1c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
demos/AoModel.rb
+3
-3
3 additions, 3 deletions
demos/AoModel.rb
demos/MMk.rb
+2
-3
2 additions, 3 deletions
demos/MMk.rb
demos/MyModel.rb
+1
-2
1 addition, 2 deletions
demos/MyModel.rb
demos/MyModelArgs.rb
+1
-2
1 addition, 2 deletions
demos/MyModelArgs.rb
simplekit.gemspec
+2
-2
2 additions, 2 deletions
simplekit.gemspec
with
9 additions
and
12 deletions
demos/AoModel.rb
+
3
−
3
View file @
8308cc54
#!/usr/bin/env ruby
#!/usr/bin/env ruby
require
'rubygems'
require
'rubygems'
if
RUBY_VERSION
=~
/^1\.8/
require
'simplekit'
require
'simplekit'
# Demonstration model of Operational Availability (Ao).
# Demonstration model of Operational Availability (Ao).
...
@@ -9,13 +9,13 @@ class AoModel
...
@@ -9,13 +9,13 @@ class AoModel
include
SimpleKit
include
SimpleKit
# model state
# model state
attr_reader
:numAvailableJeeps
,
attr_reader
:numAvailableJeeps
,
:numAvailableMechanics
,
:numAvailableMechanics
,
:maintenanceQLength
,
:maintenanceQLength
,
:breakdownQLength
:breakdownQLength
# model parameters
# model parameters
attr_reader
:maxJeeps
,
attr_reader
:maxJeeps
,
:maxMaintainers
,
:maxMaintainers
,
:breakdownRate
,
:breakdownRate
,
:maintenanceCycleInDays
,
:maintenanceCycleInDays
,
...
...
This diff is collapsed.
Click to expand it.
demos/MMk.rb
+
2
−
3
View file @
8308cc54
#!/usr/bin/env ruby
#!/usr/bin/env ruby
require
'rubygems'
require
'rubygems'
if
RUBY_VERSION
=~
/^1\.8/
require
'simplekit'
require
'simplekit'
# Demonstration model of an M/M/k queueing system. There are k servers
# Demonstration model of an M/M/k queueing system. There are k servers
# and both the arrival and service processes are memoryless (exponential).
# and both the arrival and service processes are memoryless (exponential).
class
MMk
class
MMk
include
SimpleKit
include
SimpleKit
...
@@ -76,4 +76,3 @@ end
...
@@ -76,4 +76,3 @@ end
# Instantiate an MMk object with a particular parameterization and run it.
# Instantiate an MMk object with a particular parameterization and run it.
MMk
.
new
(
4.5
,
1.0
,
5
).
run
MMk
.
new
(
4.5
,
1.0
,
5
).
run
This diff is collapsed.
Click to expand it.
demos/MyModel.rb
+
1
−
2
View file @
8308cc54
#!/usr/bin/env ruby
#!/usr/bin/env ruby
require
'rubygems'
require
'rubygems'
if
RUBY_VERSION
=~
/^1\.8/
require
'simplekit'
require
'simplekit'
class
MyModel
class
MyModel
...
@@ -17,7 +17,6 @@ class MyModel
...
@@ -17,7 +17,6 @@ class MyModel
schedule
(
:increment
,
1.5
)
schedule
(
:increment
,
1.5
)
printf
"%f, %f
\n
"
,
model_time
,
@x
printf
"%f, %f
\n
"
,
model_time
,
@x
end
end
end
end
MyModel
.
new
.
run
MyModel
.
new
.
run
This diff is collapsed.
Click to expand it.
demos/MyModelArgs.rb
+
1
−
2
View file @
8308cc54
#!/usr/bin/env ruby
#!/usr/bin/env ruby
require
'rubygems'
require
'rubygems'
if
RUBY_VERSION
=~
/^1\.8/
require
'simplekit'
require
'simplekit'
class
MyModel
class
MyModel
...
@@ -17,7 +17,6 @@ class MyModel
...
@@ -17,7 +17,6 @@ class MyModel
printf
"%f, %f, %c
\n
"
,
model_time
,
@x
,
c
printf
"%f, %f, %c
\n
"
,
model_time
,
@x
,
c
schedule
(
:halt
,
0.0
)
if
model_time
>
10
schedule
(
:halt
,
0.0
)
if
model_time
>
10
end
end
end
end
MyModel
.
new
.
run
MyModel
.
new
.
run
This diff is collapsed.
Click to expand it.
simplekit.gemspec
+
2
−
2
View file @
8308cc54
# -*- ruby -*-
# -*- ruby -*-
_VERSION
=
"0.4.
2
"
_VERSION
=
"0.4.
3
"
Gem
::
Specification
.
new
do
|
s
|
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
"simplekit"
s
.
name
=
"simplekit"
s
.
version
=
_VERSION
s
.
version
=
_VERSION
s
.
date
=
"201
3
-0
4-11
"
s
.
date
=
"201
5
-0
5-04
"
s
.
summary
=
"Discrete event simulation engine."
s
.
summary
=
"Discrete event simulation engine."
s
.
homepage
=
"git://or.nps.edu/simplekit-ruby.git"
s
.
homepage
=
"git://or.nps.edu/simplekit-ruby.git"
s
.
email
=
"pjs@alum.mit.edu"
s
.
email
=
"pjs@alum.mit.edu"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment