dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

Cyme Conversion Init [40h] #149

Closed dpinney closed 10 years ago

dpinney commented 10 years ago

Goal: import Cyme feeder for non-Milsoft co-op customers, and DoE solar project.

Use PG&E data example.

Strategy now is to pass files to PNNL for conversion.

dpinney commented 10 years ago

Attempted conversion with Perl files failed:

Cyme->Glm converter not officially supported. Script calls for two .mdb files, which is suspicious. Using single mdb as both arguments under the assumption that relevant tables are all in the master .mdb. Run into Perl error complaining about ODBC.pm not installed; switched to Strawberry Perl distribution. With new distribution, after satisfying all library prereqs run into following error:

-1811[Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'. at Cyme_to_GridLabD.pl line 491.

Relevant and preceding lines in the perl script:

my $dsnMod="Driver={Microsoft Access Driver (*.mdb)};Dbq=$dbModFile;Uid=Admin;Pwd="; my $db = Win32::ODBC->new($dsnMod) or die( Win32::ODBC::Error() );

Retrying with full path to mdb files.

No luck. Debug code inserted. Appears $dbModFile is the literal string "ARGV[0]". What fubar version of perl executed this? Changed variable definition.

Switching lines 211, 212 from: my $dbDevFile = "$ARGV[0]";
my $dbModFile = "$ARGV[1]";

To: my $dbDevFile = $ARGV[0];
my $dbModFile = $ARGV[1];

Got farther. Mention of devices and lines. Then gave new error:

SELECT DeviceNumber, EquipmentId, Phase, TCCSettingId, NormalFeedingNodeId FROM CYMSWITCH; SQL Error 1: [-3010] [2] [0] "[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2."

No mention of Perl line number. Still no output to the .glm file.

dpinney commented 10 years ago

Attempted conversion with Python failed. Source files available from me.

dpinney commented 10 years ago

Passed to PNNL.