Tuesday, March 30, 2004

Swarm - a simulation package written in Objective C

Swarm is a neat simulation package. Check out their home page. It lets you do simulations using the ABM (Agent Based Method). You create a number of agents which are classes in Java or Objective C. It has a lot of glue code to manage the time clock, schedules, actions etc.

In addition it also has a visual interface that lets you graphically view the simulation while it occurs. This actually means that you must write the code - but it has a lot of helping routines.

You'll need to download and install Cygwin (X & development tools) to run Swarm.

I couldn't get the Java part to work. It was a blessing since it introduced me to Objective C.
ObjC is a cool extension to C which adds Smalltalk syntaxes to C. It was the language used to write NextStep.
The Mac OS 10.3 uses Objective C as the language for development.

Wireless and Cellular phone radiation and its effect on us.

These two articles provide an overview of the various studies conducted.
http://ewh.ieee.org/soc/embs/comar/phone.htm


http://www.mcw.edu/gcrc/cop/cell-phone-health-FAQ/toc.html

Friday, March 19, 2004

Problem solving and Socrates

The Socratic method tries to extract the truth rather than people's opinion. The method is skeptical, conversational, conceptual/definitional, empirical / inductive and deductive.

The second article is a nice summary of problem solving techniques Socratic method, Windtunnelling and Brainstorming.

KANBAN in SAP

Some research on the Net led to a better understanding of KANBAN systems. This overview provided the business side explanation of KANBAN. However SAP has implemented things a little differently. Their help page describes the methods supported in SAP. The difficult part is understanding what SAP means in term of business terms.

In SAP, the main advantage of KANBAN is that the EMPTY signal automatically creates the replenishment documents. A FULL signal automatically does the goods receipt.

Classic KANBAN - Only need to use FULL and EMPTY. Other statuses are optional.
One-Card KANBAN - Only 2 Kanbans. You need to use special statuses WAIT / INUSE to trigger replenishment.
Quantity KANBAN - Same as classic KANBAN. Instead of changing the status of a KANBAN, you tell it how many items you have used up. The system will calculate when the KANBAN qty is zero and changes it to EMPTY. The important thing here is that a KANBAN quantity signal is a seperate transaction code. It is not the same as a production order backflush. (In fact in KANBAN, goods issue is not done until the KB is EMPTY).
Event driven KANBAN - When the quantity is highly irregular, use this method. EMPTY does not trigger replenishment. Instead you go to the Event menu item to specify that you want a new KANBAN and wht quantity.

Later on I went ahead and created a SWARM simulation for KANBAN. It simulates KANBAN as implemented in SAP. It was interesting to view the behaviour of the KANBAN system when demand was erratic. The things that I was studying included
1. Number of refill transactions
2. Number of times the production had to stop because of no stock.
3. Inventory on hand.
These were modelled in SWARM which makes it easy to construct a GUI for the underlying model. The GUI makes things much more interesting and intuitive.

Interesting techniques in SAP

1. The global variables in a module are internally stored as (Module)VarName . Arrays are stored as (Module)ArrName[]. You can use this to access variables in SAP's modules. We faced the following situation : - sales orders automatically create a purchase order to a vendor; we needed to check the order reason on the sales order to determine whether a discount pricing condition should be applied in the purchase order. Unfortunately, the link to the sales order was only in memory when the userexit was called. The link was saved to the database after the userexit. So we located this data in memory and used a field-symbol assign to access that data.

2. PDF printing within SAP. When SAP prints using SAP-Script or SmartForms, the output can be saved into an array in internal format called OTF. SAP provides a function to convert OTF to PDF. We used this to let users view a PDF printout of their purchase orders from the web. The web interface (Business connector DSP) calls a custom function. This function queries the output condition table Bxxx to get the output type (KSCHL). Then it looks up TNAPR to get details about which program, form and sap-script to use. At this point, I realized that we need to modify core SAP to let it output OTF format. Made two changes - one in the beginning to turn on capturing (itcpo-tdgetotf='x') and one at the end to retrieve the OTF format from function 'CLOSE_FORM' and store it in memory. Once we have the OTF output, calling CONVERT_OTF_TO_PDF converts it to PDF. The resulting hex encoding is sent back to BC, which decodes it and sends it to the user.

3. KANBAN - Did a quick review of the various KANBAN methods supported in SAP. SAP supports classic KANBAN, One-card Kanban, Kanban with quantity and event driven Kanban. SAP's automatic calculation can calculate either the number of KANBAN's or the KANBAN quantity that is required to meet the average consumption. The tradeoff is between number of transactions, production area space and inventory cost. We need to look for a model that addresses these three and build a linear model.

4. Siebel - Finally was able to read about the product configurator in v7. Interesting aspects :- Product features, class hierarchy, concept of a model, XML import/export, web services.

Tuesday, March 16, 2004

Setup SSHD on Windows

Found this excellent page to install SSH services on Windows.
Use Cygwin's SSHD to run a SSH server on Windows.

