Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code in OASIS #211

Closed
7 of 9 tasks
CodeBear801 opened this issue Mar 9, 2020 · 4 comments
Closed
7 of 9 tasks

Refactor code in OASIS #211

CodeBear801 opened this issue Mar 9, 2020 · 4 comments
Assignees
Labels
Prototype Proof of concept Refactor Rewrite existing code in order to improve its readability, reusability or structure

Comments

@CodeBear801
Copy link

CodeBear801 commented Mar 9, 2020

Here records refactor suggestions for OASIS:

@CodeBear801
Copy link
Author

CodeBear801 commented Mar 9, 2020

Suggestions:

#204 (comment)

Already abstract to issue's description.

@CodeBear801
Copy link
Author

CodeBear801 commented Mar 10, 2020

Suggestions:
#204 (comment)

Already abstract to issue's description.

@CodeBear801
Copy link
Author

Suggestions for chargeInfo
Current definition is:

type chargeInfo struct {
	arrivalEnergy float64
	chargeTime    float64
	chargeEnergy  float64
}
  • May be should change chargeEnergy to chargestrategy->State, use State to hide information of chargeEnergy, maybe later could add cost.
  • ChargeTime could also be recorded in State, but I decide to still keep it in chargeInfo. There might be a situation in the future, user only want to charge his car for certain time, such as 1 hour, he didn't care about how much energy could be charged. So the final status of state still be fixed, just charge duration is pre-calculated by strategy but chargeEnergy is dynamic during evaluation.

@CodeBear801
Copy link
Author

CodeBear801 commented Mar 12, 2020

Suggestions:
#215 (comment)
Already abstract to issue's description.

@CodeBear801 CodeBear801 self-assigned this Mar 13, 2020
@CodeBear801 CodeBear801 added the Prototype Proof of concept label Mar 13, 2020
CodeBear801 added a commit that referenced this issue Mar 25, 2020
CodeBear801 added a commit that referenced this issue Mar 26, 2020
* fix: refactor code.  Create common type of `Location` and remove redundant definitions.
issue: #211
@CodeBear801 CodeBear801 added the Refactor Rewrite existing code in order to improve its readability, reusability or structure label Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prototype Proof of concept Refactor Rewrite existing code in order to improve its readability, reusability or structure
Projects
None yet
Development

No branches or pull requests

1 participant