Skip to content

Instantly share code, notes, and snippets.

@qheuristics
Last active September 4, 2018 15:47
Show Gist options
  • Save qheuristics/0a890b8bdf899c226690065042537196 to your computer and use it in GitHub Desktop.
Save qheuristics/0a890b8bdf899c226690065042537196 to your computer and use it in GitHub Desktop.
acud console session
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# acud console session demo"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are mainly two ways to run an acud simulation:\n",
"- through the command line, or\n",
"- from within a Python interpreter session/Python script by importing acud as a Python package\n",
"\n",
"This notebook emulates using acud through the command prompt. Think of it as a recording of a quasi-console session; if you paste the code below into a command prompt, remember to skip the exclamation mark preceding some of the commands below (this preceding exclamation mark -as in !ad- is only required to run these commands from within the notebook)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"acud 0.0.1-92-g0536826\n",
"Capacity expansion, unit commitment and dispatch simulation engine\n",
"Released under MIT license\n"
]
}
],
"source": [
"!ad --version"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Usage: ad [OPTIONS] COMMAND [ARGS]...\n",
"\n",
"\n",
"\n",
" acud: capacity expansion, unit commitment and\n",
"\n",
" dispatch simulation engine\n",
"\n",
"\n",
"\n",
"Options:\n",
"\n",
" --version Display version.\n",
"\n",
" --help Show this message and exit.\n",
"\n",
"\n",
"\n",
"Commands:\n",
"\n",
" check Check if model files exist.\n",
"\n",
" dry Dry run model.\n",
"\n",
" run Run model simulation.\n",
"\n",
" schema Display input data schemas.\n",
"\n",
" validate Validate input data.\n",
"\n",
" xtra Extrapolate solution.\n",
"\n"
]
}
],
"source": [
"!ad --help"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Usage: ad run [OPTIONS] RUN_CONFIG\n",
"\n",
"\n",
"\n",
" Execute the given RUN_CONFIG run configuration\n",
"\n",
" file.\n",
"\n",
"\n",
"\n",
"Options:\n",
"\n",
" --no-xtra Skip solution\n",
"\n",
" extrapolation.\n",
"\n",
" --debug Print debug information\n",
"\n",
" when encountering\n",
"\n",
" errors.\n",
"\n",
" --pdb If used together with\n",
"\n",
" --debug, drop into\n",
"\n",
" interactive debugger on\n",
"\n",
" encountering errors.\n",
"\n",
" --profile Run through cProfile.\n",
"\n",
" --profile_filename TEXT Filename to save\n",
"\n",
" profile to if enabled\n",
"\n",
" --profile.\n",
"\n",
" --help Show this message and\n",
"\n",
" exit.\n",
"\n"
]
}
],
"source": [
"!ad run --help"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Case 101"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"C:\\Users\\Guillermo\\Documents\\_pad\\BD\\acud demo\\201808\\101\n"
]
}
],
"source": [
"cd 101"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"run101.yml found\n",
"model101.yml found\n",
"default.yml found\n",
"csv/buses.csv found\n",
"csv/generators.csv found\n",
"acud dry run starting at 2018-09-03 19:39:46\n",
"\n",
"Model name: 101\n",
"Run name: 101\n",
"Begin: 2012-01-01 00:00\n",
"End: 2012-01-10 23:00\n",
"\n",
"acud complete. Elapsed: 0.6 seconds (time at exit: 2018-09-03 19:39:47)\n"
]
}
],
"source": [
"!ad dry run101.yml"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.03 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.03 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.02 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.05\n",
"Time (Wallclock seconds): 0.05\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.08 (Wallclock seconds): 0.08\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.00 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.00 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.00 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.00 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.00 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.05\n",
"Time (Wallclock seconds): 0.05\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.02 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.02 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.00 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.03 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.03 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.01 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.05\n",
"Time (Wallclock seconds): 0.05\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.06 (Wallclock seconds): 0.06\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.02 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.02 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.00 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.03 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.03 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.01 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.05\n",
"Time (Wallclock seconds): 0.05\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.06 (Wallclock seconds): 0.06\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.02 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.03 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.01 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.01 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.02 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.02 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.02 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.02 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.02 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.00 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.02 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.05 (Wallclock seconds): 0.05\n",
"\n",
"Welcome to the CBC MILP Solver \n",
"Version: 2.8.8 \n",
"Build Date: Jan 27 2014 \n",
"\n",
"command line - C:\\Miniconda\\envs\\julab\\lib\\site-packages\\pulp\\solverdir\\cbc.exe 13020-pulp.mps ratio 0.0001 branch printingOptions rows solution 13020-pulp.sol (default strategy 1)\n",
"At line 2 NAME MODEL\n",
"At line 3 ROWS\n",
"At line 3202 COLUMNS\n",
"At line 10298 RHS\n",
"At line 13496 BOUNDS\n",
"At line 13622 ENDATA\n",
"Problem MODEL has 3197 rows, 619 columns and 6471 elements\n",
"Coin0008I MODEL read with 0 errors\n",
"ratioGap was changed from 0 to 0.0001\n",
"Continuous objective value is 1.90132e+008 - 0.00 seconds\n",
"Cgl0004I processed model has 96 rows, 168 columns (48 integer) and 384 elements\n",
"Cbc0038I Pass 1: suminf. 0.00000 (0) obj. 1.90134e+008 iterations 5\n",
"Cbc0038I Solution found of 1.90134e+008\n",
"Cbc0038I Before mini branch and bound, 46 integers at bound fixed and 73 continuous\n",
"Cbc0038I Full problem 96 rows 168 columns, reduced to 27 rows 48 columns\n",
"Cbc0038I Mini branch and bound improved solution from 1.90134e+008 to 1.90132e+008 (0.03 seconds)\n",
"0 Obj 1.9013223e+008\n",
"End of values pass after 2 iterations\n",
"2 Obj 1.9013223e+008\n",
"Perturbing problem by 0.001 % of 28.317888 - largest nonzero change 0 (% 0) - largest zero change 3.1849471e-006\n",
"2 Obj 1.9013223e+008\n",
"Optimal - objective value 1.9013223e+008\n",
"Cbc0038I After 0.03 seconds - Feasibility pump exiting with objective of 1.90132e+008 - took 0.01 seconds\n",
"Cbc0012I Integer solution of 1.9013223e+008 found by feasibility pump after 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0001I Search completed - best objective 190132225.0000001, took 0 iterations and 0 nodes (0.03 seconds)\n",
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost\n",
"Cuts at root node changed objective from 1.90132e+008 to 1.90132e+008\n",
"Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)\n",
"\n",
"Result - Optimal solution found\n",
"\n",
"Objective value: 190132225.00000009\n",
"Enumerated nodes: 0\n",
"Total iterations: 0\n",
"Time (CPU seconds): 0.03\n",
"Time (Wallclock seconds): 0.03\n",
"\n",
"Option for printingOptions changed from normal to rows\n",
"Total time (CPU seconds): 0.06 (Wallclock seconds): 0.06\n",
"\n",
"run101.yml found\n",
"model101.yml found\n",
"default.yml found\n",
"csv/buses.csv found\n",
"csv/generators.csv found\n",
"acud run starting at 2018-09-03 19:39:54\n",
"\n",
"Model name: 101\n",
"Run name: 101\n",
"Begin: 2012-01-01 00:00\n",
"End: 2012-01-10 23:00\n",
"Solved 1 of 10 steps.\n",
"\n",
"Solved 2 of 10 steps.\n",
"\n",
"Solved 3 of 10 steps.\n",
"\n",
"Solved 4 of 10 steps.\n",
"\n",
"Solved 5 of 10 steps.\n",
"\n",
"Solved 6 of 10 steps.\n",
"\n",
"Solved 7 of 10 steps.\n",
"\n",
"Solved 8 of 10 steps.\n",
"\n",
"Solved 9 of 10 steps.\n",
"\n",
"Solved 10 of 10 steps.\n",
"\n",
"\n",
"acud run complete. Elapsed: 7.3 seconds (time at exit: 2018-09-03 19:40:02)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2018-09-03 19:39:54 Started loading case\n",
"2018-09-03 19:39:55 Completed loading case\n",
"2018-09-03 19:39:55 Started preparing model instance\n",
"2018-09-03 19:39:55 Completed preparing model instance\n",
"2018-09-03 19:39:55 Started formulating model\n",
"2018-09-03 19:39:55 Started solving problem\n",
"2018-09-03 19:39:56 Completed solving problem\n",
"2018-09-03 19:39:56 Started retrieving solution\n",
"2018-09-03 19:39:56 Completed retrieving solution\n",
"2018-09-03 19:39:56 Started preparing model instance\n",
"2018-09-03 19:39:56 Completed preparing model instance\n",
"2018-09-03 19:39:56 Started formulating model\n",
"2018-09-03 19:39:56 Started solving problem\n",
"2018-09-03 19:39:56 Completed solving problem\n",
"2018-09-03 19:39:56 Started retrieving solution\n",
"2018-09-03 19:39:56 Completed retrieving solution\n",
"2018-09-03 19:39:56 Started preparing model instance\n",
"2018-09-03 19:39:56 Completed preparing model instance\n",
"2018-09-03 19:39:56 Started formulating model\n",
"2018-09-03 19:39:57 Started solving problem\n",
"2018-09-03 19:39:57 Completed solving problem\n",
"2018-09-03 19:39:57 Started retrieving solution\n",
"2018-09-03 19:39:57 Completed retrieving solution\n",
"2018-09-03 19:39:57 Started preparing model instance\n",
"2018-09-03 19:39:57 Completed preparing model instance\n",
"2018-09-03 19:39:57 Started formulating model\n",
"2018-09-03 19:39:57 Started solving problem\n",
"2018-09-03 19:39:57 Completed solving problem\n",
"2018-09-03 19:39:57 Started retrieving solution\n",
"2018-09-03 19:39:57 Completed retrieving solution\n",
"2018-09-03 19:39:57 Started preparing model instance\n",
"2018-09-03 19:39:57 Completed preparing model instance\n",
"2018-09-03 19:39:57 Started formulating model\n",
"2018-09-03 19:39:58 Started solving problem\n",
"2018-09-03 19:39:58 Completed solving problem\n",
"2018-09-03 19:39:58 Started retrieving solution\n",
"2018-09-03 19:39:58 Completed retrieving solution\n",
"2018-09-03 19:39:58 Started preparing model instance\n",
"2018-09-03 19:39:58 Completed preparing model instance\n",
"2018-09-03 19:39:58 Started formulating model\n",
"2018-09-03 19:39:59 Started solving problem\n",
"2018-09-03 19:39:59 Completed solving problem\n",
"2018-09-03 19:39:59 Started retrieving solution\n",
"2018-09-03 19:39:59 Completed retrieving solution\n",
"2018-09-03 19:39:59 Started preparing model instance\n",
"2018-09-03 19:39:59 Completed preparing model instance\n",
"2018-09-03 19:39:59 Started formulating model\n",
"2018-09-03 19:39:59 Started solving problem\n",
"2018-09-03 19:39:59 Completed solving problem\n",
"2018-09-03 19:39:59 Started retrieving solution\n",
"2018-09-03 19:39:59 Completed retrieving solution\n",
"2018-09-03 19:39:59 Started preparing model instance\n",
"2018-09-03 19:39:59 Completed preparing model instance\n",
"2018-09-03 19:39:59 Started formulating model\n",
"2018-09-03 19:40:00 Started solving problem\n",
"2018-09-03 19:40:00 Completed solving problem\n",
"2018-09-03 19:40:00 Started retrieving solution\n",
"2018-09-03 19:40:00 Completed retrieving solution\n",
"2018-09-03 19:40:00 Started preparing model instance\n",
"2018-09-03 19:40:00 Completed preparing model instance\n",
"2018-09-03 19:40:00 Started formulating model\n",
"2018-09-03 19:40:00 Started solving problem\n",
"2018-09-03 19:40:01 Completed solving problem\n",
"2018-09-03 19:40:01 Started retrieving solution\n",
"2018-09-03 19:40:01 Completed retrieving solution\n",
"2018-09-03 19:40:01 Started preparing model instance\n",
"2018-09-03 19:40:01 Completed preparing model instance\n",
"2018-09-03 19:40:01 Started formulating model\n",
"2018-09-03 19:40:01 Started solving problem\n",
"2018-09-03 19:40:01 Completed solving problem\n",
"2018-09-03 19:40:01 Started retrieving solution\n",
"2018-09-03 19:40:01 Completed retrieving solution\n",
"2018-09-03 19:40:02 log file at run101.log\n"
]
}
],
"source": [
"!ad run run101.yml"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Case 102"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cd 102"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!ad dry run102.yml"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.15"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment