summaryrefslogtreecommitdiff
path: root/module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-25 21:29:12 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-25 21:29:12 +0100
commit912bc8b903dfa6d438c2469ecdad35c181c71830 (patch)
tree1e6ee9fdcb2b9d488914b80623d68189867533bb /module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java
parent92b957036218c03a20ba35c19a70bdf5e2333fd3 (diff)
downloadrules-sandbox-912bc8b903dfa6d438c2469ecdad35c181c71830.tar.gz
rules-sandbox-912bc8b903dfa6d438c2469ecdad35c181c71830.tar.bz2
rules-sandbox-912bc8b903dfa6d438c2469ecdad35c181c71830.tar.xz
rules-sandbox-912bc8b903dfa6d438c2469ecdad35c181c71830.zip
Improving usability, massive refactoring.
* Moving all Drools code into their own modules. This fixes ri-engine to acme dependency. * Now they all inherit from their own parent, should be used by third party code too. * Separating acme planning code into its own module. * Splitting rules code from ri-engine into ri-base. ri-engine is now a pure launcher for modules. * Dumping kogito for the most part, but it seems like the planner still requires that.
Diffstat (limited to 'module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java')
-rw-r--r--module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java b/module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java
new file mode 100644
index 0000000..dfdc0e0
--- /dev/null
+++ b/module/acme-planner/src/main/java/io/trygvis/acme/planning/machine/ScalewayInstance.java
@@ -0,0 +1,25 @@
+package io.trygvis.acme.planning.machine;
+
+public class ScalewayInstance {
+ public final String kind;
+ // Euros / hour
+ public final double cost;
+ public final int cpu;
+ public final int memory;
+
+ public int multiplicand;
+
+ public ScalewayInstance(String kind, double cost, int cpu, int memory) {
+ this.kind = kind;
+ this.cost = cost;
+ this.cpu = cpu;
+ this.memory = memory;
+
+ this.multiplicand = cpu * memory;
+ }
+
+ @Override
+ public String toString() {
+ return kind;
+ }
+}