GithubHelp home page GithubHelp logo

frabas / displace_gui Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 3.0 49.42 MB

A Scientific Research Software for Spatial Fisheries and Natural Resource Management

Home Page: https://displace-project.org/

License: GNU General Public License v2.0

Shell 0.19% C++ 40.73% QMake 0.26% C 57.86% Inno Setup 0.10% R 0.25% AppleScript 0.01% CMake 0.32% Batchfile 0.01% Python 0.28%
fisheries sustainability ocean impact-assessment bio-economics marine-resources marine-traffics aquaculture

displace_gui's People

Contributors

audricvigier avatar frabas avatar studiofuga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

displace_gui's Issues

Refactoring: Remove OutputFileParser

OutputFileParser depends from output files on text format (original version).
It should be nice to remove it.
But removing it also requires the simulator to signals the gui which part of the db has been updated, to avoid reloading all the nodes data.
See #110 and comments.

Drop support for QMake, use cmake instead

This would require a big refactoring of all .pro files, but:

  • cmake can be used even without Qt (on HPC for example)
  • QtCreator, Clion, MsVC supports CMake, QMake is only supported by QtCreator
  • CMake allows more tricks and workaround, and can make checks and customizations that qmake lacks
  • CMake improves readability, out qmake projects are a mess!

Needs a deep evaluation before starting this task.

Graph builder asserts when run in Debug

This affects only debug mode compilation, because in release asserts are no-op.
mFeedback->setMax() (graphbuilderworker.cpp line 12) tries to update the gui while in a non-gui thread, this shouldn't be done.

Add a program option to modify the commit rate

Commit rate in simulation is hardwired to 100, it would be nice to have the possibility to fine tune it with a proper command line option:

--commit-rate 250 Will commit the changes every 250 steps.
Needs boost::program_option so it depends on #87

Make the reading of input in scenario file independent from the order?

change read_scenario_config_file() so that
For example, currently we have:

dyn_alloc_sce

baseline TACs LTMP

dyn_pop_sce

baseline

biolsce

1
etc.

The idea would be to replace by

dyn_alloc_sce

dyn_alloc_sce baseline TACs LTMP

dyn_pop_sce

dyn_pop_sce baseline

biolsce

biolsce 1
with a keyword in first position

then read_scenario_config_file() could detect the keywords line by line and redirected the reading in the right variable. While the comments are just ignored...

then make possible different orders to limit mistakes in input e.g.

biolsce

biolsce 1

dyn_pop_sce

dyn_pop_sce baseline

dyn_alloc_sce

dyn_alloc_sce baseline TACs LTMP

CMake: Allow automatically check for support of certain functions

While compiling on HPC we need to remove some function (ipc), and on MacOS and Windows we must remove the crash handler and other stuff.
We could instead check for certain header files and add proper definitions/libraries/whatever to avoid requiring he user to manually do this.
We can still leave the options. But ideally a simple CMake call without any definition should correctly compile under every platform (linux, windows, MacoS, hpc).

Gui Crashes/Hangs at exit

Due to a race condition on exit, the Map thread doesn't exit before the main thread completes.
On Windows this makes the app hang, on Linux/MacOS this generate a crash report.

Implement a tariff map per metier

....currently the tariff map is at the overall level. We actually need a tariff map for each metier (i.e. each node has a vector for tariffs with as many elements as the number of metiers)...

Adding an option for setting the .csv separator in the Object Editor

A nice small feature to have in the Object Editor would be to add an option on the first ui for the user to choose the type of the separator in use for the .csv file before diplaying them. Because it could be either a comma or a semi-colon depending on the region and users.....

DisplaceModel crashes when model cannot be loaded

If Load() fails (for example because a file is missing), instead of showing a msg box, the program crashes.

The problem is that DisplaceModel runs a thread (mParserThread) in the constructor. This thread isn't stopped before destroying the object (the implicit destructor is used) so the program crashes.

Solutions: Either don't start the parser thread in the constructor, or stop it in the destructor.

Improve the workflow for Create graph >> Load Harbour >> Link Harbour to Graph

First of all it is not clear how and why it is possible to load a harbour file (name/idx) when the Graph is empty!! Where are the coordinates of the added icons for harbours on the map coming from? Is the loader looking for a graph coord.dat in the path? or in the name_harbours.dat file?

Currently the expected file (names_harbours.dat) for Load Harbour is already aware of the Graph node idx e.g.:
9866 Kappeln
9895 Århus
9898 Vedbæk
9899 Bogense
9903 København
9905 Egernsund
9905 NA22
9909 Gilleleje
etc.

it would actually be better and more natural to directly load some harbours file with lat long and then the ui has to add a node for each harbour to the new graph (therefore also adding them to the end of the coord,dat file) ....before creating the additional edges to link all the harbour nodes to the graph.

Then the input file (harbours.dat) could be instead:
name;x;y;idx.port
Baabe (Ostseebad);13.715744;54.362458;1
Barth;12.72666667;54.37166667;2
Bensersiel;7.575;53.675;3
Brake;8.483333333;53.33333333;4
Bremerhaven;8.573333333;53.53666667;5
Burgstaaken/Fehmarn;9.156246;53.896146;6
Büsum;8.85;54.13333333;7
etc.

Refresh plots only when plot is focused

Actually during simulation running, the plot is updated everytime the simulator signals a change to the upper gui.
For optimization purposes, the gui should only set the plot as dirty, and update it only when focused, or immediately only for displayed plots.

sqlite db file has wrong name

Parse the application name to add it to the db when loading (right now: only simu 2 is written in the Model Objects Window)

Use strong typed DTree Nodes

To avoid mixing decision trees that evaluate based on time (tstep) with those based on Fishing Grounds (fground), we should use different Abstract Nodes.
See VesselsEvaluators.h

Potential Double Free / Memory leak in MapObjectController

A potential double free / memory leak bug is present in MapObjectController.cpp line 321:

OGRSFDriverRegistrar::Open will return a static allocated pointer that must be released using ReleaseDataSource, and not a shared_ptr as currently done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.