[OS] linear constraint terms in OSInstace API
Kipp Martin
Kipp.Martin at ChicagoGSB.edu
Mon Feb 11 09:53:03 EST 2008
Hi Susana:
>
> I am using OSInstace API to represent my nonlinear problem.
> What is exactly the meaning of <start> when defining the linear constraint terms in c++ ?
We built the OSInstance API to efficiently represent the constraint
matrix of linear programs, or the linear part of a nonlinear program.
Let's say I have two constraints:
x0 + 10.5x02 + 11.7x12 + 3*x0*x1 <= 25
ln(x0*x1) + 7.5x0 + 5.25x1 >= 10
I have three linear terms in these two constraints. I would represent
the three linear terms by
<start>
<el>0</el><el>2</el><el>3</el>
</start>
<rowIdx>
<el>0</el><el>1</el><el>1</el>
</rowIdx>
<value>
<el>1.</el><el>7.5</el><el>5.25</el>
</value>
In this case we are storing the linear terms by columns (hence the
<rowIdx>). The <start> indicates the start of the nonzero elements. So
variable x0 starts at position 0. It has two coefficients 1 and 7.5.
Then variable x1 starts in position 2 and has one term 5.25. The number
of starts is number of variables + 1. The last start value of 3
indicates that there are 3 nonzeros that we are storing.
Regards
>
>
> Thanks.
>
>
> Regards,
> Susana Lera.
> _______________________________________________
> 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
More information about the OS
mailing list