-
Notifications
You must be signed in to change notification settings - Fork 4
Run Powerworld Executible
Russell Bent edited this page Nov 17, 2017
·
22 revisions
- Download and install the java 7 or later run time environment.
-
Windows
- The windows installation of java does not typically update PATH variable with the location of the java executable.
- To enable command line execution of java, see http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path
-
Mac
brew install Caskroom/cask/java
-
Linux
sudo apt install java-common sudo apt-get install default-jre
- Install a git command line tool
-
Linux
sudo apt-get install git
-
Get the Powerworld jar file
git clone https://github.com/lanl-ansi/micot-powerworld.jar.git
-
Follow the DOCM and Powerworld installation instructions
-
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
-
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.
{
"$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",
"gov.lanl.micot.infrastructure.ep.model.ShuntCapacitor",
"gov.lanl.micot.infrastructure.ep.model.SwitchedShuntCapacitor"
]
},
"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": [
"STATUS",
"VOLTAGE_PU",
"PHASE_ANGLE",
"REACTIVE_GENERATION",
"REAL_GENERATION",
"REACTIVE_LOAD",
"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"
]
}
}
}
}
}
}
}
}
Some key additional information about the types of data that can go into the fields of the input JSON specification.
- component_type This is used to indicate what type of electric power component is to be modified. Choices are
- Branch: gov.lanl.micot.infrastructure.ep.model.ElectricPowerFlowConnection
- Bus: gov.lanl.micot.infrastructure.ep.model.Bus
- Generator: gov.lanl.micot.infrastructure.ep.model.Generator
- Load: gov.lanl.micot.infrastructure.ep.model.Load
- Shunt: gov.lanl.micot.infrastructure.ep.model.ShuntCapacitor
- Switched Shunt: gov.lanl.micot.infrastructure.ep.model.SwitchedShuntCapacitor
- id is used to indicate the attribute of the power component used to identify it. This executable currently only supports "POWERWORLD_LEGACY_ID" for identifying powerworld components.
- id_value Under powerworld, bus ids have the form a single string. Generator and loads have ids of the form "(bus_id,load_id)". Branches have ids of the form "(bus_i_id,bus_j_id,circuit_id)".
- id_type is used to indicate the type of data used to store the id value (string, double, integer or boolean)
- modification_key is used to indicated what attribute of an electric power component that will be modified.
- STATUS: On/off status for a component
- VOLTAGE_PU: Voltage magnitude of a bus in PU
- PHASE_ANGLE: Voltage angle of a bus
- REACTIVE_GENERATION: Reactive power output of a generator
- REAL_GENERATION: Real power output of a generator
- REACTIVE_LOAD: Reactive power consumption of a load
- REAL_LOAD: Real power consumption of a load
- modification_type indicates the type of data in the modification (string, double, integer, or boolean)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Run Powerworld output JSON schema",
"description": "These schema describes the output fields for the JSON schema used by the powerworld application",
"properties": {
"total_time": {
"type": "double",
"description": "The total time in CPU minutes spent running powerworld"
},
"simulation_time": {
"type": "double",
"description": "The time in CPU minutes spent running powerworld's AC simulation"
},
"simulation_status": {
"type": "string",
"description": "The status of the simulation",
"enum": [
"CONVERGED_SOLUTION",
"NON_CONVERGED_SOLUTION",
"RESTART_SOLUTION",
"ERROR_SOLUTION"
]
},
"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"
},
"base_kv": {
"type": "double",
"description": "The base voltage of the bus in KV"
},
"is_ac": {
"type": "boolean",
"description": "Whether or not the bus is and AC or DC bus"
},
"owner": {
"type": "string",
"description": "The owner of the bus (AC buses only)"
},
"name": {
"type": "string",
"description": "The name of the bus"
},
"va": {
"type": "double",
"description": "The voltage angle for a bus in degrees (AC buses only)"
},
"vm": {
"type": "double",
"description": "The voltage magnitude for a bus in kv"
},
"vm_min": {
"type": "double",
"description": "The minimum voltage magnitude for a bus in kv (AC buses only)"
},
"vm_max": {
"type": "double",
"description": "The maximum voltage magnitude for a bus in kv (AC buses only)"
},
"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"
},
"base_kv": {
"type": "double",
"description": "The maximum kv on either side of the 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"
},
"rating": {
"type": "double/string",
"description": "MVA normal rating for the branch. Keyword infinity used for infinite rating"
},
"bus_i": {
"type": "string",
"description": "From bus id"
},
"bus_j": {
"type": "string",
"description": "To bus id"
},
"status": {
"type": "boolean",
"description": "On/off status for the branch"
}
}
}
},
"tt_dc_line": {
"type": "array",
"description": "This block describes DC two terminal line data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single two terminal line",
"properties": {
"tt_dc_line_i": {
"type": "string",
"description": "The powerworld identifier for a dc line"
},
"name": {
"type": "string",
"description": "Name of the dc line"
},
"mw_i": {
"type": "double",
"description": "MW at the from bus of the line (inverter)"
},
"mw_j": {
"type": "double",
"description": "MW at the from bus of the line (rectifier)"
},
"mvar_i": {
"type": "double",
"description": "MVAR at the from bus of the line (inverter)"
},
"mvar_j": {
"type": "double",
"description": "MVAR at the from bus of the line (rectifier)"
},
"bus_i": {
"type": "string",
"description": "From bus id"
},
"bus_j": {
"type": "string",
"description": "To bus id"
},
"status": {
"type": "boolean",
"description": "On/off status for the line"
}
}
}
},
"mt_dc_line": {
"type": "array",
"description": "This block describes DC two terminal line data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single multi terminal line",
"properties": {
"mt_dc_line_i": {
"type": "string",
"description": "The powerworld identifier for a dc line"
},
"name": {
"type": "string",
"description": "Name of the dc line"
},
"mw": {
"type": "double",
"description": "MW on the line"
},
"mvar": {
"type": "double",
"description": "MVAR on the line"
},
"bus_i": {
"type": "string",
"description": "From bus id (AC bus)"
},
"bus_j": {
"type": "string",
"description": "To bus id (DC bus)"
},
"status": {
"type": "boolean",
"description": "On/off status for the line"
}
}
}
},
"vsc_dc_line": {
"type": "array",
"description": "This block describes DC voltage source line data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single voltage source line",
"properties": {
"vsc_dc_line_i": {
"type": "string",
"description": "The powerworld identifier for a dc line"
},
"name": {
"type": "string",
"description": "Name of the dc line"
},
"mw_i": {
"type": "double",
"description": "MW at the from bus of the line"
},
"mw_j": {
"type": "double",
"description": "MW at the from bus of the line"
},
"mvar_i": {
"type": "double",
"description": "MVAR at the from bus of the line"
},
"mvar_j": {
"type": "double",
"description": "MVAR at the from bus of the line"
},
"bus_i": {
"type": "string",
"description": "From bus id"
},
"bus_j": {
"type": "string",
"description": "To bus id"
},
"status": {
"type": "boolean",
"description": "On/off status for the line"
}
}
}
},
"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."
},
"mw_min": {
"type": "double",
"description": "The minimum MW output for a generator."
},
"mw_max": {
"type": "double",
"description": "The maximum MW output for a generator."
},
"mvar": {
"type": "double",
"description": "The MVAR output for a generator."
},
"mvar_min": {
"type": "double",
"description": "The minimum MVAR output for a generator."
},
"mvar_max": {
"type": "double",
"description": "The maximum MVAR output for a generator."
},
"bus": {
"type": "string",
"description": "The bus of the generator"
},
"status": {
"type": "boolean",
"description": "On/off status for a generator"
}
}
}
},
"fixed_shunt": {
"type": "array",
"description": "This block describes shunt data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single shunt",
"properties": {
"shunt_i": {
"type": "string",
"description": "The powerworld identifier for a shunt"
},
"bs": {
"type": "double",
"description": "The shunt susceptance in MVAR"
},
"gs": {
"type": "double",
"description": "The shunt conductance in MW"
},
"bus": {
"type": "string",
"description": "The bus of the shunt"
}
"status": {
"type": "boolean",
"description": "On/off status for a shunt"
}
}
}
},
"switched_shunt": {
"type": "array",
"description": "This block describes shunt data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single shunt",
"properties": {
"shunt_i": {
"type": "string",
"description": "The powerworld identifier for a shunt"
},
"bs": {
"type": "double",
"description": "The shunt susceptance in MVAR"
},
"gs": {
"type": "double",
"description": "The shunt conductance in MW"
},
"bus": {
"type": "string",
"description": "The bus of the shunt"
}
"status": {
"type": "boolean",
"description": "On/off status for a shunt"
}
}
}
},
"transformer": {
"type": "array",
"description": "This block describes transformer 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"
},
"base_kv_i": {
"type": "double",
"description": "The kv on the i side"
},
"base_kv_i": {
"type": "double",
"description": "The kv on the j side"
},
"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"
},
"ratio": {
"type": "double",
"description": "Transformer tap ratio"
},
"shift": {
"type": "double",
"description": "Transformer phase shift"
},
"rating": {
"type": "double/string",
"description": "MVA normal rating for the branch. Keyword infinity used for infinite rating"
},
"bus_i": {
"type": "string",
"description": "From bus id"
},
"3_winding_i": {
"type": "string",
"description": "optional id of the three winding transformer of this transformer"
},
"bus_j": {
"type": "string",
"description": "To bus id"
},
"status": {
"type": "boolean",
"description": "On/off status for the branch"
}
}
}
},
"three_winding_transformer": {
"type": "array",
"description": "This block describes three winding transformer data solutions from a power flow solve",
"items": {
"type": "object",
"description": "Each entry here contains information about a single three winding transformer",
"properties": {
"3_winding_i": {
"type": "string",
"description": "The powerworld identifier for a three winding transformer"
},
"bus_primary": {
"type": "string",
"description": "Primary bus id"
},
"bus_secondary": {
"type": "string",
"description": "Secondary bus id"
},
"bus_tertiary": {
"type": "string",
"description": "Tertiary bus id"
},
"bus_star": {
"type": "string",
"description": "Star bus id"
}
}
}
},
"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."
},
"mw_min": {
"type": "double",
"description": "The minimum MW input for a load."
},
"mw_max": {
"type": "double",
"description": "The maximum MW input for a load."
},
"mvar": {
"type": "double",
"description": "The MVAR input for a load."
},
"mvar_min": {
"type": "double",
"description": "The minimum MVAR input for a load."
},
"mvar_max": {
"type": "double",
"description": "The maximum MVAR input for a load."
},
"bus": {
"type": "string",
"description": "The bus of the load."
},
"status": {
"type": "boolean",
"description": "On/off status for a load"
}
}
}
}
}
}