[Os-project-managers] OSrL problem
Horand Gassmann
Horand.Gassmann at Dal.Ca
Fri Aug 31 16:47:54 EDT 2012
Horand Gassmann <Horand.Gassmann at dal.ca> wrote:
> Hi guys,
>
> I think we may have a problem with the OSrL schema.
>
> I am trying to write code to put stuff back into AMPL. Ipopt, for
> instance, returns two arrays ipopt_zL_out and ipopt_zU_out that I
> want to return into AMPL. Both arrays are indexed over the
> variables,and they are real valued. Presumably they would be
> returned in the OSrL file as <other> elements in <variable> (once
> we implement that), and then there is an ASL method that we can put
> them into.
>
> In OSAmplClient I would therefore go through all the <other>
> elements and pull out the names, which I would treat as suffixes for
> AMPL, and I would call the ASL method to return them.
>
> But there are actually two such methods, suf_iput and suf_rput, for
> integer and for real valued results. The problem is that we do not
> record the type, and so in general I would not know which method to
> use. There ought to be a field "type" in the attribute list of the
> <other> elements. Do you agree?
There is actually an even nastier "gotcha"! With the solver options we
can ask the user who prepares the .osol file to use a type that the
solver can understand.
That is, when we send the "tol" option to Ipopt, we can insist that
the user declares it as
<solverOption name="tol" solver="ipopt" type="numeric" value="1.e-9"/>
with type="numeric" (and not type="real" or type="double") because
that is what Ipopt calls it.
But when we get stuff back from the solver and have to pass it back
into an AML, we are stuck. *We* have to know what the AML calls the
type; we cannot ask Ipopt to call it "r", because we have no way (and
no reason) to tell Ipopt that the input file was generated by AMPL. Do
you have any clever ideas about that?
Cheers
gus
-------------------------------------------------------
Horand I. Gassmann, Professor
School of Business Administration, Dalhousie University
6100 University Avenue, PO Box 15000
Halifax, Nova Scotia, Canada, B3H 4R2
ph. (902) 494-1844
fax (902) 494-1107
http://myweb.dal.ca/gassmann/
More information about the Os-project-managers
mailing list