This page is more specific and also shows how you can use SSH at home.

I got stuck at the point on how to login. Which username should I use?
1. Tried the Domain id (domain\username)
2. Create a local account - did not work.

The answer lies in the way Cygwin maps Windows users to Unix users (LINK).
Here are the steps that I took to resolve the problem.
Windows does not do a great job of logging. You must use eventvwr all the time.
So do the following to create a log file.

1. Ensure c:\cygwin\bin is in your system path.
2. net stop sshd
3. Start the Cygwin shell (click the icon in your start menu).
4. cygrunsrv -R sshd
5. cygrunsrv -I sshd -p /usr/sbin/sshd -a "-D -e" -2 /var/log/sshd.log

This will setup sshd to log to a txt file /var/log/sshd.log so that you can accuall see what is going on.

6. net start sshd
7. tail -f /var/log/sshd.log
This will display the log while you are trying to login
8. Start another Cygwin window
9. ssh localhost
If you get "Illegal user xxxx from 127.0.0.1" then you must add an entry for the user in /etc/passwd.

10. mkpasswd -l -c
The last line(s) displays the information you must put into /etc/passwd.
usd05813:unused_by_nt/2000/xp:23996:10513:usd05813,U-CODE1\usd05813,S-1-5-21-205
2333302-790525478-839522115-13996:/c/Documents and Settings/usd05813:/bin/bash

Copy this line. Change the group id (10513 in the above example) to 513 or you will get an invalid GID error while logging in with SSH.

9. ssh localhost
If you get "Illegal GID" then change your group id to 513 (see above)

10. If you keep getting "POSSIBLE BREAKIN ATTEMPT", you need to do the following
   a. vi /etc/sshd_config
   b. replace the line "#UseDNS yes" with "UseDNS no".
   c. net stop sshd
   d. net start sshd.

Check this Free SSH copy / SSH FTP client.

PS: Love W.Bloggar.

COMCAST upgrades its network

This message is for those who have COMCAST as their INTERNET service provider, if you don't have COMCAST you should ignore this message. Recently COMCAST tripled their INTERNET speed from about 1 Mbps to 3.5 Mbps. To take advantage of this you will need to reset your cable modem by:

1- Turn it off
2- Unplug it from your cable
3- Wait 60 seconds
4- Plug the cable back in
5- Turn the modem back on
6- Reboot you computer.

You should now have a significantly faster connection.

You can test your speed before and after doing this by visiting the following URL and performing their speed test and comparing the results:

http://google2-cnet.com.com/Bandwidth_meter/7004-7254_7-0.html?tag=tool

When I did this mine went from just below 1 Mbps to 3.4 Mbps when directly connected to COMCAST and 1.5 Mbps when connected to PMS CMS vis VRAS.

Monday, March 15, 2004

Desktop blog tool

I had installed W.Bloggar . This is a very nice tool for creating Blog entries from your desktop. So rather than being on the Internet, you can do it offline.

It also introduced me to a nice installation tool. Ghost Installer - seems like a very easy to use installation package. See the viewlet to get an idea of it.

The Information Society Technologies had some interesting IS related projects and proposals.

Saturday, March 13, 2004

Compiere downloads decreasing at an alarming rate

The Compiere blurb says 640000 downloads. But what does that really mean?

I sat down and analyzed the file download statistics on Sourceforge. Out of the 640000 downloads, only 420000 are for the server module. Drilling down further, I realized that the number of downloads is decreasing at an alarming rate.

2001 - 98911 downloads
2002 - 228868 downloads
2003 - 87268 downloads
2004 - 5708 downloads

In terms of versions, 2.5 hasn't taken off as yet.
2.3 - 17613 downloads
2.4 - 359831 downloads (2.4.2 was the most downloaded. it accounts for 173000 downloads)
2.5 - 43311 downloads

I've posted the detailed analysis on my web site http://compiere.dmahajan.org

Using RSS feeds in your own pages

This excellent site describes how you can pull in RSS feeds in your own page.

The Javascript example (http://forever.p3k.org/rss/) embeds the RSS feed in your page without XSLT or any server side code.

Moving into Portals

I've decided to host my own web site and use a portal architecture. This also meant that I have to integrate a weblog, Wiki site into the portal.

The DotNetNuke (http://www.dotnetnuke.com) portal was easy to setup and deploy to my ISP. It is a ASP.NET application that uses Microsoft SQL Server or Microsoft Access as the backend database. Since it is open source, it has a lot of developer support and tons of modules. Check my portal at http://dnn.dmahajan.com

The next part that I wanted was to integrate a Wiki site at my web site. So I've installed a Wiki site which is at http://wiki.dmahajan.com . I plan to integrate it into the portal when I get some free time.

The last piece was to integrate the web log. This was easy. I changed Blogger to post the published files to my server. Next an XSLT transform of the RSS.XML file provided a neat list of articles, that is on the portal's home tab.

Enough fun for now!