Skip to content

Run Powerworld Executible

Russell Bent edited this page Apr 20, 2017 · 22 revisions

Run Powerworld Executable Installation

  1. Download and install the java 7 or later run time environment.
  1. Install a git command line tool
  • Linux
    sudo apt-get install git
    
  1. Get the Powerworld jar file

    git clone https://github.com/lanl-ansi/micot-powerworld.jar.git
    
  2. Follow the DOCM and Powerworld installation instructions

  3. Test the executible using the examples included in the git repository checked out in step 4 (using the micot-powerworld.jar file that was checked out)

    java -jar micot-powerworld.jar -p test_data/ep/powerworld/B7OPF.RAW -m application_data/powerworld/config-powerworld-mods-only.json
    
  4. The -p is a required field that points at the location of the power flow model. Supported formats include RAW and powerworld binaries. -m is an optional field that points at an input json file that modifies the power flow model. Supported functions are listed in the next sections. The output is provided in standard out as JSON format.

JSON Input Specifications

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Run Powerworld JSON schema",
  "description": "These schema describes the fields for the JSON schema used by the powerworld application to modify power component data",
  "properties": {
    "modifications": {
      "type": "array",
      "description": "This block describes the necessary data for specifying a modification",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single modification",
        "properties": {
          "component_type": {
            "type": "string",
            "description": "The type of component to modify",
            "enum": [ 
                      "gov.lanl.micot.infrastructure.ep.model.ElectricPowerFlowConnection", 
                      "gov.lanl.micot.infrastructure.ep.model.Bus", 
                      "gov.lanl.micot.infrastructure.ep.model.Generator", 
                      "gov.lanl.micot.infrastructure.ep.model.Load"
                    ]  
          },
          "id": {
            "type": "object",
            "description": "JSON block for identifying a component",
            "properties": {
              "id_key": {
                "type": "string",
                "description": "The attribute used to identify the component",
                "enum": [ 
                          "POWERWORLD_LEGACY_ID" 
                        ]
              },
              "id_value": {
                "description": "The unique identifier"
              },
              "id_type": {
                "type": "string",
                "description": "The data type used for identifying a component",
                "enum": [ 
                          "string",
                          "double",
                          "integer",
                          "boolean" 
                        ]
              }  
            }
          },
 
         "modification": {
            "type": "object",
            "description": "JSON block for specifying the modification",
            "properties": {
              "modification_key": {
                "type": "string",
                "description": "The attribute to modify of the component",
                "enum": [ 
                          "DESIRED_STATUS",
                          "VOLTAGE_PU",
                          "PHASE_ANGLE",
                          "ACTUAL_REACTIVE_GENERATION",
                          "ACTUAL_REAL_GENERATION",
                          "ACTUAL_REACTIVE_LOAD",
                          "ACTUAL_REAL_LOAD"
                        ]
              },
              "modification_value": {
                "description": "The value of the modification"
              },
              "modification_type": {
                "type": "string",
                "description": "The data type of the modification",
                "enum": [ 
                          "string",
                          "double",
                          "integer",
                          "boolean" 
                        ]
              }  
            }
          }
        }
      }
    }
  }
}

Supported Modification Inputs

Some key additional information about the types of data that can go into the fields of the input JSON specification.

  1. component_type

JSON Output Specifications

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Run Powerworld output JSON schema",
  "description": "These schema describes the outpur fields for the JSON schema used by the powerworld application",
  "properties": {
    "bus": {
      "type": "array",
      "description": "This block describes bus data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single bus",
        "properties": {
          "bus_i": {
            "type": "string",
            "description": "The powerworld identifier for a bus"
          },
          "vm": {
            "type": "double",
            "description": "The voltage magnitude for a bus"
          },
          "va": {
            "type": "double",
            "description": "The voltage angle for a bus"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a bus"
          }
        }
      }
    },

   "branch": {
      "type": "array",
      "description": "This block describes branch data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single branch",
        "properties": {
          "branch_i": {
            "type": "string",
            "description": "The powerworld identifier for a branch"
          },
          "mw_i": {
            "type": "double",
            "description": "MW at the from bus of the branch"
          },
          "mw_j": {
            "type": "double",
            "description": "MW at the from bus of the branch"
          },
          "mvar_i": {
            "type": "double",
            "description": "MVAR at the from bus of the branch"
          },
          "mvar_j": {
            "type": "double",
            "description": "MVAR at the from bus of the branch"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a bus"
          }
        }
      }
    },

    "gen": {
      "type": "array",
      "description": "This block describes generator data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single generator",
        "properties": {
          "gen_i": {
            "type": "string",
            "description": "The powerworld identifier for a generator"
          },
          "mw": {
            "type": "double",
            "description": "The MW output for a generator"
          },
          "mvar": {
            "type": "double",
            "description": "The MVAR output for a generator"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a generator"
          }
        }
      }
    },


    "load": {
      "type": "array",
      "description": "This block describes load data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single load",
        "properties": {
          "load_i": {
            "type": "string",
            "description": "The powerworld identifier for a load"
          },
          "mw": {
            "type": "double",
            "description": "The MW input for a load"
          },
          "mvar": {
            "type": "double",
            "description": "The MVAR input for a load"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a load"
          }
        }
      }
    }
  }
}
Clone this wiki locally