[Os-project-managers] The one started this latest round...

Horand Gassmann Horand.Gassmann at DAL.CA
Mon Jan 9 21:08:27 EST 2012



----- Forwarded message from Horand.Gassmann at Dal.Ca -----
     Date: Mon, 09 Jan 2012 07:18:54 -0400
     From: Horand Gassmann <Horand.Gassmann at Dal.Ca>
  Subject: Re: update
       To: Kipp Martin <kmartin at chicagobooth.edu>

Kipp Martin <kmartin at chicagobooth.edu> wrote:

> Hi Gus:
>
> It 3:40 AM and I just now finished my class notes. I am too tired to  
> keep going. I really apologize about this. I know you are working  
> hard on this and I want to be on top of it. Things are just crazy  
> right now. I got up this morning and started working first thing. I  
> did not even eat until my faculty dinner. It is just insane. I will  
> try to look at OS as soon as I can.

That's fine. I understand. Let me perhaps try to summarize, in the  
hopes that this might make it easier for you.

First, the problem is that we need an OSInstance object both in  
OSServiceMethods and in OSSolverService (if we want to print  
something). We have been making osinstance a data member of  
oscommandline, which is available everywhere, and is being passed from  
one routine to the next. Since oscommandline also contains an osil  
string (along with the name of the OSiL file), this seemed like a  
clean extension. (OSOptionsStruc did not contain the osinstance, but  
did contain the osil string.)

We populate the osinstance in the oscommandline element in the  
nonstandard constructor of OSServiceMethods. There we new an  
OSiLReader, read the osil string into the OSiLReader's m_osinstance  
element (which is private), and somehow associate it with the  
oscommandline object.

I have been doing a shallow copy (duplicating just the pointer), but  
that leads to a segfault, because I need to destroy the OSiLReader at  
the end of the constructor.

Alternatives are:

1. allocate the OSiLReader in the OSSolverService and pass it around  
as an argument of OSServiceMethods
2. make the OSiLReader an element of OSServiceMethods
3. make osilreader->m_osinstance a public member, so that I can NULLify it
4. write a (public) method osilreader->nullifyInstance() that has the  
same effect
5. do a deep copy of osinstance

5. is my least favorite method. OSInstance objects are large, and  
copying them is going to take lots of time. I think 1. and 2. are the  
only real options, but perhaps there is something I have not yet  
thought of.

Cheers

gus


----- End forwarded message -----


-------------------------------------------------------

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