[OS] Common expressions -- user defined variables

Kipp Martin kipp.martin at chicagogsb.edu
Mon Mar 10 13:30:54 EDT 2008


Hi Leo:

> What do you mean by common expressions? Definitions using a := at
> declaration time?

A common expression is a variable defined in terms of other variables. 
Here is an example from

http://www.gerad.ca/~orban/drampl/def-vars.html

var x {1..n};
var v = sum {i in 1..n} x[i]^2;
var u = v-x[n];

In the past I have always called v and u, "definitional variables" and 
have no idea where the term "common expression" comes from.  If you look 
at an AMPL nl file you will see, for example, a line:

  0 0 0 3 0	# common exprs: b,c,o,c1,o1

 From playing around, I think c1 is the number of common expression in 
the constraints and o1 is the number of common expressions in the 
objective function.  I have no idea as to what (b,c,and o) are. There is 
no documentation on this in "Hooking Your Solver to AMPL"  Working with 
the common expressions is tough because of the lack of documentation and 
trying to figure out what the variables are.

Cheers,




> 
> Thanks,
> Leo.
> 
> On Sun, Mar 9, 2008 at 11:40 PM, Kipp Martin <Kipp.Martin at chicagogsb.edu> wrote:
>>  Hello:
>>
>>  The current trunk version (1701) of OS now supports AMPL common
>>  expressions (user-defined variables).  If your nl file has user defined
>>  variables
>>
>>  OSSolverService -solver solverName -nl path/to/file/fileName.nl
>>
>>  should now work instead of throwing an exception.
>>
>>  Please report any problems with this.
>>
>>  Thanks
>>
>>
>>  --
>>  Kipp Martin
>>  Professor of Operations Research
>>  and Computing Technology
>>  Graduate School of Business
>>  University of Chicago
>>  5807 South Woodlawn Avenue
>>  Chicago, IL 60637
>>  773-702-7456
>>  kipp.martin at chicagogsb.edu
>>  http://gsbkip.chicagogsb.edu
>>  http://www.coin-or.org
>>  _______________________________________________
>>  OS mailing list
>>  OS at list.coin-or.org
>>  http://list.coin-or.org/mailman/listinfo/os
>>
>>  >
>>
> 
> 
> 


-- 
Kipp Martin
Professor of Operations Research
and Computing Technology
Graduate School of Business
University of Chicago
5807 South Woodlawn Avenue
Chicago, IL 60637
773-702-7456
kipp.martin at chicagogsb.edu
http://gsbkip.chicagogsb.edu
http://www.coin-or.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list