Файл: Определение объема необходимой и достаточной информации при принятии решения (Факторы, влияющие на принятие управленческих решений и их качество).pdf
Добавлен: 28.03.2023
Просмотров: 794
Скачиваний: 2
СОДЕРЖАНИЕ
ГЛАВА 1. ФАКТОРЫ, ВЛИЯЮЩИЕ НА ПРИНЯТИЕ УПРАВЛЕНЧЕСКИХ РЕШЕНИЙ И ИХ КАЧЕСТВО
1.1 Управленческое решение. Основные понятия
1.2 Процесс принятия управленческого решения
1.3 Внутренние факторы, влияющие на принятие решения
1.4 Внешние факторы, влияющие на принятие решения
ГЛАВА 2. ОСОБЕННОСТИ ПРИНЯТИЯ КАЧЕСТВЕННОГО УПРАВЛЕНЧЕСКОГО РЕШЕНИЯ
2.1 Характеристика предприятия
2.2 Принятие управленческого решения по повышению эффективности управления персоналом
2.3 Рекомендации по определению и принятию качественного управленческого решения
data pack(, fPrintGrid);
this_prepend(header.data);
Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.
function _store_gridset() record 0x0082; Record identifier length 0x0002; Bytes to follow fGridSet !(this_print_gridlines); Boolean flag header pack(, record, length);
data pack(, fGridSet);
this_prepend(header.data);
Write the WSBOOL BIFF record, mainly for fittopage. Used in conjunction with the SETUP record.
function _store_wsbool() record 0x0081; Record identifier length 0x0002; Bytes to follow The only option that is of interest is the flag for fit to page. So we set all the options in one go.
if (this_fit_page) { grbit 0x05c1;
else { grbit 0x04c1;
header pack(, record, length);
data pack(, grbit);
this_prepend(header.data);
Write the HORIZONTALPAGEBREAKS BIFF record.
function _store_hbreak() Return if the user hasn't specified pagebreaks if(empty(this_hbreaks)) { return;
Sort and filter array of page breaks breaks this_hbreaks;
sort(breaks,SORT_NUMERIC);
if(breaks 0) { don't use first break if it's 0 array_shift(breaks);
record 0x001b; Record identifier cbrk count(breaks); Number of page breaks length (cbrk + 1) 2; Bytes to follow header pack(, record, length);
data pack(, cbrk);
Append each page break foreach(breaks as break) { data. pack(, break);
this_prepend(header.data);
Write the VERTICALPAGEBREAKS BIFF record.
function _store_vbreak() Return if the user hasn't specified pagebreaks if(empty(this_vbreaks)) { return;
1000 vertical pagebreaks appears to be an internal Excel 5 limit.
It is slightly higher in Excel 97200, approx. 1026
breaks array_slice(this_vbreaks,0,1000);
Sort and filter array of page breaks sort(breaks,SORT_NUMERIC);
if(breaks 0) { don't use first break if it's 0 array_shift(breaks);
record 0x001a; Record identifier cbrk count(breaks); Number of page breaks length (cbrk + 1) 2; Bytes to follow header pack(, record, length);
data pack(, cbrk);
Append each page break foreach (breaks as break) { data. pack(, break);
this_prepend(header.data);
Set the Biff PROTECT record to indicate that the worksheet is protected.
function _store_protect() Exit unless sheet protection has been specified if(this_protect 0) { return;
record 0x0012; Record identifier length 0x0002; Bytes to follow fLock this_protect; Worksheet is protected header pack(, record, length);
data pack(, fLock);
this_prepend(header.data);
Write the worksheet PASSWORD record.
function _store_password() Exit unless sheet protection and password have been specified if((this_protect 0) or (!isset(this_password))) { return;
record 0x0013; Record identifier length 0x0002; Bytes to follow wPassword this_password; Encoded password header pack(, record, length);
data pack(, wPassword);
this_prepend(header.data);
Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position.
access public param integer row The row we are going to insert the bitmap into param integer col The column we are going to insert the bitmap into param string bitmap The bitmap filename param integer x The horizontal position (offset) of the image inside the cell.
param integer y The vertical position (offset) of the image inside the cell.
param integer scale_x The horizontal scale param integer scale_y The vertical scale function insert_bitmap(row, col, bitmap, x 0, y 0, scale_x 1, scale_y 1) list(width, height, size, data) this_process_bitmap(bitmap);
Scale the frame of the image.
width scale_x;
height scale_y;
Calculate the vertices of the image and write the OBJ record this_position_image(col, row, x, y, width, height);
Write the IMDATA record to store the bitmap data record 0x007f;
length 8 + size;
cf 0x09;
env 0x01;
lcb size;
header pack(, record, length, cf, env, lcb);
this_append(header.data);
Calculate the vertices that define the position of the image as required by the OBJ record.
+++
| A | B | ++++ | |(x1,y1) | | | 1 |(A1)._______|______ | | | | | | | | | | | ++| BITMAP |+ | | | | | | 2 | |______________. | | | | (B2)| | | | (x2,y2)| + +++ Example of a bitmap that covers some of the area from cell A1 to cell B2.
Based on the width and height of the bitmap we need to calculate 8 vars:
col_start, row_start, col_end, row_end, x1, y1, x2, y2.
The width and height of the cells are also variable and have to be taken into account.
The values of col_start and row_start are passed in from the calling function. The values of col_end and row_end are calculated by subtracting the width and height of the bitmap from the width and height of the underlying cells.
The vertices are expressed as a percentage of the underlying cell width as follows (rhs values are in pixels):
x1 X W 1024 y1 Y H 256 x2 (X1) W 1024 y2 (Y1) H 256 Where: X is distance from the left side of the underlying cell Y is distance from the top of the underlying cell W is the width of the cell H is the height of the cell note the SDK incorrectly states that the height should be expressed as a percentage of 1024.
param integer col_start Col containing upper left corner of object param integer row_start Row containing top left corner of object param integer x1 Distance to left side of object param integer y1 Distance to top of object param integer width Width of image frame param integer height Height of image frame function _position_image(col_start, row_start, x1, y1, width, height) Initialise end cell to the same as the start cell col_end col_start; Col containing lower right corner of object row_end row_start; Row containing bottom right corner of object Zero the specified offset if greater than the cell dimensions if (x1 thissize_col(col_start)) x1 0;
if (y1 thissize_row(row_start)) y1 0;
width width + x1 1;
height height + y1 1;
Subtract the underlying cell widths to find the end cell of the image while (width thissize_col(col_end)) { width thissize_col(col_end);
col_end++;
Subtract the underlying cell heights to find the end cell of the image while (height thissize_row(row_end)) { height thissize_row(row_end);
row_end++;
Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell with zero eight or width.
if (thissize_col(col_start) 0) return;
if (thissize_col(col_end) 0) return;
if (thissize_row(row_start) 0) return;
if (thissize_row(row_end) 0) return;
Convert the pixel values to the percentage value expected by Excel x1 x1 thissize_col(col_start) 1024;
y1 y1 thissize_row(row_start) 256;
x2 width thissize_col(col_end) 1024; Distance to right side of object y2 height thissize_row(row_end) 256; Distance to bottom of object this_store_obj_picture( col_start, x1, row_start, y1, col_end, x2, row_end, y2 );
Convert the width of a cell from user's units to pixels. By interpolation the relationship is: y 7x +5. If the width hasn't been set by the user we use the default value. If the col is hidden we use a value of zero.
param integer col The column return integer The width in pixels function size_col(col) Look up the cell value to see if it has been changed if (isset(thiscol_sizes)) { if (thiscol_sizes 0) { return(0);
else { return(floor(7 thiscol_sizes + 5));
else { return(64);
Convert the height of a cell from user's units to pixels. By interpolation the relationship is: y 43x. If the height hasn't been set by the user we use the default value. If the row is hidden we use a value of zero. (Not possible to hide row yet).
param integer row The row return integer The width in pixels function size_row(row) Look up the cell value to see if it has been changed if (isset(thisrow_sizes)) { if (thisrow_sizes 0) { return(0);
else { return(floor(43 thisrow_sizes));
else { return(17);
Store the OBJ record that precedes an IMDATA record. This could be generalise to support other Excel objects.
param integer colL Column containing upper left corner of object param integer dxL Distance from left side of cell param integer rwT Row containing top left corner of object param integer dyT Distance from top of cell param integer colR Column containing lower right corner of object param integer dxR Distance from right of cell param integer rwB Row containing bottom right corner of object param integer dyB Distance from bottom of cell function _store_obj_picture(colL,dxL,rwT,dyT,colR,dxR,rwB,dyB) record 0x005d; Record identifier length 0x003c; Bytes to follow cObj 0x0001; Count of objects in file (set to 1) OT 0x0008; Object type. 8 Picture id 0x0001; Object ID grbit 0x0614; Option flags cbMacro 0x0000; Length of FMLA structure Reserved1 0x0000; Reserved Reserved2 0x0000; Reserved icvBack 0x09; Background colour icvFore 0x09; Foreground colour fls 0x00; Fill pattern fAuto 0x00; Automatic fill icv 0x08; Line colour lns 0xff; Line style lnw 0x01; Line weight fAutoB 0x00; Automatic border frs 0x0000; Frame style cf 0x0009; Image format, 9 bitmap Reserved3 0x0000; Reserved cbPictFmla 0x0000; Length of FMLA structure Reserved4 0x0000; Reserved grbit2 0x0001; Option flags Reserved5 0x0000; Reserved header pack(, record, length);
data pack(, cObj);
data. pack(, OT);
data. pack(, id);
data. pack(, grbit);
data. pack(, colL);
data. pack(, dxL);
data. pack(, rwT);
data. pack(, dyT);
data. pack(, colR);
data. pack(, dxR);
data. pack(, rwB);
data. pack(, dyB);
data. pack(, cbMacro);
data. pack(, Reserved1);
data. pack(, Reserved2);
data. pack(, icvBack);
data. pack(, icvFore);
data. pack(, fls);
data. pack(, fAuto);
data. pack(, icv);
data. pack(, lns);
data. pack(, lnw);
data. pack(, fAutoB);
data. pack(, frs);
data. pack(, cf);
data. pack(, Reserved3);
data. pack(, cbPictFmla);
data. pack(, Reserved4);
data. pack(, grbit2);
data. pack(, Reserved5);
this_append(header.data);
Convert a 24 bit bitmap into the modified internal format used by Windows.
This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the MSDN library.
param string bitmap The bitmap to process return array Array with data and properties of the bitmap function _process_bitmap(bitmap) Open file.
bmp_fd fopen(bitmap,);
if (!bmp_fd) { die("Couldn't import bitmap");
Slurp the file into a string.
data fread(bmp_fd, filesize(bitmap));
Check that the file is big enough to be a bitmap.
if (strlen(data) 0x36) { die("bitmap doesn't contain enough data.\n");
The first 2 bytes are used to identify the bitmap.
identity unpack(, data);
if (identity ! ) { die("bitmap doesn't appear to be a valid bitmap image.\n");
Remove bitmap data: ID.
data substr(data, 2);
Read and remove the bitmap size. This is more reliable than reading the data size at offset 0x22.
size_array unpack(, substr(data, 0, 4));
size size_array;
data substr(data, 4);
size 0x36; Subtract size of bitmap header.
size + 0x0C; Add size of BIFF header.
Remove bitmap data: reserved, offset, header length.
data substr(data, 12);
Read and remove the bitmap width and height. Verify the sizes.
width_and_height unpack(, substr(data, 0, 8));
width width_and_height;
height width_and_height;
data substr(data, 8);
if (width 0xFFFF) { die("bitmap: largest image width supported is 65k.\n");
if (height 0xFFFF) { die("bitmap: largest image height supported is 65k.\n");
Read and remove the bitmap planes and bpp data. Verify them.
planes_and_bitcount unpack(, substr(data, 0, 4));
data substr(data, 4);
if (planes_and_bitcount ! 24) { Bitcount die("bitmap isn't a 24bit true color bitmap.\n");
if (planes_and_bitcount ! 1) { die("bitmap: only 1 plane supported in bitmap image.\n");
Read and remove the bitmap compression. Verify compression.
compression unpack(, substr(data, 0, 4));
data substr(data, 4);
compression 0;
if (compression ! 0) { die("bitmap: compression not supported in bitmap image.\n");
Remove bitmap data: data size, hres, vres, colours, imp. colours.
data substr(data, 20);
Add the BITMAPCOREHEADER data header pack(, 0x000c, width, height, 0x01, 0x18);
data header. data;
return (array(width, height, size, data));
Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.
function _store_zoom() If scale is 100 we don't need to write a record if (this_zoom 100) { return;
record 0x00A0; Record identifier length 0x0004; Bytes to follow header pack(, record, length);
data pack(, this_zoom, 100);
this_append(header.data);
-
Harrison E. Frank. Сущность управленческого решения.- http://www.e-xecutive.ru/publications/aspects/decision/article_964/ ↑
-
Лившиц А. Управленческие решения. – М.: Кнорус, 2009. – 248 с. ↑
-
Управление организацией: Учебник / Под ред. А.Г. Поршнева, З.П. Румянцевой, Н.А. Саломатина. - 2-е изд , перераб. и доп. - М.: ИНФРА-М, 2009. - 669 с. ↑
-
Кулагин О. Принятие решений в организациях. - СПб.: издательский дом «Сентябрь», 2001 ↑
-
Кулагин О. Принятие решений в организациях. - СПб.: издательский дом «Сентябрь», 2001 ↑