Class PMScenario

java.lang.Object
fr.ign.artiscales.pm.scenario.PMScenario

public class PMScenario extends Object
Object representing a Parcel Manager scenario. Will set files and launch a list of predefined PMStep.
See Also:
scenarioCreation.md
  • Constructor Summary

    Constructors
    Constructor
    Description
    PMScenario​(File jSON)
    Create new Scenario
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Run every step that are present in the stepList
    Get the scenario's list of steps
    static boolean
    If true, will save all the intermediate results in the temporary folder
    static boolean
    Are we exporting the intermediate results ?
    static void
    setDEBUG​(boolean dEBUG)
    If true, will save all the intermediate results in the temporary folder
    static void
    setReuseSimulatedParcels​(boolean reuseSimulatedParcel)
    Sometimes, we want to apply multiple processes on the same input parcels, i.e. in order to check which division process is the best or which urbanFabric parameters.
    static void
    setSaveIntermediateResult​(boolean saveIntermediateResult)
    Set if we save every intermediate results of scenarios, workflows and division processes.
    void
    setStepList​(List<PMStep> stepList)
    Define a new list of steps for the scenario
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PMScenario

      public PMScenario(File jSON) throws IOException
      Create new Scenario
      Parameters:
      jSON - json file containing every scenario's parameter and list of steps
      Throws:
      IOException - tons of geo files reading.
  • Method Details

    • isSaveIntermediateResult

      public static boolean isSaveIntermediateResult()
      Are we exporting the intermediate results ? Will also set this statut to Workflow and Division.
      Returns:
      are we exporting the intermediate results ?
    • setSaveIntermediateResult

      public static void setSaveIntermediateResult(boolean saveIntermediateResult)
      Set if we save every intermediate results of scenarios, workflows and division processes. Will also set this status to Workflow and Division.
      Parameters:
      saveIntermediateResult - if true, export every intermediate results into a temporary folder.
    • isDEBUG

      public static boolean isDEBUG()
      If true, will save all the intermediate results in the temporary folder
      Returns:
      DEBUG
    • setDEBUG

      public static void setDEBUG(boolean dEBUG)
      If true, will save all the intermediate results in the temporary folder
      Parameters:
      dEBUG - true for debug mode
    • setReuseSimulatedParcels

      public static void setReuseSimulatedParcels(boolean reuseSimulatedParcel)
      Sometimes, we want to apply multiple processes on the same input parcels, i.e. in order to check which division process is the best or which urbanFabric parameters.
      Parameters:
      reuseSimulatedParcel - If true, the parcels simulated for each steps will be the input of the next step. If false, the simulation will operate on the input parcel for each steps
    • executeStep

      public void executeStep() throws IOException
      Run every step that are present in the stepList
      Throws:
      IOException - tons of reading and writing
    • getStepList

      public List<PMStep> getStepList()
      Get the scenario's list of steps
      Returns:
      current ordered list of step
    • setStepList

      public void setStepList(List<PMStep> stepList)
      Define a new list of steps for the scenario
      Parameters:
      stepList - new ordered list of steps
    • toString

      public String toString()
      Overrides:
      toString in class Object