Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/javierbarbero/DataEnvelopmentAnalysis.jl
08 January 2026, 21:24:23 UTC
  • Code
  • Branches (4)
  • Releases (20)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/gh-pages
    • refs/heads/master
    • refs/heads/pr/10
    • refs/tags/v0.1.0
    • v0.9.1
    • v0.9.0
    • v0.8.2
    • v0.8.1
    • v0.8.0
    • v0.7.3
    • v0.7.2
    • v0.7.1
    • v0.7.0
    • v0.6.1
    • v0.6.0
    • v0.5.2
    • v0.5.1
    • v0.5.0
    • v0.4.0
    • v0.3.1
    • v0.3.0
    • v0.2.0
    • v0.1.2
    • v0.1.1
  • c7a9f61
  • /
  • docs
  • /
  • src
  • /
  • economic
  • /
  • cost.md
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
  • release
origin badgecontent badge
swh:1:cnt:62e5f85fbc5a654f864a6ea7f9eacf509efbd78d
origin badgedirectory badge
swh:1:dir:038a8d9898bf33fa0622a66991988cd053ea2e8b
origin badgerevision badge
swh:1:rev:5001096e48a4cc0c4b6f60e98aa115c20397b089
origin badgesnapshot badge
swh:1:snp:2f1d3556ccbd96c01376bb5f30d60d389c9ce73b
origin badgerelease badge
swh:1:rel:bd17f23570f075fea566c0ea27a233eacbf88ddb

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
  • release
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 5001096e48a4cc0c4b6f60e98aa115c20397b089 authored by Javier Barbero on 27 March 2021, 13:07:18 UTC
Version 0.3.1
Tip revision: 5001096
cost.md
```@meta
CurrentModule = DataEnvelopmentAnalysis
DocTestSetup = quote
    using DataEnvelopmentAnalysis
end
```

# Cost Models

## Cost Efficiency Model with Radial Technical Efficiency

Let us denote by $C\left(\mathbf{y},\mathbf{w}\right)$ the minimum cost of producing the output level $\mathbf{y}$ given the input price vector $\mathbf{w}$: $C\left(\mathbf{y},\mathbf{w}\right)=\min \left\{ \sum\limits_{i=1}^{m}{{{w}_{i}}{{x}_{i}}} | {\mathbf{x}} \geqslant X\mathbf{\lambda} {\mathbf{y}_{o}} \leqslant Y{\mathbf{\lambda },\;{\mathbf{\lambda }} \geqslant {\mathbf{0}}} \right\}$, which considers the input possibility set capable of producing $\mathbf{y}_{o}$. For the observed outputs levels we can calculate minimum cost and the associated optimal quantities of inputs $\mathbf{x^{*}}$ consistent with the production technology by solving the following program:

```math
\begin{aligned}
 & \underset{\mathbf{x} ,\mathbf{\lambda }}{\mathop{\min }}\,\quad \quad \quad \;\ C\left(\mathbf{y}_{},\mathbf{w}\right)=\mathbf{wx^{*}}  \\ 
 & \text{subject}\ \text{to} \\ 
 & \quad \quad \quad \quad \quad \ {{\mathbf{x}}}\ge X\mathbf{\lambda } \\ 
 & \quad \quad \quad \quad \quad  \;Y\mathbf{\lambda }\ \ge {{\mathbf{y}}_{o}}  \\ 
 & \quad \quad \quad \quad \quad \ \mathbf{\lambda }\ge \mathbf{0}. 
\end{aligned}
```

The measurement of cost efficiency assuming variable returns to scale, **VRS**, adds the following condition:
```math
\sum\nolimits_{j=1}^{n}\lambda_j=1
```

*Cost efficiency* defines as the ratio of minimum cost to observed cost: $CE=C\left(\mathbf{y},\mathbf{w}\right)/\mathbf{wx_{o}}$. Thanks to duality results presented by *Shephard (1953)* , and following *Farrell (1957)*, cost efficiency can be decomposed into the radially input oriented technical efficiency measure and the residual difference corresponding to *allocative cost efficiency*. Allocative  efficiency defines as the ratio between minimum cost to production cost at the technically efficient projection of the unit under evaluation.

In this example we compute the cost efficiency measure under variable returns to scale:
```jldoctest 1
julia> X = [5 3; 2 4; 4 2; 4 8; 7 9.0];

julia> Y = [7 4; 10 8; 8 10; 5 4; 3 6.0];

julia> W = [2 1; 2 1; 2 1; 2 1; 2 1.0];

julia> deacost(X, Y, W)
Cost DEA Model
DMUs = 5; Inputs = 2; Outputs = 2
Orientation = Input; Returns to Scale = VRS
──────────────────────────────────
       Cost  Technical  Allocative
──────────────────────────────────
1  0.615385      0.75     0.820513
2  1.0           1.0      1.0
3  1.0           1.0      1.0
4  0.5           0.5      1.0
5  0.347826      0.375    0.927536
──────────────────────────────────
```

### deacost Function Documentation

```@docs
deacost
```

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API