Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
75b51293
Commit
75b51293
authored
2 years ago
by
xo30xoqa
Browse files
Options
Downloads
Patches
Plain Diff
Created a minimum running example.
parent
a875a19a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/simulation.jl
+19
-0
19 additions, 0 deletions
core/simulation.jl
persephone.jl
+36
-0
36 additions, 0 deletions
persephone.jl
run.jl
+9
-0
9 additions, 0 deletions
run.jl
with
64 additions
and
0 deletions
core/simulation.jl
0 → 100644
+
19
−
0
View file @
75b51293
### Persephone - a socio-economic-ecological model of European agricultural landscapes.
###
### This file includes the core functions for initialising and running simulations.
###
function
initsim
()
#TODO
end
function
runsim
()
#TODO
end
function
simulate
()
initsim
()
runsim
()
print
(
"Simulation ran. Nothing happened."
)
#TODO
end
This diff is collapsed.
Click to expand it.
persephone.jl
+
36
−
0
View file @
75b51293
### Persephone - a socio-economic-ecological model of European agricultural landscapes.
###
### Daniel Vedder <daniel.vedder@idiv.de>
### Lea Kolb <lea-deborah.kolb@idiv.de>
### (c) 2022, licensed under the terms of the MIT license
###
### This file defines the module (= "library") for the Persephone model.
### To run the model, either execute `run.jl` from the commandline,
### or import the module using your own wrapper script or software.
###
module
Persephone
## define dependencies
using
Agents
,
ArgParse
## define exported functions and variables
export
simulate
## include all module files
include
(
"core/input.jl"
)
include
(
"core/output.jl"
)
include
(
"crop/crops.jl"
)
include
(
"ecology/ecology.jl"
)
include
(
"farm/farm.jl"
)
include
(
"core/simulation.jl"
)
end
This diff is collapsed.
Click to expand it.
run.jl
0 → 100755
+
9
−
0
View file @
75b51293
#!/usr/bin/env julia
# A very thin wrapper to start a Persephone simulation.
# (This is not included in persephone.jl in order to enable the latter to
# be used as a library, without automatically launching a simulation.)
include
(
"persephone.jl"
)
using
.
Persephone
simulate
()
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