iut-ibk / DynaMind-ToolBox

DynaMind-ToolBox
www.dance4water.org
GNU General Public License v2.0
9 stars 6 forks source link

json simulation parameter for executable #251

Closed christianurich closed 9 years ago

christianurich commented 9 years ago

Hi @abroxos @csaf4370

Currently setting simulation parameter works with the --replacement thingy. However, this can be quite painful to use when editing more parameter.

I would suggest to add a new --simulation_parameter option that based on a json string or file sets simulation parameter

The json file would look something like this.

This would also help to simplify the storing of simulation parameter in the simulation database

Would do you think?

{"module_name": 
      {"parameter": 
             {"width": 125, 
              "length": 250}
       }, 
"streetblock": 
      {"parameter": 
             {"width": 125, 
              "length": 250}
       "filter": {...
                   }
       }, 
  "parcel": 
       {"parameter":
             {"width": 15}
}}
abroxos commented 9 years ago

Please check --parameter. Is that enough ?

Allowed options:
  --help                produce help message
  --input-file arg      set simulation file
  --replace arg         replace string in input file: ([STRING],[STRING];)*
  --repeat arg          repeat simulation
  --cpfile arg          Copy generated files: ([SOURCEFILE],[TARGETPATH]DMITERA
                        TION[FILENAME];)* 
  --verbose             verbose output
  --sqlquerystack arg   sql query cache size
  --blockwriting arg    sql write block size
  --loglevel arg        logger level 0-3 (Debug-Standard-Warning-Error)
  --logpath arg         Save path for log file
  --ompthreads arg      number of threads used by omp
  --settings arg        set an environment variable
  --show-settings       show environment variables
  --parameter arg       overwrites a parameter: ([modulename].[parametername]=[
                        value];
  --parameterlist       shows the available parameters for this file
  --version             shows the current version of the dynamind core
  --license             shows used license of the dynamind core
  --author              shows the names of the core programmers
christianurich commented 9 years ago

I overlocked that feature, it was not in the docu (could someone please update it)

That might work, I'll check.

christianurich commented 9 years ago

can be done with as suggested. Still need to add a parameter for filters later though