ocs/spklib
Composer 安装命令:
composer require ocs/spklib
包简介
Library for DSS system
README 文档
README
Installation
Anda dapat melakukan instalasi melalui Composer:
composer require ajn/dss-library
Requirements
PHP 7.1 atau lebih baru.
Documentation
- WP Method
require "vendor/autoload.php"; use ajn\dss_library\Wplib as wp; $kriteria = [ [ 'nama' => 'Kecepatan', 'kode' => 'C1', 'bobot' => 4, 'type' => 'Benefits' ], [ 'nama' => 'Tahun Aktif', 'kode' => 'C2', 'bobot' => 3, 'type' => 'Benefits' ], [ 'nama' => 'Tanggal Bayar', 'kode' => 'C3', 'bobot' => 2, 'type' => 'Benefits' ] ]; $alternatif = [ [ "nama" => "Nama1", "nilai" => [ [ "kode" => "C1", "bobot" => 5 ], [ "kode" => "C2", "bobot" => 3 ], [ "kode" => "C3", "bobot" => 1 ] ] ], [ "nama" => "Nama2", "nilai" => [ [ "kode" => "C1", "bobot" => 4 ], [ "kode" => "C2", "bobot" => 2 ], [ "kode" => "C3", "bobot" => 2 ] ] ], [ "nama" => "Nama3", "nilai" => [ [ "kode" => "C1", "bobot" => 3 ], [ "kode" => "C2", "bobot" => 3 ], [ "kode" => "C3", "bobot" => 4 ] ] ] ]; $a = new wp($kriteria, $alternatif, 0); echo json_encode($a->ranking);
- Profile Matching Method
require "vendor/autoload.php"; use ajn\dss_library\ProfileMatching as PM; $kriteria = [ [ 'nama' => 'Kriteria 1', 'code' => 'C1', 'profileKriteria' => 5, 'bobot' => 0.4, 'sub' => [ [ 'nama' => 'Sub 11', 'code' => 'C11', 'bobot' => 0.7 ], [ 'nama' => 'Sub 12', 'code' => 'C12', 'bobot' => 0.3 ] ] ], [ 'nama' => 'Kriteria 2', 'code' => 'C2', 'profileKriteria' => 4, 'bobot' => 0.3, 'sub' => [ [ 'nama' => 'Sub 21', 'code' => 'C21', 'bobot' => 0.5 ], [ 'nama' => 'Sub 22', 'code' => 'C22', 'bobot' => 0.4 ], [ 'nama' => 'Sub 23', 'code' => 'C23', 'bobot' => 0.1 ], ] ], [ 'nama' => 'Kriteria 3', 'code' => 'C3', 'profileKriteria' => 4, 'bobot' => 0.3, 'sub' => [ [ 'nama' => 'Sub 31', 'code' => 'C31', 'bobot' => 0.25 ], [ 'nama' => 'Sub 32', 'code' => 'C32', 'bobot' => 0.25 ], [ 'nama' => 'Sub 33', 'code' => 'C33', 'bobot' => 0.25 ], [ 'nama' => 'Sub 34', 'code' => 'C34', 'bobot' => 0.25 ], ] ], ]; $alternatif = [ [ "nama" => "Nama1", "nilai" => [ [ "code" => "C1", "sub" => [ [ 'code'=>'C11', 'nilai'=> 5 ], [ 'code'=>'C12', 'nilai'=> 4 ], ] ], [ "code" => "C2", "sub" => [ [ 'code'=>'C21', 'nilai'=> 5 ], [ 'code'=>'C22', 'nilai'=> 5 ], [ 'code'=>'C23', 'nilai'=> 4 ], ] ], [ "code" => "C3", "sub" => [ [ 'code'=>'C31', 'nilai'=> 5 ], [ 'code'=>'C32', 'nilai'=> 5 ], [ 'code'=>'C33', 'nilai'=> 4 ], [ 'code'=>'C34', 'nilai'=> 4 ], ] ] ] ], [ "nama" => "Nama2", "nilai" => [ [ "code" => "C1", "sub" => [ [ 'code'=>'C11', 'nilai'=> 4 ], [ 'code'=>'C12', 'nilai'=> 4 ], ] ], [ "code" => "C2", "sub" => [ [ 'code'=>'C21', 'nilai'=> 4 ], [ 'code'=>'C22', 'nilai'=> 4 ], [ 'code'=>'C23', 'nilai'=> 4 ], ] ], [ "code" => "C3", "sub" => [ [ 'code'=>'C31', 'nilai'=> 4 ], [ 'code'=>'C32', 'nilai'=> 4 ], [ 'code'=>'C33', 'nilai'=> 4 ], [ 'code'=>'C34', 'nilai'=> 4 ], ] ] ] ], [ "nama" => "Nama3", "nilai" => [ [ "code" => "C1", "sub" => [ [ 'code'=>'C11', 'nilai'=> 5 ], [ 'code'=>'C12', 'nilai'=> 4 ], ] ], [ "code" => "C2", "sub" => [ [ 'code'=>'C21', 'nilai'=> 4 ], [ 'code'=>'C22', 'nilai'=> 5 ], [ 'code'=>'C23', 'nilai'=> 5 ], ] ], [ "code" => "C3", "sub" => [ [ 'code'=>'C31', 'nilai'=> 4 ], [ 'code'=>'C32', 'nilai'=> 5 ], [ 'code'=>'C33', 'nilai'=> 5 ], [ 'code'=>'C34', 'nilai'=> 4 ], ] ] ] ] ]; $a = new PM($kriteria, $alternatif, 0, true); echo json_encode($a->rank);
MARCOS Method
MARCOS menerima struktur kriteria dan alternatif yang sama dengan metode WP, TOPSIS, SMART, MOORA, EDAS, dan WASPAS.
require "vendor/autoload.php"; use ajn\dss_library\Marcos; $marcos = new Marcos($kriteria, $alternatif, 0); echo json_encode($marcos->ranking);
ocs/spklib 适用场景与选型建议
ocs/spklib 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ocs/spklib 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ocs/spklib 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 53
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-17