Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Agriterix
simulator
Commits
c89720de
Commit
c89720de
authored
Jul 26, 2021
by
Loris Croce
Browse files
removed some todos
parent
53ba397c
Pipeline
#38206
passed with stages
in 3 minutes and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/inrae/agriterix/simulator/Patch.java
View file @
c89720de
...
...
@@ -5,7 +5,6 @@ public class Patch {
private
transient
Farm
farm
;
private
GeoArea
geoArea
;
private
Float
surface
;
//TODO correspondig tag production and practice
private
CulturalPractice
practice
;
private
Production
production
;
private
Float
yield
;
...
...
src/main/java/fr/inrae/agriterix/simulator/dynamics/MarketDynamics.java
View file @
c89720de
...
...
@@ -15,7 +15,6 @@ import java.util.stream.Collectors;
public
class
MarketDynamics
extends
Dynamics
{
// TODO make it in/out parameters by geoArea/product
private
float
exportFactor
;
private
float
importFactor
;
private
Stocks
localExchanged
=
new
Stocks
();
...
...
@@ -36,7 +35,6 @@ public class MarketDynamics extends Dynamics {
@Override
public
void
initParameters
()
{
//TODO load import_export.csv
try
(
CSVReader
reader
=
new
CSVReader
(
new
FileReader
(
configPath
+
"import_export.csv"
)))
{
scenario
=
reader
.
readAll
();
}
catch
(
FileNotFoundException
e
)
{
...
...
@@ -127,7 +125,7 @@ public class MarketDynamics extends Dynamics {
for
(
Map
.
Entry
<
Product
,
Float
>
production
:
productions
.
entrySet
())
{
for
(
Flow
flow
:
flows
)
{
for
(
Input
input
:
flow
.
getInputs
())
{
// products match
TODO check equals behaviour for tags
// products match
if
(
input
.
getProduct
().
equals
(
production
.
getKey
()))
{
// check all tags
if
(
input
.
getProduct
().
getTags
().
equals
(
production
.
getKey
().
getTags
()))
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment