writing data to a file

View: New views
6 Messages — Rating Filter:   Alert me  

writing data to a file

by Yasin053 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I would like to write the values of a vector to a file using the below code.

table value_at_each_path OUT "ODBC" "C:\AMPL112\Lagr_result.csv":
        [PATH], {j in PATH} value_at_each_path[j] ~ value_at_each_path;
write table value_at_each_path;

However, I receive the below error message. Do you have any suggestions on how to write data to a file?
Thanks,

Error at _cmdno 4.68976e+06 executing "write_table" command
(file LgrAu_27.run, line 722, offset 35905):

        Error writing table value_at_each_path with table handler odbc:
        DROP TABLE value_at_each_path failed.
        Is another application using C:\AMPL112\Lagr_result.csv?

[AMPL 2908] Re: writing data to a file

by Saber Jalilzadeh-Galaeh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello!

 

You could write your table via "log" file.

Something like this:

 

option log_file 'value_at_each_path';

 

 

Saber




From: Yasin053 <yasin053@...>
To: ampl@...
Sent: Fri, October 23, 2009 8:09:34 AM
Subject: [AMPL 2907] writing data to a file



Hi,
I would like to write the values of a vector to a file using the below code.

table value_at_each_path OUT "ODBC" "C:\AMPL112\Lagr_result.csv":
    [PATH], {j in PATH} value_at_each_path[j] ~ value_at_each_path;
write table value_at_each_path;

However, I receive the below error message. Do you have any suggestions on
how to write data to a file?
Thanks,

Error at _cmdno 4.68976e+06 executing "write_table" command
(file LgrAu_27.run, line 722, offset 35905):

    Error writing table value_at_each_path with table handler odbc:
    DROP TABLE value_at_each_path failed.
    Is another application using C:\AMPL112\Lagr_result.csv?

--
View this message in context: http://www.nabble.com/writing-data-to-a-file-tp26020839p26020839.html
Sent from the AMPL mailing list archive at Nabble.com.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [AMPL 2908] Re: writing data to a file

by Yasin053 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can you also provide the full set of lines after that line? For instance, should I add something like "write log_file value_at_each_path"? (This did not not work.)
Thanks,


Saber Jalilzadeh-Galaeh wrote:
Hello!
 
You could write your table via "log" file.
Something like this:
 
option log_file 'value_at_each_path';
 
 
Saber




________________________________
From: Yasin053 <yasin053@gmail.com>
To: ampl@googlegroups.com
Sent: Fri, October 23, 2009 8:09:34 AM
Subject: [AMPL 2907] writing data to a file



Hi,
I would like to write the values of a vector to a file using the below code.

table value_at_each_path OUT "ODBC" "C:\AMPL112\Lagr_result.csv":
    [PATH], {j in PATH} value_at_each_path[j] ~ value_at_each_path;
write table value_at_each_path;

However, I receive the below error message. Do you have any suggestions on
how to write data to a file?
Thanks,

Error at _cmdno 4.68976e+06 executing "write_table" command
(file LgrAu_27.run, line 722, offset 35905):

    Error writing table value_at_each_path with table handler odbc:
    DROP TABLE value_at_each_path failed.
    Is another application using C:\AMPL112\Lagr_result.csv?

--
View this message in context: http://www.nabble.com/writing-data-to-a-file-tp26020839p26020839.html
Sent from the AMPL mailing list archive at Nabble.com.




     
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@googlegroups.com
To unsubscribe from this group, send email to ampl+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

[AMPL 2910] Excel Table data file problem

by Gideon-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I tried running the code below in AMPL/CPLEX and i got the error:

EROR Message:

ILOG AMPL 10.100
AMPL Version 20070505 (Linux 2.6.9-5.ELsmp)
Error at _cmdno 2 executing "read_table" command
( line 13, offset 367):

        Error reading table A:
        no acceptable table handler found.
$

Code
table A "ODBC" "TABLES/me.xls": [], A IN;
read table A;

I am not exactly sure if it's this is related to the version of excel i
am using or there are some table handlers i need to download.
I will appreciate if anyone has an idea of how to go about this?

/Gi

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


[AMPL 2913] Re: Excel Table data file problem

by Robert Fourer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




The Excel table handler only works under MS Windows.

Bob Fourer
4er@...


> -----Original Message-----
> From: ampl@... [mailto:ampl@...]
> On Behalf Of Gideon [gideon.mbiydzenyuy@...]
> Sent: Friday, October 23, 2009 4:19 AM
> To: ampl@...
> Subject: [AMPL 2910] Excel Table data file problem
>
>
> Hi,
> I tried running the code below in AMPL/CPLEX and i got the error:
>
> EROR Message:
>
> ILOG AMPL 10.100
> AMPL Version 20070505 (Linux 2.6.9-5.ELsmp)
> Error at _cmdno 2 executing "read_table" command
> ( line 13, offset 367):
>
>         Error reading table A:
>         no acceptable table handler found.
> $
>
> Code
> table A "ODBC" "TABLES/me.xls": [], A IN;
> read table A;
>
> I am not exactly sure if it's this is related to the version of excel i
> am using or there are some table handlers i need to download.
> I will appreciate if anyone has an idea of how to go about this?
>
> /Gi
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


[AMPL 2914] Re: Excel Table data file problem

by wgroup :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Unsubscribe del Groups "AMPL Modeling Language" group.

Ya no deseo que me envien comentarios sobre AMPL
Gracias

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---